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

Channel subscriptions aren't working

Open arguiot opened this issue 1 year ago • 5 comments

Bug report

When using .onMessage, I'm able to observe changes, but not using .on(.all).

Describe the bug

Here's an example:

client.connect()
socket = client.channel(.column("event_id", value: String(id), table: "messages", schema: "public"))
socket?.on(.all, callback: { msg in
      print(msg.event, msg.payload) // Won't print
})
socket?.onMessage { msg in
    print(msg.event, msg.payload) // Will print
    return msg
}
socket?.subscribe()

arguiot avatar Mar 25 '23 16:03 arguiot

Yup I saw the same issue. Works fine for .on(.delete) or .on(.update), but .on(.all) doesn't work

joeldrotleff avatar Apr 21 '23 05:04 joeldrotleff

Did either of you find a fix or a way to circumvent the issue? I'm getting the same issue

peterloveland avatar Jun 20 '23 19:06 peterloveland

I believe this might be related to Row Level Security

arguiot avatar Jun 20 '23 19:06 arguiot

I haven't worked on this project in a while (was just hacking around to try supabase out), but iirc I didn't find any fix for this issue. This and other issues drove me back to firebase lol

joeldrotleff avatar Jun 20 '23 22:06 joeldrotleff

has anyone figured this out?

malachif-jpg avatar Jun 23 '23 20:06 malachif-jpg