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.07k stars 209 forks source link

`supabase start` fails to start #1780

Closed mrvdot closed 10 months ago

mrvdot commented 10 months ago

Describe the bug Running supabase start appears to start, then dies while waiting for health checks, specifically: service not healthy: [supabase_edge_runtime_provider-admin supabase_pg_meta_provider-admin supabase_studio_provider-admin]

To Reproduce Steps to reproduce the behavior:

  1. Install supabase-cli in package
  2. Run supabase start (have no functions written and have made no modifications to the config.toml)
  3. Get bunch of errors and then nothing:

Applying migration 20231215001013_remote_schema.sql...
Applying migration 20231215191715_remote_schema.sql...
Applying migration 20231215204722_remote_schema.sql...
Applying migration 20231218220951_remote_schema.sql...
Applying migration 20231218223334_remote_schema.sql...
Applying migration 20231219202153_remote_schema.sql...
Seeding data supabase/seed.sql...
supabase_edge_runtime_provider-admin container logs:

#
# Fatal error in , line 0
# Check failed: Start().
#
#
#
#FailureMessage Object: 0x7fff4e55b980Aborted (core dumped)
supabase_pg_meta_provider-admin container logs:
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7f7e4fb461ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f7e4fb46285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7f0cadd9c1ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f0cadd9c285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fcc338c41ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fcc338c4285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fbaf5b861ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fbaf5b86285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fbb1fbcf1ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fbb1fbcf285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fdd190831ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fdd19083285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fadabbbd1ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fadabbbd285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7f3feecac1ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f3feecac285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7ff38772e1ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7ff38772e285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
supabase_studio_provider-admin container logs:
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fde756371ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fde75637285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fdb2d1201ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fdb2d120285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7f6c0d9c61ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f6c0d9c6285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7f1aefbe51ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f1aefbe5285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7f27351c81ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f27351c8285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fb6ddfe61ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fb6ddfe6285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fa0bf3231ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fa0bf323285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb85bc0 node::Abort() [node]
 2: 0xb85c3e  [node]
 3: 0xbf30fe  [node]
 4: 0xbf31e1 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb438f3 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb43f4b node::Start(int, char**) [node]
 7: 0x7fce235911ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fce23591285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xac1f4e _start [node]
service not healthy: [supabase_edge_runtime_provider-admin supabase_pg_meta_provider-admin supabase_studio_provider-admin]
Try rerunning the command with --debug to troubleshoot the error.```

(See attached for log of running it with `--debug`)

**Expected behavior**

It to start and to be able to serve functions/etc

**Screenshots**
N/A

**Desktop (please complete the following information):**
 - OS: Ubuntu 22.04.3 LTS
 - Browser: N/A
 - Version of CLI: v.1.123.4
 - Version of supabase-js: N/A
 - Version of Node.js: v20.10.0

**Additional context**

Debug Log: [sb-start.log](https://github.com/supabase/cli/files/13766778/sb-start.log)
mrvdot commented 10 months ago

For a little extra context, I tested this with a brand-new repo / SB install, and same problem. I followed the steps at https://supabase.com/docs/guides/functions/quickstart and got the same error when I got to supabase start

mrvdot commented 10 months ago

I also tested after switching to Node v21 (latest) and Node v18 using nvm, and still same error. Didn't expect anything since SB uses docker, but wanted to rule it out anyway

mrvdot commented 10 months ago

After more digging, this appears to same as these issues:

Will try updating docker

mrvdot commented 10 months ago

Final note, updating docker to v24 fixed this (Ubuntu defaults to v20, and even though I was using Docker's official APT repo, it was never flagged for upgrade).

For anyone else who hits this, the TLDR is a combination of old Docker (#ThanksUbuntu), a seemingly innocuous update in Node 18, and relying on a base node image rather than pinning to a specific version all combined to cause everything to blow up.

Fix: Update Docker via steps at https://docs.docker.com/engine/install/ubuntu/