Unable to connect to Supabase in Development: SSL Error

I've been searching through the drizzle docs, github issues, and this help thread and still have not been able to find any way to connect Drizzle with Supabase. I get SSL-related errors every time I try to use drizzle-kit push. When I use the suggested configuration in both the Supabase and Drizzle docs I get this error: Error: SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing When I add { ssl: 'require' } in my drizzle.config.ts or add ?sslmode=require to the end of my database url I inevitably get this error: Error: self-signed certificate in certificate chain When I download the certificate from Supabase, add it to a folder in my project (not checked into version control) and add a filepath environment variable and use fs to read the file in my drizzle.config.ts like so: ssl: { ca: fs.readFileSync(env.DATABASE_CA).toString() } I get this error: Error: SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing (Keep in mind I'm using an env.ts file to handle all my environment variable types, but I've checked using console.logs that they are being read correctly in my drizzle.config.ts file). I get that same error when I have SSL turned off in Supabase and I add this to my drizzle.config.ts: ssl: { rejectUnauthorized: false } I've checked out both these Github discussions for reference: - https://github.com/drizzle-team/drizzle-orm/discussions/881#discussioncomment-11876380 - https://github.com/drizzle-team/drizzle-orm/issues/831 I'm newbie to both Supabase and Drizzle, but even after scouring the docs and Github issues (and even using AI!) I can't get drizzle to connect to Supabase. I've tried a number of configurations but none of them work for me, including the suggestions made by others.
1 Reply
rockinriles
rockinrilesOP3w ago
Also: in my Supabase logs all of my requests are "authorized" or "authenticated" so this leads me to believe it is an issue with Drizzle.
No description

Did you find this page helpful?