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.02k stars 201 forks source link

Supabase Local Docker fails to start on upgrade #2204

Closed Designibl-Mark closed 5 months ago

Designibl-Mark commented 5 months ago

Describe the bug I have recently upgraded from "^1.153.4" to "^1.162.4" in my Nextjs project and I can no longer use Supabase start.

Previously running supabase locally worked fine.

Now running supabase start --debug ends with the following:

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
2024/04/23 12:27:57 Sent Header: Host [api.moby.localhost]
2024/04/23 12:27:57 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/04/23 12:27:57 Send Done
2024/04/23 12:27:57 Recv First Byte
2024/04/23 12:27:57 PG Send: {"Type":"Terminate"}
Pruned containers: [a584119d8d23b17a7e0c3fd8d4f5886466b488dfe9305a38513e1dc8b0e3da96]
Pruned volumes: [supabase_db_email-interface supabase_config_email-interface]
Pruned network: [supabase_network_email-interface]
error running container: exit 1

To Reproduce Steps to reproduce the behavior:

  1. Update to Supabase CLI "^1.162.4"
  2. Run supabase start (debug flag optional)
  3. See error

Expected behavior supabase start to start the containers successfully and to be able to edit the local database through the local studio.

System information

Additional context

Designibl-Mark commented 5 months ago

Closing as managed to fix issue by deleting everything in the supabase/.temp folder.

sweatybridge commented 5 months ago

Good to know. You might also want to upgrade your hosted project through the dashboard because your postgres version is quite behind, ie. 15.1.0.52.