You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The FayeClient uses code 1001 when closing the web socket channel
This results in the exception below when running on Flutter Web. Error is reproduced in browsers Chrome, Edge, Firefox, and Safari.
html.dart:132 Uncaught (in promise) DOMException: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1001 is neither.
at http://localhost:59770/packages/web_socket_channel/src/copy/web_socket_impl.dart.lib.js:1356:33
at _RootZone.runGuarded (http://localhost:59770/dart_sdk.js:40331:11)
at sendDone (http://localhost:59770/dart_sdk.js:34212:24)
at [_sendDone] (http://localhost:59770/dart_sdk.js:34222:11)
at [_close] (http://localhost:59770/dart_sdk.js:34138:26)
at [_sendDone] (http://localhost:59770/dart_sdk.js:37129:36)
at [_sendDone] (http://localhost:59770/dart_sdk.js:37239:32)
at [_closeUnchecked] (http://localhost:59770/dart_sdk.js:36928:26)
at _SyncStreamController.new.close (http://localhost:59770/dart_sdk.js:36922:30)
at http://localhost:59770/packages/stream_channel/src/stream_channel_controller.dart.lib.js:1114:39
at _RootZone.runGuarded (http://localhost:59770/dart_sdk.js:40331:11)
at sendDone (http://localhost:59770/dart_sdk.js:34212:24)
at [_sendDone] (http://localhost:59770/dart_sdk.js:34222:11)
at [_close] (http://localhost:59770/dart_sdk.js:34138:26)
at [_sendDone] (http://localhost:59770/dart_sdk.js:37129:36)
at [_sendDone] (http://localhost:59770/dart_sdk.js:37239:32)
at [_closeUnchecked] (http://localhost:59770/dart_sdk.js:36928:26)
at _SyncStreamController.new.close (http://localhost:59770/dart_sdk.js:36922:30)
at _StreamSinkWrapper.new.close (http://localhost:59770/dart_sdk.js:37276:31)
at _GuaranteeSink.new.close (http://localhost:59770/packages/stream_channel/src/stream_channel_controller.dart.lib.js:1223:56)
at html$._HtmlWebSocketSink.new.close (http://localhost:59770/packages/async/src/delegate/stream_sink.dart.lib.js:43:29)
at html$._HtmlWebSocketSink.new.close (http://localhost:59770/packages/web_socket_channel/src/copy/web_socket_impl.dart.lib.js:1457:20)
at [_closeWebSocketChannel] (http://localhost:59770/packages/faye_dart/src/subscription.dart.lib.js:496:39)
at http://localhost:59770/packages/faye_dart/src/subscription.dart.lib.js:589:43
at http://localhost:59770/packages/faye_dart/src/subscription.dart.lib.js:695:30
at client.FayeClient.new.pipeThroughExtensions (http://localhost:59770/packages/faye_dart/src/extensible.dart.lib.js:46:47)
at [_receiveMessage] (http://localhost:59770/packages/faye_dart/src/subscription.dart.lib.js:689:12)
at [_onDataReceived] (http://localhost:59770/packages/faye_dart/src/subscription.dart.lib.js:528:30)
at _RootZone.runUnaryGuarded (http://localhost:59770/dart_sdk.js:40347:11)
at [_sendData] (http://localhost:59770/dart_sdk.js:34170:22)
at [_add] (http://localhost:59770/dart_sdk.js:34120:26)
at [_sendData] (http://localhost:59770/dart_sdk.js:37123:34)
at [_sendData] (http://localhost:59770/dart_sdk.js:37233:32)
at [_add] (http://localhost:59770/dart_sdk.js:36936:26)
at _SyncStreamController.new.add (http://localhost:59770/dart_sdk.js:36903:19)
at _RootZone.runUnaryGuarded (http://localhost:59770/dart_sdk.js:40347:11)
at [_sendData] (http://localhost:59770/dart_sdk.js:34170:22)
at [_add] (http://localhost:59770/dart_sdk.js:34120:26)
at [_sendData] (http://localhost:59770/dart_sdk.js:37123:34)
at [_sendData] (http://localhost:59770/dart_sdk.js:37233:32)
at [_add] (http://localhost:59770/dart_sdk.js:36936:26)
at _SyncStreamController.new.add (http://localhost:59770/dart_sdk.js:36903:19)
at _StreamSinkWrapper.new.add (http://localhost:59770/dart_sdk.js:37270:24)
at _GuaranteeSink.new.add (http://localhost:59770/packages/stream_channel/src/stream_channel_controller.dart.lib.js:1180:24)
at http://localhost:59770/packages/web_socket_channel/src/copy/web_socket_impl.dart.lib.js:1406:37
at Object._checkAndCall (http://localhost:59770/dart_sdk.js:5438:16)
at Object.dcall (http://localhost:59770/dart_sdk.js:5443:17)
at WebSocket.<anonymous> (http://localhost:59770/dart_sdk.js:109088:100)
The description matches the valid values in the WebSocket.close web api documentation here
Please make the close code configurable or use one in the valid range for web that is also compatible with the other platforms
What version of Flutter do you use?
Flutter version 3.3.3
What package are you using? What version?
package: faye_dart
version: 0.1.1+2
What platform is it about?
Android
iOS
Web
Windows
MacOS
Linux
ls
a copy of flutter doctor --verbose
$ flutter doctor --verbose
[✓] Flutter (Channel stable, 3.3.3, on macOS 12.6.1 21G217 darwin-x64, locale en-US)
• Flutter version 3.3.3 on channel stable at <redacted>/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18a827f393 (4 months ago), 2022-09-28 10:03:14 -0700
• Engine revision 5c984c26eb
• Dart version 2.18.2
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at <redacted>/Android/sdk
• Platform android-33, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14B47b
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• 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 11.0.10+0-b96-7281165)
[✓] IntelliJ IDEA Community Edition (version 2021.2.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.74.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (3 available)
• macOS (desktop) • macos • darwin-x64 • macOS 12.6.1 21G217 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.119
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Describe the bug
The FayeClient uses code
1001
when closing the web socket channelThis results in the exception below when running on Flutter Web. Error is reproduced in browsers Chrome, Edge, Firefox, and Safari.
The description matches the valid values in the
WebSocket.close
web api documentation herePlease make the close code configurable or use one in the valid range for web that is also compatible with the other platforms
What version of Flutter do you use?
Flutter version 3.3.3
What package are you using? What version?
package:
faye_dart
version:
0.1.1+2
What platform is it about?
ls
a copy of
flutter doctor --verbose
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Client disconnects without exception
Screenshots
see above
Logs
Run
flutter analyze
and attach any output of that command below.If there are any analysis errors, try resolving them before filing this issue.
Additional context
none
The text was updated successfully, but these errors were encountered: