Skip to content

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

Closed as not planned

Description

@JungeWerther

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • 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

Activity

  1. added
    bug
    on Nov 3, 2023
  2. transferred this issue fromsupabase/supabaseon Nov 3, 2023
  3. teleskop150750 commented on Nov 9, 2023

    @teleskop150750

    supabase cli

    the same error occurs during local development

    image

    works in 1.108.3

    image

  4. psemsari commented on Nov 10, 2023

    @psemsari

    Same here

    Screenshot 2023-11-10 at 18 08 01

    maybe on mac i don't know

  5. therealpurplemana commented on Apr 23, 2024

    @therealpurplemana

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

  6. TopIvanAbramov commented on Mar 2, 2025

    @TopIvanAbramov

    See exactly the same error.
    Are there any solution?

    Running on macos m2 pro
    supabase cli version - 2.15.8

  7. mandarini commented on Nov 3, 2025

    @mandarini
    Contributor

    Can you all please try the latest version of supabase-js and let me know if that fixes your issue? We've made a ton of improvements in the latest versions!

  8. added
    retry with latest
    on Nov 3, 2025
  9. github-actions commented on Jan 11, 2026

    @github-actions
    Contributor

    This issue has been marked as stale. Please confirm if the issue still occurs with the latest SDK version.

    It will be closed in 30 days if no update is provided.

  10. github-actions commented on Feb 15, 2026

    @github-actions
    Contributor

    Closed due to inactivity. Please open a new issue if this still occurs with the latest SDK version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugretry with lateststale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions