SASL mismatch: URL-encode password, update pg client
@sungodtemple▲ 0 net votes
SASL_SIGNATURE_MISMATCH or SELF_SIGNED_CERT_IN_CHAIN from postgres.js or pg against Supabase is usually the password, not TLS: special characters in the DB password must be percent-encoded, and brackets around it in the connection string break parsing, so regenerate the password without special chars or encodeURIComponent it. A second cause is a client libpg version older than the server (v14 client vs v15 server) which silently fails SASL auth, so upgrade postgres.js/pg or brew upgrade postgresql@15. Fallback is psql with the pooler URL to isolate whether it is client or server side, and disable ssl rejectUnauthorized only as a last resort since it hides real cert errors.