© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
5 replies
Giggiux

New Setup Realtime subscription not receiving data

Ok, so, I know that probably I'm doing something wrong, but the example I have is so simple that I cannot figure it out what I'm doing wrong.

I'm using the free tier Supabase Hosted;
Local SvelteKit frontend;

One extremely simple table, with realtime active and I've also added it to the publication as stated in the online guides:

begin;
  -- remove the supabase_realtime publication
  drop publication if exists supabase_realtime;

  -- re-create the supabase_realtime publication with no tables and only for insert
  create publication supabase_realtime with (publish = 'insert');
commit;

-- add a table to the publication
alter publication supabase_realtime add table "bars";
begin;
  -- remove the supabase_realtime publication
  drop publication if exists supabase_realtime;

  -- re-create the supabase_realtime publication with no tables and only for insert
  create publication supabase_realtime with (publish = 'insert');
commit;

-- add a table to the publication
alter publication supabase_realtime add table "bars";


I'm authenticated, but anyway if my RLS rules allow read to anyone (as I want)

BEGIN;
  ALTER POLICY "Enable read access for all users" ON "public"."bars" USING (true);
COMMIT;
BEGIN;
  ALTER POLICY "Enable read access for all users" ON "public"."bars" USING (true);
COMMIT;


And my code in SvelteKit looks like the following:

onMount(() => {
        const channel = supabase
            .channel('*')
            .on('postgres_changes', { event: '*', schema: 'public' }, (payload) => console.log(payload))
            .subscribe();
    });
onMount(() => {
        const channel = supabase
            .channel('*')
            .on('postgres_changes', { event: '*', schema: 'public' }, (payload) => console.log(payload))
            .subscribe();
    });



The WebSocket connects properly, but every time I update any row in the
bars
bars
table, nothing gets published to the client.

Can someone spot what am I missing? 😢
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 not receiving events
SupabaseSSupabase / help-and-questions
4y ago
React Realtime subscription not working
SupabaseSSupabase / help-and-questions
4y ago
join crashed realtime database subscription
SupabaseSSupabase / help-and-questions
5mo ago
realtime subscription reliability
SupabaseSSupabase / help-and-questions
7mo ago