ably / ably-flutter

A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.
https://ably.com/download
Apache License 2.0
60 stars 16 forks source link

Fatal error after network connection issues #541

Open PawlikMichal25 opened 1 month ago

PawlikMichal25 commented 1 month ago

It seems to me you don't get notifications from closed issues, so I'm opening new one regarding https://github.com/ably/ably-flutter/issues/531#issuecomment-2273771451 because the bug is still not fixed

┆Issue is synchronized with this Jira Task by Unito

ttypic commented 1 month ago

Hey @PawlikMichal25,

Thank you for creating a new issue! I'm having some difficulty reproducing it. If possible, could you please enable verbose logging for Ably and attach the logs to the issue?

PawlikMichal25 commented 1 month ago

Have you followed these steps: https://github.com/ably/ably-flutter/issues/531#issue-2408956689 with newest version of Ably and not got any errors?

ttypic commented 1 month ago

Yes, I see. The fix currently only works for hot reloads; it doesn't apply to hot restarts because they recreate the app from scratch, and we rely on sequential IDs to sync listeners between the platform implementation and Dart code. Unfortunately, we’re unable to detect hot restarts to gracefully clean up listeners on the platform side. There is an open issue for this in the Flutter repo: https://github.com/flutter/flutter/issues/10437. We’ll work on refactoring the code to remove the need for sequential IDs for listeners, but I can't provide an ETA at this time. Since this issue only occurs during hot restarts in the development process, and the fix involves refactoring several parts of the codebase, it’s not currently a high-priority bug for us.