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: Last message was not SASLResponse #3222

Open
blechatellier opened this issue May 23, 2024 · 7 comments
Open

SASL: Last message was not SASLResponse #3222

blechatellier opened this issue May 23, 2024 · 7 comments

Comments

@blechatellier
Copy link

Hi, I'm using node-pg in a serverless environment and I often see the following error:

Unhandled Rejection: Error: SASL: Last message was not SASLResponse
at /var/task/apps/lawy/.next/server/chunks/9840.js:1:2550
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async a.acquireConnection (/var/task/apps/lawy/.next/server/chunks/9840.js:1:58997)

I can see in code that it gets called in finalizeSession

throw new Error('SASL: Last message was not SASLResponse')

When would this error happen?

Thanks for your help.

@brianc
Copy link
Owner

brianc commented Jun 3, 2024

Hey @blechatellier - i need more code to reproduce this issue. if you can reproduce this in an isolated environment & provide the code I'm more than happy to take a look. Otherwise...not sure? Could be pg-bouncer? Or some misconfigured password somewhere?

@jonnicholson94
Copy link

Also having this problem - in a serverless function.

@brianc
Copy link
Owner

brianc commented Jun 24, 2024

i need more code to reproduce this issue. if you can reproduce this in an isolated environment & provide the code I'm more than happy to take a look.

@jonnicholson94 - any way you could share with me some code that reproduces the problem? 🙏

@blechatellier
Copy link
Author

@brianc sorry for the late reply, some of those issues were because of the supabase pooler terminating some connections randomly, the issue has been fixed on their side and this hasn't happened since.

@fengkx
Copy link

fengkx commented Jun 26, 2024

I am also using supabase in my project facing this problem. I am still having this issue. Cloud you tell me how to fix this? @blechatellier

@blechatellier
Copy link
Author

It was related to a change they did and fixed on their side supabase/supavisor#344

@blechatellier
Copy link
Author

I've also encountered that issue in the past with an onCompletion callback from streaming an AI response that was called async after the connection was closed.

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

No branches or pull requests

4 participants