ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseโ€ข4y agoโ€ข
20 replies
adarsh1021

Realtime event callback does not fire, but events are received in websocket messages

Hello! I have a very simple NextJS + Supabase setup, and I want to use the realtime feature to watch changes to a table.
Here is what I have:
useEffect(() => {

    const mySubscription = supabaseClient
        .from("item")
        .on("*", (payload) => {
          console.log(payload);
        })
        .subscribe();
    }

    return () => mySubscription.unsubscribe();

}, []);
useEffect(() => {

    const mySubscription = supabaseClient
        .from("item")
        .on("*", (payload) => {
          console.log(payload);
        })
        .subscribe();
    }

    return () => mySubscription.unsubscribe();

}, []);


The issue is that the callback does not fire - there is nothing on the console. But I can see every event received when I check the websocket messages through my inspect tools.

I am pretty new to Supabase, was trying to get something working for the #hackathon . I feel like this is something very small I am missing, any help would be greatly appreciated! Thanks ๐Ÿ™‚
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

Realtime Broadcast events are not received when sent from database trigger
SupabaseSSupabase / help-and-questions
8mo ago
Realtime updates not fired but available in websocket
SupabaseSSupabase / help-and-questions
4y ago
Realtime not receiving events
SupabaseSSupabase / help-and-questions
4y ago
Realtime Limit But not using Realtime
SupabaseSSupabase / help-and-questions
7d ago