fetch() call inside edge functions userWorker crashes on remote self-hosted server.

A fetch() or even a createClient() call in local development supabase environment works fine but on a remote self-hosted setup, these functions crash the supabase-edge-function container and cannot be caught in a try/catch.

The edge container starts a main edge function which creates a EdgeRuntime.userWorker and runs your function inside this worker.
I'm able to call fetch() or createClient() outside this UserWorker in the main serve() block however code inside the UserWorker environment causes these functions crash.

I've tried tweaking the UserWorker parameters but with no success.

To reproduce the code - create a new edge functions on a self hosted remote supabase server and call fetch() to any url.

I'm at a loss and hope someone can help.
Was this page helpful?