realtime-js icon indicating copy to clipboard operation
realtime-js copied to clipboard

All subscriptions fail if publication not turned on for any table that is subscribed to.

Open yowzadave opened this issue 2 years ago • 1 comments

Bug report

If subscribing to multiple tables, and any of the subscribed tables does not have publication turned on, the subscription to all tables will fail, with no error being thrown.

To Reproduce

If I have two tables, cats and dogs, and I have only added cats to the publication, then do something like:

const channel = supabase
  .channel("test")
  .on(
    "postgres_changes",
    { event: "update", schema: "public", table: "cats" },
    (payload) => console.log(payload)
  )
  .on(
    "postgres_changes",
    { event: "update", schema: "public", table: "dogs" },
    (payload) => console.log(payload)
  )
  .subscribe();

...then no subscription events will be fired, regardless of whether the cats or dogs table has been updated.

No error is provided to indicate that the subscription has failed.

yowzadave avatar Mar 15 '23 22:03 yowzadave

@yowzadave thanks for the feedback here. will discuss this will the realtime team. cc/ @chasers

w3b6x9 avatar Sep 05 '23 21:09 w3b6x9