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, While creating new Connection #195

Open
kshitijjagatkar opened this issue Feb 19, 2021 · 1 comment

Comments

@kshitijjagatkar
Copy link

kshitijjagatkar commented Feb 19, 2021

I was setting up Databse Connection as usual, new connection dialogue pops up and I started filling boxes as it should be.
But when I saved and tried to connect this error pops up.

My settings of connection as bellow:
Screenshot (149)

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\kshitij\.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

  4x -9:45.4.0 core:move-left (input.hidden-input)
     -9:44.6.0 core:backspace (input.hidden-input)
  4x -9:43.3.0 core:move-right (input.hidden-input)
  8x -5:46 data-atom:new-connection (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
  4x -4:57.4.0 data-atom:toggle-results-view (atom-pane.pane.active)
     -1:43.9.0 data-atom:new-connection (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

data-atom 0.29.1 
@kshitijjagatkar kshitijjagatkar changed the title Uncaught Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: ... Uncaught Error: Unknown authenticationOk, While creating new Connection Feb 19, 2021
@Frontside5
Copy link

Frontside5 commented Sep 18, 2021

I've just posted this response on another bug report, hopefully it helps you or somebody else.

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, 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