© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
24 replies
Amit Mirgal

realtime websocket failed to connect

here is the code snippet,
side note RLS is enabled
import { RealtimeClient } from '@supabase/realtime-js'
const socket = new RealtimeClient(
  'wss://<project-ref-id>.supabase.co/realtime/v1'
)
socket.connect()
    const channel = socket.channel('public:user')
    channel.on(
      'postgres_changes',
      { event: '*', schema: 'public', table: 'user' },
      (e) => console.log('payload ', e)
    )
    channel.subscribe()
import { RealtimeClient } from '@supabase/realtime-js'
const socket = new RealtimeClient(
  'wss://<project-ref-id>.supabase.co/realtime/v1'
)
socket.connect()
    const channel = socket.channel('public:user')
    channel.on(
      'postgres_changes',
      { event: '*', schema: 'public', table: 'user' },
      (e) => console.log('payload ', e)
    )
    channel.subscribe()
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WebSocket connection failed
SupabaseSSupabase / help-and-questions
4y ago
WebSocket connection to failed problem?
SupabaseSSupabase / help-and-questions
8mo ago
Local: WebSocket connection failed
SupabaseSSupabase / help-and-questions
8mo ago
Realtime Connectivity
SupabaseSSupabase / help-and-questions
4y ago