Skip to content

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

Open
@memishood

Description

@memishood

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrealtimeThis issue or pull request is related to realtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions