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

Uncaught Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: ... #196

Open
TravisHammonds opened this issue Mar 7, 2021 · 1 comment

Comments

@TravisHammonds
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.54.0 x64
Electron: 6.1.12
OS: Microsoft Windows 10 Home
Thrown From: data-atom package 0.29.1

Stack Trace

Uncaught Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }

At C:\Users\travi\.atom\packages\data-atom\node_modules\pg\lib\connection.js:441

Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
    at Connection.parseR (/packages/data-atom/node_modules/pg/lib/connection.js:441:9)
    at Connection.parseMessage (/packages/data-atom/node_modules/pg/lib/connection.js:360:17)
    at /packages/data-atom/node_modules/pg/lib/connection.js:117:22)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17)

Commands

     -2:50.1.0 data-atom:new-connection (ul.list-inline.tab-bar.inset-panel)
     -2:43.7.0 data-atom:execute (ul.list-inline.tab-bar.inset-panel)
     -2:28.4.0 data-atom:new-connection (atom-pane.pane.active)
  3x -2:17.6.0 application:open-file (atom-pane.pane.active)
     -1:42 data-atom:new-connection (input.hidden-input)
  2x -1:24.2.0 application:open-file (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -1:00.3.0 data-atom:new-connection (input.hidden-input)

Non-Core Packages

data-atom 0.29.1 
@Frontside5
Copy link

Frontside5 commented Sep 18, 2021

I had this issue trying to connect to a PostgreSQL 13 database. I think the issue is with the password encryption method; the default password encryption is now 'scram-sha-256' when previously it was 'md5'.

I have seen elsewhere that scram-sha-256 can cause problems with other postgres clients, there's a good response to the same issue with a different client here:
brianc/node-postgres#1508

Unfortunately, even with this knowledge and (I think) changing the encryption method to md5, I wasn't able to stop this error from appearing. However, I was able to finally get past this error by editing the "C:\Program Files\PostgreSQL\13\data\pg_hba.conf". By setting all methods to "trust" I was able to prevent PostgreSQL from asking for a password at all.

This is an acceptable solution for me because I'm just using PostgreSQL for a university course on "fake" data, but maybe somebody with more knowledge than me can figure out how to fix this while still retaining password requirements.

Edit to add: This is a link to the PostgreSQL documentation on password authentication. Possibly the plaintext 'password' method will work with SSL encryption, but untested currently - https://www.postgresql.org/docs/11/auth-password.html

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