cli icon indicating copy to clipboard operation
cli copied to clipboard

Error Running Supabase Locally: Client.Timeout Exceeded While Awaiting Headers for /storage/v1/bucket

Open ensticks opened this issue 1 year ago • 4 comments

Describe the bug When running Supabase locally, I encounter the following error:

failed to execute http request: Get "http://127.0.0.1:54321/storage/v1/bucket": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

To Reproduce Steps to reproduce the behavior:

  1. Run supabase start

Expected behavior Local Supabase should start correctly without errors.

Screenshots N/A

System information Rerun the failing command with --create-ticket flag.

  • Ticket ID: 0ab3d240dd154a4d993a906bfd475c66
  • Version of OS: Ubuntu 22.04
  • Version of CLI: v1.183.5
  • Version of Docker: v27.0.3
  • Versions of services:
        SERVICE IMAGE      │      LOCAL       │ LINKED
  ─────────────────────────┼──────────────────┼─────────
    supabase/postgres      │ 15.1.1.61        │ -
    supabase/gotrue        │ v2.151.0         │ -
    postgrest/postgrest    │ v12.2.0          │ -
    supabase/realtime      │ v2.29.15         │ -
    supabase/storage-api   │ v1.0.6           │ -
    supabase/edge-runtime  │ v1.54.10         │ -
    supabase/studio        │ 20240701-05dfbec │ -
    supabase/postgres-meta │ v0.83.2          │ -
    supabase/logflare      │ 1.4.0            │ -
    supabase/supavisor     │ 1.1.56           │ -
    darthsim/imgproxy      │ v3.8.0           │ -

Additional context N/A

ensticks avatar Jul 20 '24 17:07 ensticks

Whats the command you use to start the services? Or to get supavisor running?

shawnmclean avatar Jul 22 '24 16:07 shawnmclean

Whats the command you use to start the services? Or to get supavisor running?

supabase start

ensticks avatar Jul 22 '24 16:07 ensticks

This is a strange error. May be you can try to isolate the issue by excluding the storage container from starting.

supabase start -x storage

sweatybridge avatar Aug 06 '24 20:08 sweatybridge

I am experiencing a similar issue on MacOS with CLI version 1.190.0, trying what @sweatybridge is suggesting npx supabase start -x storage resulted in the same behavior as OP (and same as without -x storage)

npx supabase start -x storage
WARNING: You are running different service versions locally than your linked project:
supabase/storage-api:v1.10.1 => v1.10.3
Run supabase link to update them.
Seeding globals from roles.sql...
Applying migration 20230718010725_ ... (truncated)
Seeding data from seed.sql...
WARNING: analytics requires mounting default docker socket: /var/run/docker.sock
Stopping containers...
failed to execute http request: Get "http://127.0.0.1:54321/storage/v1/bucket": net/http: HTTP/1.x transport connection broken: malformed HTTP response "{\"type\":\"Tier1\",\"version\":\"1.0\"}"

Linking my issue for possible duplicate https://github.com/supabase/cli/issues/3265

petercsiba avatar Aug 23 '24 16:08 petercsiba

any fix to this? this started happening spontaneously and it's stopping the whole development cycle for me. nothing related to supabase local is working.

eRuaro avatar Jul 24 '25 14:07 eRuaro

Seeing this sporadically on macOS with CLI 2.36.1.

philipbel avatar Aug 17 '25 16:08 philipbel

Also getting this issue, same as #3265, pretty consistently in the past week. Sometimes everything will work fine for hours, sometimes the api starts hanging within a few minutes. I'm on macOS Sequoia with cli version 2.40.7. The issue happens using both pnpx supabase start, pnpx supabase db reset or using homebrew supabase start, supabase db reset. Stopping supabase with --no-backup also has no effect.

Doing a full restart of my mac usually fixes the issue temporarily, but the best solution i've found is changing the api port from port = 54321 to another port, such as port = 54310 in config.toml. Everything behaves as expected after changing the port and doing a supabase stop --no-backup and supabase start.

I don't think the problem has anything to do with the storage even though that's where the timeout is occurring. I can run pnpx supabase db start which finishes successfully, but anything trying to hit the api hangs forever until I change the port. I have a windows machine I also use and randomly get the timeout error, but a simple supabase stop and start fixes it, so I assume it's the api port being blocked on mac for whatever reason.

johnagil avatar Sep 15 '25 15:09 johnagil