[CLI] supabse link command stuck in authentication loop until fail due to time out
Describe the bug
I have a running supabase project, I want to link it with my local supabase instance with "npx supabase link
To Reproduce Steps to reproduce the behavior:
- Go to my root project folder, run "npx supabase init" -> "npx supabase start" -> My local supbase instance is up and running, accesscible via local supabase studio http://localhost:54323/project/default
- Run "npx supabase link --project-ref
--password --debug - The error is the supbase link command stuck in authentication loop until fail with context deadline exceeded
npx supabase link --project-ref
--password --debug
Supabase CLI 2.24.3 2025/06/13 14:02:29 HTTP GET: https://api.supabase.com/v1/projects/2025/06/13 14:02:29 HTTP GET: https://api.supabase.com/v1/projects/ /api-keys 2025/06/13 14:02:30 HTTP GET: https://api.supabase.com/v1/projects/ /config/storage 2025/06/13 14:02:30 HTTP GET: https://api.supabase.com/v1/projects/ /config/auth 2025/06/13 14:02:30 HTTP GET: https:// .supabase.co/auth/v1/health 2025/06/13 14:02:30 HTTP GET: https://api.supabase.com/v1/projects/ /postgrest 2025/06/13 14:02:30 HTTP GET: https://api.supabase.com/v1/projects/ /config/database/postgres 2025/06/13 14:02:30 HTTP GET: https:// .supabase.co/rest/v1/ 2025/06/13 14:02:30 HTTP GET: https://api.supabase.com/v1/projects/ /config/database/pooler Using connection pooler: postgresql://postgres. :[YOUR-PASSWORD]@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres Connecting to remote database... 2025/06/13 14:02:31 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres. "}} 2025/06/13 14:02:31 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2025/06/13 14:02:31 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=MsyCq0TdZFoqBm2mOqdeENDX"} 2025/06/13 14:02:31 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=MsyCq0TdZFoqBm2mOqdeENDXRU5nS1JsMTgrejFnYjQ4YSt3QjJzZDBEUUJldVpBPT0=,s=iQa69nUHcX9uTIHZmYSJZQ==,i=4096"} 2025/06/13 14:02:31 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=MsyCq0TdZFoqBm2mOqdeENDXRU5nS1JsMTgrejFnYjQ4YSt3QjJzZDBEUUJldVpBPT0=,p=e9gYhXN6qVv7pE4DjHH3dkGHwpOFp9pj00VNBwEV5Nk="} 2025/06/13 14:02:31 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=1DHtXzFIn/+qHw16/f/yb4CnELKnO39W59hdWgDr5I0="} 2025/06/13 14:02:31 PG Recv: {"Type":"AuthenticationOK"} 2025/06/13 14:02:41 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres. "}} 2025/06/13 14:02:41 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2025/06/13 14:02:41 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=arTI9ynZ1PJQ8UOHONOpLnuj"} 2025/06/13 14:02:41 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=arTI9ynZ1PJQ8UOHONOpLnujRUJ1Yzk5ayt2ZkR0UmdIS3puNkFycTFIZ29aSQ==,s=iQa69nUHcX9uTIHZmYSJZQ==,i=4096"} 2025/06/13 14:02:41 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=arTI9ynZ1PJQ8UOHONOpLnujRUJ1Yzk5ayt2ZkR0UmdIS3puNkFycTFIZ29aSQ==,p=64Nr5dYPSzuqSIId0+phmtB15B3uyLKUUTdt2aPZAp0="} 2025/06/13 14:02:41 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=ua58L8+tg2MGIYTyydfmmziLTT2aBnW/G7kQgdwusHA="} 2025/06/13 14:02:41 PG Recv: {"Type":"AuthenticationOK"} 2025/06/13 14:02:51 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres. "}} 2025/06/13 14:02:51 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2025/06/13 14:02:51 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=AfXKjdxI7ZvSUQIhKDOTRaC4"} 2025/06/13 14:02:51 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=AfXKjdxI7ZvSUQIhKDOTRaC4RUJJRnA0bGtnMndIeHRaUGFPMCtFSE9WMkIxag==,s=iQa69nUHcX9uTIHZmYSJZQ==,i=4096"} 2025/06/13 14:02:51 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=AfXKjdxI7ZvSUQIhKDOTRaC4RUJJRnA0bGtnMndIeHRaUGFPMCtFSE9WMkIxag==,p=rnct5vXr/SqsyrOV3qfiqH70ipRVeRZ7UsrYkSkupqo="} 2025/06/13 14:02:51 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=Cmt8vQZXd1ZI7uF1dFlYf4ZNT2d5APhM0Mc8Q/uXzKY="} 2025/06/13 14:02:51 PG Recv: {"Type":"AuthenticationOK"} 2025/06/13 14:03:01 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres. "}} 2025/06/13 14:03:01 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2025/06/13 14:03:01 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=Hemt/u3TJXpHwmrfMU+j4ef1"} 2025/06/13 14:03:01 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=Hemt/u3TJXpHwmrfMU+j4ef1RUJFRlYxdVdLSjM0VHZGdnAybzV4N1lEWUZkSVF3PT0=,s=iQa69nUHcX9uTIHZmYSJZQ==,i=4096"} 2025/06/13 14:03:01 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=Hemt/u3TJXpHwmrfMU+j4ef1RUJFRlYxdVdLSjM0VHZGdnAybzV4N1lEWUZkSVF3PT0=,p=bFb36Q+U07kJuP5Fr6L6BistymG3WuhZJ9EeceIF1Os="} 2025/06/13 14:03:01 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=OFF40l2GesDCmNeX7CuHBugUKBuKnxIaTZNCnJnBsOE="} 2025/06/13 14:03:01 PG Recv: {"Type":"AuthenticationOK"} 2025/06/13 14:03:11 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres. "}} 2025/06/13 14:03:11 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2025/06/13 14:03:11 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=Lv0PKYqtspBFTAWp0eUdAfgk"} 2025/06/13 14:03:11 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=Lv0PKYqtspBFTAWp0eUdAfgkRUoxb1lrRWdiMTM1cm9aWUNPRDRWSThCOHdPZkJBPT0=,s=iQa69nUHcX9uTIHZmYSJZQ==,i=4096"} 2025/06/13 14:03:11 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=Lv0PKYqtspBFTAWp0eUdAfgkRUoxb1lrRWdiMTM1cm9aWUNPRDRWSThCOHdPZkJBPT0=,p=fG6+tyXj4vYo/0XGu+laU7Um7Z7Qs8Xvr9XvayoWYtI="} 2025/06/13 14:03:11 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=RSPzCUFIqtthV4PqHuklLeOY6bMoIskx9QTBL4XyZrA="} 2025/06/13 14:03:11 PG Recv: {"Type":"AuthenticationOK"} 2025/06/13 14:03:21 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres. "}} 2025/06/13 14:03:21 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2025/06/13 14:03:21 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=hNPhXVZRDb10a4JtKqEvAWdt"} 2025/06/13 14:03:21 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=hNPhXVZRDb10a4JtKqEvAWdtRUN5T2NRUXFWZWRYQnZnVkVQcDNITDJWMklWag==,s=iQa69nUHcX9uTIHZmYSJZQ==,i=4096"} 2025/06/13 14:03:21 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=hNPhXVZRDb10a4JtKqEvAWdtRUN5T2NRUXFWZWRYQnZnVkVQcDNITDJWMklWag==,p=5VQFG74aJVBH8oXDZobe++Drnb2ZMcfYqwL22MKFMDg="} 2025/06/13 14:03:21 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=6psBn9TdfEOm2hPpXyovs5Q2UbhovM67t4OZ3LFaH0g="} 2025/06/13 14:03:21 PG Recv: {"Type":"AuthenticationOK"} failed to connect to postgres: failed to connect to host=aws-0-ap-southeast-1.pooler.supabase.com user=postgres.<project-id> database=postgres: failed to receive message (timeout: context deadline exceeded)
Expected behavior
I expect running "npx supabase link --project-ref
Screenshots If applicable, add screenshots to help explain your problem.
System information
Rerun the failing command with --create-ticket flag.
- Ticket ID: 455ef8c359c54b17907dfa3eff7919cf
- Version of OS: macOS 14.5
- Version of CLI: 2.24.3
- Version of Docker: 27.3.1
- Versions of services:
- SERVICE IMAGE | LOCAL | LINKED
------------------------|------------------------|--------
supabase/postgres | 15.8.1.085 | -
supabase/gotrue | v2.174.0 | -
postgrest/postgrest | v12.2.12 | -
supabase/realtime | v2.36.7 | -
supabase/storage-api | v1.23.0 | -
supabase/edge-runtime | v1.67.4 | -
supabase/studio | 2025.06.02-sha-8f2993d | -
supabase/postgres-meta | v0.89.3 | -
supabase/logflare | 1.12.0 | -
supabase/supavisor | 2.5.1 | -
Additional context If applicable, add any other context about the problem here.
- Version of supabase-CLI 2.24.3
- Version of Node.js v20.13.1