Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Stream Behavior on Internet Disconnect Between Android and iOS #1071

Open
memishood opened this issue Oct 27, 2024 · 2 comments
Labels
bug Something isn't working realtime This issue or pull request is related to realtime

Comments

@memishood
Copy link

Describe the bug
I am using the supabase_flutter and listening for user changes from the users table. When the internet connection is lost on Android, the stream throws the following error:

RealtimeSubscribeException(status: RealtimeSubscribeStatus.channelError, details: RealtimeCloseEvent(code: 1002, reason: ))

However, when the internet connection is lost on iOS devices, no error is thrown, and no event is emitted. This results in inconsistent behavior between platforms, making it difficult to maintain accurate and synchronized results.

To Reproduce
Steps to reproduce the behavior:

  1. Listen any supabase table changes in the flutter app
  2. Disconnect the internet on an Android device and observe the error.
  3. Disconnect the internet on an iOS device and observe the lack of any response or error.

Expected behavior
On both Android and iOS, the stream should behave the same way when the internet connection is lost to ensure consistent behavior across platforms.

Version (please complete the following information):

dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"
│   ├── supabase_flutter...
│   ├── supabase_flutter...
│   ├── supabase_flutter...
│   ├── supabase_flutter...
│   ├── supabase_flutter...
│   ├── supabase_flutter...
│   ├── supabase_flutter...
│   └── supabase_flutter...
│   ├── supabase_flutter...
│   ├── supabase_flutter...
├── supabase_flutter 2.8.0
│   ├── supabase 2.5.0
│   │   ├── functions_client 2.4.0
│   │   ├── gotrue 2.10.0
│   │   ├── postgrest 2.3.0
│   │   ├── realtime_client 2.4.0
│   │   ├── storage_client 2.2.0

Additional context
Flutter version: 3.24.4
iOS device on testing: iPhone 14 Pro Max - iOS version: 18.0.1
Android device on testing: Xiaomi 13 Lite (Android 14)

@memishood memishood added the bug Something isn't working label Oct 27, 2024
@dshukertjr dshukertjr added the realtime This issue or pull request is related to realtime label Oct 28, 2024
@shubyaa
Copy link

shubyaa commented Nov 13, 2024

I have encountered this issue too. I am not sure why it happened in my case, but got the reason as RPC Call Error, does anyone knows why it happened, I tried it on android API level 32 and above

@JakesMD
Copy link

JakesMD commented Dec 10, 2024

Something similar is happening to me too.

When I launch my production web app from the Flutter CLI, no error is thrown when I turn off the internet. I still get real-time updates after I turn the internet back on (As I would expect).

However, when I open the production web app from the browser, the UI indicates an error and no longer receives updates after the internet connection is reestablished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working realtime This issue or pull request is related to realtime
Projects
None yet
Development

No branches or pull requests

4 participants