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 mobile and macOS apps receive data perfectly from the WebSocket server.
The Flutter mobile and macOS apps send data perfectly to the WebSocket server.
The Flutter web app doesn't work as expected
The Flutter web app receives data perfectly from the WebSocket server. This is great.
The Flutter web app doesn't send data to the WebSocket server. This is not good at all.
The Flutter web app is served by Apache under macOS Monterey.
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:
the data reaches the WebSocket server when sent from the Flutter mobile and macOS apps;
the data doesn't reach the WebSocket server when sent from the Flutter web app (this is a silent failure, without any warnings or errors).
My logs show the runtime type of the WebSocketChannel instance and I noticed two different types:
WebSocketChannel instance of IOWebSocketChannel for the Flutter mobile and desktop apps.
WebSocketChannel instance of minified:a5h for the Flutter web app. A search for minified:a5h doesn't produce any useful results.
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?
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:
IOWebSocketChannel
for the Flutter mobile and desktop apps.minified:a5h
for the Flutter web app. A search forminified:a5h
doesn't produce any useful results.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.