SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string

Hi,

Recently i upgraded strapi from 20 beta to 3.0.0 stable version but when i try to connect from my client in Login i am getting this error. anyone please help me to fix this issue.

C:\Users\windows\Documents\practice\test\03-12-2021\cms-19.4\node_modules\pg\lib\sasl.js:24
throw new Error(‘SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string’)
^

Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string

I am using postgreSQL 14 database
node version is v12.22.7
pg library “pg”: “^8.0.3”

Regards,
Rayappan Antoniraj

This occurs when the password in your database config (config/index.js) is empty.

It is easy to miss this as the error is not self explanatory. By default, the local config is used and this comes with an empty password. Populate that and you should be fine.

I know this is an old question, just putting this here for others

Thank you so much this solved my issue. I hadn’t set the password for postgres user.
You can set the password like
// starts the postgesql terminal
sudo -u postgres psql
// set the password
\password postgres
after typing this command in the terminal set the new password,