Im getting some errors out of nowhere
My app was working perfectly fine and suddenly im getting some prisma errors like:
PrismaClientKnownRequestError:
Invalid
prisma.user.findUnique()
invocation:
This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: "}} (The request id was: 901f4cb0dbbeec9d)
at async hasActiveSubscription (src/lib/subscriptions.ts:7:17)
at async (src/middleware.ts:58:28)
5 |
6 | try {
7 | const user = await prisma.user.findUnique({| ^ 8 | where: { id: userId }, 9 | include: { 10 | subscriptions: { { code: 'P5000', clientVersion: '6.2.1', meta: { modelName: 'User' } } And when running npx prisma db push --force-reset i get: Error: Schema engine error: [/Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ws_stream_tungstenite-0.14.0/src/tung_websocket.rs:540:13] internal error: entered unreachable code: protocol error from tungstenite on send is a bug in ws_stream_tungstenite, please report at http://github.com/najamelan/ws_stream_tungstenite/issues. The error from tungstenite is Sending after closing is not allowed On cloud.prisma.io I also get a pulse error: Prisma Pulse could not reach the specified datasource db url. This could be caused by an incorrect datasource URL or database firewall rules, or certificate issues. This is probably not a problem with Prisma Pulse. The network error was: "Postgres client.connect() is unresponsive." (P6101) I've check my api keys and everything is ok. I've reinstalled prisma and still not working.
5 Replies
You selected to wait for the human sages. They'll share their wisdom soon.
Grab some tea while you wait, or check out
#ask-ai
if you'd like a quick chat with the bot anyway!Hi @aracovita.dev
The P6008 error code implies Prisma Accelerate cannot establish a connection to your database. https://www.prisma.io/docs/accelerate/troubleshoot#p6008-connectionerrorenginestarterror
Are you behind a VPC or firewall?
Troubleshooting: Prisma Accelerate | Prisma Documentation
Troubleshooting Prisma Accelerate.
Can you also share your github handle so i can take a look at the logs?
Im not behind any vpc or firewall, im literally on the same wifi as always, it just stopped working.
Im working on localhost so the code is not on github yet ¿how can i share the logs with you?
Are you using a hosted database?
You can share the logs here. Please ensure no sensitive detail is included?
Can you also share with me the connection string format that you provided while creating the environment on your Acclerate project?