dart-lang / web_socket_channel

StreamChannel wrappers for WebSockets.
https://pub.dev/packages/web_socket_channel
BSD 3-Clause "New" or "Revised" License
423 stars 112 forks source link

WebSocketChannel instance of 'IOWebSocketChannel' on mobile and desktop, but 'minified:a5h' on web #217

Open farr64 opened 2 years ago

farr64 commented 2 years ago

I have a Flutter app that uses web_socket_channel: ^2.2.0 to create a WebSocketChannel instance which the Flutter app uses to receive and send data from/to a secure WebSocket server implemented in Node.js.

The Flutter app behaves differently under these cases:

The Flutter mobile and macOS apps work as expected (I haven't checked Linux or Windows)

The Flutter web app doesn't work as expected

My logs show that the Flutter app delivers the data to the specific function (within the app) that performs the .sink.add but then, somehow:

My logs show the runtime type of the WebSocketChannel instance and I noticed two different types:

Any ideas to be able to send data from the Flutter web app to the secure WebSocket server, just as the Flutter mobile and macOS apps do perfectly?

Has anyone actually implemented a Fluter web app that sends data to a secure WebSocket server?

Thanks.

bugrevealingbme commented 4 months ago

Is there still no solution to this problem?