-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BrowserHttpClientAdapter() error in web. #2282
Comments
flutter: 3.24.0 |
Could you share the resolved version of |
Hi bro, I also faced this error:
|
I'm getting the normal result using the example in the repo: https://github.com/cfug/dio/tree/main/example_flutter_app Could someone provide a standalone runnable minimal reproducible example? |
Here is the code where I am encountering the error: link to code. |
It looks like a Dart bug, filed dart-lang/sdk#56498. Meanwhile, a workaround could be: HttpClientAdapter makeHttpClientAdapter() {
final adapter = HttpClientAdapter() as BrowserHttpClientAdapter;
adapter.withCredentials = true;
return adapter;
} |
Package
dio
Version
5.6.0
Operating-System
Web
Adapter
Default Dio
Output of
flutter doctor -v
No response
Dart Version
3.5.0
Steps to Reproduce
BrowserHttpClientAdapter adapter = BrowserHttpClientAdapter();
adapter.withCredentials = true;
dio.httpClientAdapter = adapter;
Expected Result
no error and work well.
Actual Result
TypeError: Cannot read properties of undefined (reading 'new')
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ #0 fortex7/packages/fortexmobile/common/network/web/web_platform.dart.lib.js 18:57 createClientAdapter
in flutter 3.22.3, it work well
The text was updated successfully, but these errors were encountered: