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
{{ message }}
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.
...
onPressed: () {
DdpClient client =
DdpClient(xxx, xxx, xxx);
client.connect(); // Died on this line
},
This code works fine on mobile (IOS and Android), it does not work for web.
Here is the error message:
══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
js_primitives.dart:30 The following UnsupportedError was thrown while handling a gesture:
js_primitives.dart:30 Unsupported operation: Platform._version
js_primitives.dart:30
js_primitives.dart:30 When the exception was thrown, this was the stack:
js_primitives.dart:30 package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 194:49 throw_
js_primitives.dart:30 package:dart-sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart 284:5 _version
js_primitives.dart:30 package:dart-sdk/lib/io/platform_impl.dart 121:32 get version
js_primitives.dart:30 package:dart-sdk/lib/io/platform.dart 74:37 get _version
js_primitives.dart:30 package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/utils.dart 75:6 get
js_primitives.dart:30 package:dart-sdk/lib/io/platform.dart 231:32 get version
js_primitives.dart:30 package:dart-sdk/lib/_http/http_impl.dart 3234:26 _getHttpVersion
js_primitives.dart:30 package:dart-sdk/lib/_http/http_impl.dart 2071:22 new
js_primitives.dart:30 package:dart-sdk/lib/_http/http.dart 1473:18 new
js_primitives.dart:30 package:dart-sdk/lib/_http/websocket_impl.dart 993:45 get _httpClient
js_primitives.dart:30 package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/utils.dart 75:6 get
js_primitives.dart:30 package:dart-sdk/lib/_http/websocket_impl.dart 1046:8 connect
js_primitives.dart:30 package:dart-sdk/lib/_http/websocket.dart 380:22 connect
js_primitives.dart:30 package:ddp/ddp_client.dart 137:8 connect
...
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ddpClient.connect() cannot be run on the web.
This code works fine on mobile (IOS and Android), it does not work for web.
Here is the error message:
The text was updated successfully, but these errors were encountered: