Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do when supabase start doesn't work - Bind for 0.0.0.0:54322 failed: port is already allocated and ERROR: schema "auth" does not exist #496

Closed
swyxio opened this issue Dec 8, 2023 · 1 comment

Comments

@swyxio
Copy link
Owner

swyxio commented Dec 8, 2023


slug: supabase-start-no-work
category: note

I recently fired up a supabase project and got two very strange errors:

Error 1:

$ npx supabase start
Error response from daemon: driver failed programming external connectivity on endpoint supabase_db_smol-talk-chatbot (4eaae0e477fcbd8f9df74f8f46627b690e012c79039e6e66b8f0fc944b2fdb4d): Bind for 0.0.0.0:54322 failed: port is already allocated

$ lsof -i :54322 
COMMAND  PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ssh     4806 swyx   19u  IPv4 0xf3b8f5efcf4d6aaf      0t0  TCP *:54322 

killing that process temporarily solves the problem, and then you run into the second error:

Error 2:

$ npx supabase start

v2.92.1: Pulling from supabase/gotrue
4060ece20d7a: Pull complete 
dda6468f98aa: Pull complete 
20ab543ed620: Pull complete 
1c6042e25d55: Pull complete 
53d6979e59b6: Pull complete 
Digest: sha256:c27d9c8f7aeebce818ec4943216cb05c6811cf03fd83186df9400fc89d69cc6b
Status: Downloaded newer image for public.ecr.aws/supabase/gotrue:v2.92.1
Applying migration 20230707053030_init.sql...
ERROR: schema "auth" does not exist (SQLSTATE 3F000)        
At statement 0: create table "public"."chats" (             
    "id" text not null,                                     
    "user_id" uuid null default auth.uid (),                
    "payload" jsonb                                         
)                                                    

what does it mean for supabase to NOT have an auth table? Especially on a previously working project? I tried adding auth.enabled to the config.toml but that didn't work.

The problem - 2 projects live

It took me a couple hours to figure out what was going on - I had TWO concurrently running supabase projects going on - despite having done a full system reset, somehow the docker container for the old project was still going. The clue was in the project name - which i had ignored - but shouldn't have.

image

fire it up and stop it:
image

Once I opened up the old project, ran supabase stop on that one, then went back to my current project, supabase start worked like a treat.

Putting this up because googling my errors didnt find this solution in other issues:

@swyxio swyxio closed this as completed Dec 8, 2023
@swyxio
Copy link
Owner Author

swyxio commented Feb 15, 2024

just validated that this became an issue again today, and added the 2 screenshots you now see to triple confirm that this happens repeatedly for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant