supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.09k stars 212 forks source link

503: name resolution failed in fresh project when creating user #76

Closed NixBiks closed 3 years ago

NixBiks commented 3 years ago

Bug report

Describe the bug

I'm getting 503 name resolution failed in fresh project when creating a new user

To Reproduce

Init a project with default settings/ports

supabase init

Start the containers

supabase start

Create a new user

curl --request POST \
  --url http://localhost:8000/auth/v1/admin/user \
  --header 'APIKey: <serviceKey>' \
  --header 'Authorization: Bearer <serviceKey>' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "john@doe.com",
    "name": "John Doe"
}'

Expected behavior

I'd expect code 200 and have a user created in the local database

System information

Additional information

If you give me some pointers then I'd like to contribute

NixBiks commented 3 years ago

God - it is http://localhost:8000/auth/v1/admin/users and not http://localhost:8000/auth/v1/admin/user. Now I can't replicate 503 anymore though

NixBiks commented 3 years ago

I just realized it's because auth and storage containers might crash on start since database is not ready yet. It's working if you just start them again but it shouldn't crash on start of course.

NixBiks commented 3 years ago

Gosh !! I had two installations of supabase cli. This happened in v0.5.0

Strajk commented 11 months ago

As this is a first result when Googling "name resolution failed supabase", the solution for me was found here

npx supabase stop --no-backup
npx supabase start
KnightOfNih commented 7 months ago

While this may not be the issue for this post, I did run into the "name resolution failed" error when trying to create a user from the local development dashboard. I had to go into the config.toml file and under "[auth]" change "enabled" to true.

[auth] enabled = true

This was for version 1.165.0