Replies: 3 comments 1 reply
-
|
Even if the errors aren't that helpful, can you share them? |
Beta Was this translation helpful? Give feedback.
-
|
These errors are de-obfuscated, and it's not perfect. Error 1: Error 2: This one is a bit weird. I have a suspicion it might be a library bug where a |
Beta Was this translation helpful? Give feedback.
-
|
I've spent a couple of weeks trying to figure this one out. I think I finally have enough debug info to make some guesses. I have a long-lived connection to synchronize data with the server. When the connection goes down, I re-subscribe and get whatever data I might have missed while it was down. The issue is happening on an Android tablet. I don't have enough data on the version running on JVM to determine if it happens there too. Heartbeats are received until Is it possible that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to keep about 20 tables in sync on device and server. What I have works most of the time, except if the app is left running over night, it's giving intermittent failures when the access token needs to be refreshed. I just add the
sessionStatuslistener. I got some errors logged from Realtime, but the stack traces don't include the calling location.supabase.auth.sessionStatus.collectLatest { sessionStatus -> if (sessionStatus is SessionStatus.Authenticated) { supabase.realtime.connect() supabase.realtime.status.collectLatest { status -> if (status == Realtime.Status.CONNECTED) { coroutineScope { val channel = supabase.realtime.channel("db-changes") try { tables.forEach { table -> channel.postgresChangeFlow<PostgresAction>(schema = "public") { this.table = table filter(FilterOperation("account_id", FilterOperator.EQ, accountId)) } .onEach { syncTable(table) } .launchIn(this) } channel.subscribe(true) syncAllTables() awaitCancellation() } finally { withContext(NonCancellable) { channel.unsubscribe() supabase.realtime.removeChannel(channel) supabase.realtime.disconnect() } } } } } } }Beta Was this translation helpful? Give feedback.
All reactions