Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rpominov opened this issue Jun 6, 2022 · 2 comments
Open

Comments

@rpominov
Copy link
Owner

rpominov commented Jun 6, 2022

When running CLI without specifying any database connection options, it may crash with a confusing error (see title).

This is because this case is not handled well in node-postgres: brianc/node-postgres#1927 (comment)

Not sure whether we can do anything about this on our side

@DamithaPerera
Copy link

DamithaPerera commented Jun 19, 2022

This works for me.

const dbConnection = new Client({ ssl: false, host: '127.0.0.1', port: 5432, database: 'test', user: 'postgres', password: 'test' })

@rpominov
Copy link
Owner Author

Sure. The problem is, if you do something like const dbConnection = new Client(); const connectionPromise = dbConnection.connect() the node process may crash, and you won't be able to catch the error as it won't be propagated through the connectionPromise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants