GetStream / stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
https://getstream.io/chat/sdk/flutter/
Other
906 stars 334 forks source link

In Flutter Web in debug mode after hot restart the web-socket connection isn't disposed #1969

Closed utopicnarwhal closed 1 month ago

utopicnarwhal commented 2 months ago

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

Web

What version are you using?

stream_chat_flutter: 7.2.2

What happened?

Flutter Web doesn't dispose the resources during the hot restart which leads to several open web socket connections in the background. Source: https://github.com/flutter/flutter/issues/69949

Steps to reproduce

1. Run any real stream chat project in Flutter Web
2. Open the Chrome developer tools in network tab and filter by web socket connections
3. Start any connection with the stream chat
4. Press the Flutter's "Hot restart" button
5. Open the chat again if it didn't automatically which creates the web socket
6. See two "pending" web socket connections in the developer tools
7. If you hot restart the app again — there are three web socket connections now

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

github-actions[bot] commented 1 month ago

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

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 7 days since being marked as stale.

utopicnarwhal commented 1 month ago

Do you think it worth somehow fix it on the core package somehow or at least mention the issue in the docs?