-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Doesn't work under Node.js 6.0.0 #1000
Comments
I get the same error
My Test environment:
|
I wonder how this happened? There shouldn't be an API breaking change in v6 other than the worker process API. Btw, what's this file: 'auth.c' file being mentioned? |
That's where all the authentication mambo-jumbo happens inside PostgreSQL server code. It is always mentioned on any authentication-related error. |
I've done some initial debugging, and I am almost certain the issue is caused by one of the changes to the From the change-log: The following significant changes have been made since the previous Node.js v5.0.0 release:
For example, if I do something like this: Connection.prototype.parseCString = function(buffer) {
console.log('BUFFER:', buffer.length);
var start = this.offset;
while(buffer[this.offset++] !== 0) { }
return buffer.toString(this.encoding, start, this.offset - 1);
}; in file |
Same issue here |
Hello everyone, Here's what fixes the Node v6.0.0 problem: |
I confirm it works for me |
Works for me too. |
I confirm this to be the fix indeed! Thank you @ignitenet-martynas ! So it was the @brianc Now we just need the PR to make into a new release ;) And I think it should be 4.6.0 ;) |
The issue has been resolved with 4.5.5 release. Thank you @ignitenet-martynas and @brianc 👍 |
Thanks for your help with reporting it & digging in and finding it was an issue with the buffer @vitaly-t!! |
Fixes the Node 6.0.0 issue: brianc/node-postgres#1000
Btw, judging by the fix, this is probably due to by nodejs/node#5522, not the Buffer changes. |
Precisely, @ChALkeR. |
- There is a change in `Buffer` in node 6 that causes an issue with authentication in the `pg`/`pg.js` modules. - See brianc/node-postgres#1018 - Which references: brianc/node-postgres#1000 - This commit changes the pg library dependency to the version that contains the fix for this issue.
Sorry for zombying this issue but I seem to be having the same problem despite upgrading to |
Apologies - this was my fault. Another issue masquerading as this one that I've managed to fix. |
Makes it possible to use this in Node.js 6
I am getting the same error right now am on node 6.0.0 and my |
Make it possible to use the lib on node versions >= 6.0.0 brianc/node-postgres#1000
DOESnt work for me. PS C:\webproj\dreamhouse-web-app> gulp serve error: password authentication failed for user "taufikmas" |
@fixduino did you test it under Node 4.x? Which version of |
i use latest node 6.0 . win10. |
@fixduino try Node.js 4.x, your problem could be unrelated, i.e. if you still get the same error, then it is not related, and you simply got your password wrong. |
@fixduino I'd need to see your code but it looks like you're using the wrong password. |
i never put my password. where is location for set password? thx |
client.js -- https://pastebin.com/XQYs5xWv conection-parameters.js -- https://pastebin.com/44mHmsgh |
SOLVED.. just a little mistake to set parameter.. win10. nodejs 6.0 |
Excuse me I cannot open this link https://github.com/ignitenet-martynas/node-postgres/commit/77560fe1bbc80ba0a629720161d81dbb6286166d it show 404 not found |
@endermaxximum Well the fix has been integrated into node-postgres quite a while ago therefore I deleted the fork... |
okay.thank you |
could you help me what wrong with my code? @ignitenet-martynas here is my code: `var express = require('express'), // Assign Dust Engine to .dust Files // Set Default Ext .dust // Set Public Folder // Body Parser Middleware app.get('/', function(req, res){ //connect using created pool // Server |
@endermaxximum Your connection string isn’t used anywhere. Pass it to the pool constructor (documentation): var pool = new pg.Pool({
connectionString: "postgres://Loraserver:00000000@localhost/Lopicaserver",
}); |
Thank you so much. |
If we take the example on the main page:
And simply switch to Node.js 6.0.0, we are immediately getting an error:
i.e. authentication doesn't work under the newly released Node.js 6.0.0
My Test environment:
The text was updated successfully, but these errors were encountered: