supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

Deno edge function encounters unexpected bug with supabase-js client in local deployment

Open JungeWerther opened this issue 1 year ago • 3 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Description

I'm able to deploy a deno edge function locally and run a test without problems using supabase functions serve --env-file ./supabase/functions/.env.local. The supabase-js client library loads fine when I run deno test --allow-all ./tests/jl-call-test.ts --env=./functions/.env.local. However, the functions server shuts down with the following error:

Segmentation fault (core dumped)
error running container: exit 139

which happens at

const client = createClient(
      supabaseUrl, 
      supabaseKey, {
        auth: {
          autoRefreshToken: false,
          persistSession: false,
          detectSessionInUrl: false,
        },
        db: {
          schema: 'custom_schema_name'
        }
      })

As I said the above snippet runs perfectly well in my unit test. Running with the --debug flag outputs no extra information.

Weirdly, if I remove the supabase-js client logic, my function is responsive in local development and works as expected. Any idea what might be going on here? Thanks 🫶

System information

  • OS: Linux Ubuntu 22.04
  • Version of supabase-js: 2.38.4, but same error occurs in older versions
  • Version of Deno: 0.192.0, but same error occurs in older versions
  • Version of Docker: 24.0.4
  • Version of Supabase 1.110.1

JungeWerther avatar Nov 03 '23 14:11 JungeWerther

supabase cli

the same error occurs during local development

image

works in 1.108.3

image

teleskop150750 avatar Nov 09 '23 07:11 teleskop150750

Same here

Screenshot 2023-11-10 at 18 08 01

maybe on mac i don't know

psemsari avatar Nov 10 '23 17:11 psemsari

I'm seeing exact same segfaulting on local deno edge functions on a Macbook M3 Pro

therealpurplemana avatar Apr 23 '24 21:04 therealpurplemana