Repository navigation
Description
Bug report
supabase functions serve --workdir <dir> --env-file <file> fails immediately (~1-2s) with the generic, unhelpful error:
Setting up Edge Functions runtime...
{"_tag":"Error","error":{"code":"UnknownError","message":"An error occurred in Effect.tryPromise"}}
This reproduces 100% of the time, on every CLI version tested from 2.108.0 through 2.114.0 (current stable at time of filing). CLI 2.107.0 could not be tested cleanly because it fails to parse this project's config.toml ('config.config' has invalid keys: local_smtp — a schema key introduced after 2.107.0).
Environment
- OS: Linux (WSL2, Ubuntu 24.04 on Windows)
supabase --version: reproduces on 2.112.0 (installed release binary) and 2.114.0 (vianpx --yes supabase)- Local Supabase stack is otherwise fully healthy:
supabase start --workdir <dir>succeeds, all containers (db, auth, kong, rest, storage, studio, realtime, etc.) report healthy,psqlconnects fine. - Command:
supabase functions serve --workdir platforms --env-file .dev/supabase-functions.env(also reproduces with the flag omitted / with--no-verify-jwt/ with--dns-resolver native/ with--log-level all)
What I've ruled out
- Not a Docker problem:
docker run --rm -d --network <project_network> public.ecr.aws/supabase/edge-runtime:v1.74.3 ...starts fine directly — the image, network, and Docker daemon all work. - Not reached yet:
docker eventsshows zero container-create/start activity for anyedge_runtime-named container during the failedfunctions serverun — the crash happens before the CLI issues any Docker API call. - Not a temp-dir permissions issue: no relation found to the Windows-specific bug fixed in [bug] functions serve --env-file fails with 'An error occurred in Effect.tryPromise' (CLI 2.109.1) #5892 (PR fix(cli): ensure temp directory #5904,
TEMP/TMPpointing to a missing directory) — on this Linux box,/tmpis writable,TMPDIR/TEMP/TMPare all unset (so default resolution applies), and the project's own<workdir>/supabase/.temp/directory exists with correct ownership/permissions (0755, owned by the invoking user). - Not a DB/network/DNS issue: direct
psqlconnection to the local Postgres succeeds;--dns-resolver nativedoesn't change the outcome. - Not project-specific config: reproduces the same way regardless of
--no-verify-jwt.
What I couldn't determine
The CLI trace log (~/.supabase/traces/<date>.ndjson) shows the failing span is functions.startEdgeRuntimeContainer, but gives no further detail. --debug and --log-level all both print only the same generic wrapped error — there appears to be no way to see the actual underlying cause from the CLI's output. A day.js-adjacent audit of Docker activity (docker events) during the failure window shows nothing was ever attempted against the Docker API, suggesting the failure happens in a step before container creation is even requested (e.g. resolving image reference / project config / secrets needed to construct the container spec), but I don't have visibility into what that step is.
Ask
Could the underlying error be surfaced instead of the generic Effect.tryPromise wrapper, similar to the fix applied in #5904? Happy to provide more repro detail / run a debug build if that would help narrow this down.
Activity
deepshekhardas commentedon Aug 14, 2026
Hi maintainers! I've prepared a fix for this issue (PR #6197) — could you add the \open-for-contribution\ label so the PR can be accepted? Thanks!
fix(cli): surface setup errors (CLI-2187) (supabase#6191)