Supabase: db error: ERROR: unexpected response from login query
See original GitHub issueBug description
I am getting db error: ERROR: unexpected response from login query
when try to use supabase as database. This only happens when accessing an external database, while testing with a local database under docker worked perfectly.
How to reproduce
- Go to Supabase
- Create or login account
- Create an project
- Go to Database > Connection Pooling
- Scroll to bottom and copy Connection string
- Replace DATABASE_URL in environment variable
- Run
npx prisma migrate dev
- See error
Expected behavior
Prisma CLI executes the given commands without any error
Prisma information
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
username String?
}
Environment & setup
// .env
DATABASE_URL="postgresql://XXXX:XXXX@XXX.supabase.co:6543/XXX?pbbouncer=true"
Prisma Version
prisma : 3.1.1
@prisma/client : 3.1.1
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine c22652b7e418506fab23052d569b85d3aec4883f (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli c22652b7e418506fab23052d569b85d3aec4883f (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core c22652b7e418506fab23052d569b85d3aec4883f (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt c22652b7e418506fab23052d569b85d3aec4883f (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : c22652b7e418506fab23052d569b85d3aec4883f
Studio : 0.423.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (7 by maintainers)
Top Results From Across the Web
db error: FATAL: unexpected response from login query #14069
Create a database on supabase and use the url connection-string,; Run the yarn prisma generate command. Run the yarn prisma migrate dev command....
Read more >closing because: unexpected response from login query ...
Okay, so the issue was that I was trying to log in as one of the admin_users (aakashverma) but I hadn't mentioned them...
Read more >After resetting database, PgBouncer error unexpected ... - GitLab
After getting the database setup, they tried to implement pgbouncer again and are now seeing Pooler Error: unexpected response from login query ......
Read more >Supabase Documentation
supabase -js always returns a data object (for success), and an error response (for unsuccessful requests). This provides a simple interface to get...
Read more >instaloader.exceptions.connectionexception: login error: unexpected ...
I am getting db error: ERROR: unexpected response from login query when try to use supabase as database. This only happens when accessing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This helped me to resolve the issue! Many thanks!
Migration works on the port
5432
, but doesn’t work on6543
@janpio done