Skip to content

Offline Messages Not Sending Properly & Order Mismatch on Reconnect - stream_chat_persistence Issue #2106

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

Open
1 task done
workdevsto opened this issue Feb 12, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@workdevsto
Copy link

Which packages are you using?

stream_chat, stream_chat_persistance

On what platforms did you experience the issue?

iOS

What version are you using?

stream_chat_flutter: ^9.2.0+1
stream_chat_persistence: ^9.2.0

What happened?

When sending multiple messages in offline mode using Stream Chat, not all messages are sent when the network reconnects. Some messages are lost, while others appear out of order once they are delivered. This issue occurs despite using the Stream persistence client for offline support.

Steps to reproduce

1. Open the app and go to the chat screen.
2. Turn on aeroplane mode.
3. Send multiple messages while offline.
4. Turn off aeroplane mode and wait for messages to sync.
5. Observe that:
   - Some messages are not sent at all.
   - Messages that do get sent appear in a different order than they were originally sent.

Supporting info to reproduce

I have also tested the official source code of stream_chat_persistence, and I observed that the same issue persists there as well.

Images and video describing issue:

Image

Image

stream.mp4

Relevant log output

Flutter analyze output

Flutter doctor output

[✓] Flutter (Channel stable, 3.27.1, on macOS 15.0.1 24A348 darwin-arm64, locale en-IN)
    • Flutter version 3.27.1 on channel stable at /Volumes/Devsto Ex-3/flutter/sdk/3.27.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (8 weeks ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/devsto/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/devsto/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] Connected device (7 available)
    • iPhone 13 (mobile)              • 00008110-001A71CE3EEA201E • ios            • iOS 18.2.1 22C161
    • iPhone (mobile)                 • 00008110-00092D3A2E22801E • ios            • iOS 18.2 22C152
    • Dipak’s iPhone (mobile)         • 00008101-001108AC0C60001E • ios            • iOS 18.1.1 22B91
    • Devsto’s iPad (mobile)          • 00008030-00121C161A87C02E • ios            • iOS 18.3 22D63
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.0.1 24A348 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.0.1 24A348 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 133.0.6943.54

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@workdevsto workdevsto added the bug Something isn't working label Feb 12, 2025
Copy link

github-actions bot commented Mar 4, 2025

This issue is stale because it has been open for 20 days with no activity.

@github-actions github-actions bot added the Stale label Mar 4, 2025
@xsahil03x xsahil03x removed the Stale label Mar 4, 2025
Copy link

This issue is stale because it has been open for 20 days with no activity.

@github-actions github-actions bot added the Stale label Mar 24, 2025
@xsahil03x xsahil03x removed the Stale label Mar 24, 2025
Copy link

This issue is stale because it has been open for 20 days with no activity.

@github-actions github-actions bot added the Stale label Apr 14, 2025
@xsahil03x xsahil03x removed the Stale label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants