SupabaseS
Supabase4y ago
foci

WebSocket connection failed

Hi everyone,

I'm getting this error every second– and restarting our supabase instance has sadly not fixed this issue. browser.js:25 WebSocket connection to 'wss://{{project}}.supabase.co/realtime/v1/websocket?apikey={{apikey}}=1.0.0' failed:

The former error is referenced here but a restart seems to have fixed it for them (doesn't work for us): https://discord.com/channels/839993398554656828/839993398554656831/945765811124056144 .

Adding .subscribe((status) => console.log(status)); prints SUBSCRIPTION_ERROR. Investigating the realtime logs shows a lot of this in event messages Auth error: {:error, :signature_error} , and this in the context

{
        "application": "realtime",
        "domain": [
          "elixir"
        ],
        "file": "lib/realtime_web/channels/user_socket.ex",
        "function": "connect/3",
        "gl": "<0.2725.0>",
        "line": 72,
        "mfa": [
          "Elixir.RealtimeWeb.UserSocket",
          "connect",
          "3"
        ],
        "module": "Elixir.RealtimeWeb.UserSocket",
        "pid": "<0.10613.180>",
        "time": 1670314085517892,
        "vm": [
          {
            "node": "realtime-prod@fdaa:0:cc:a7b:92:9da3:1ea9:2"
          }
        ]
      }


Recent actions I took include creating a new table and setting its RLS policy, but this wasn't hit by our realtime in any way. None of the realtime code itself was changed since before observing the error.

I was on "@supabase/supabase-js": "1". I've upgraded to "@supabase/supabase-js": "1.35.7", same issue.

Pretty critical we get past this soon so any help at all would be a lifesaver. Thank you all
Was this page helpful?