Skip to content
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

XMLHttpRequest error in flutter web #2026

Closed
Shahriyar13 opened this issue Nov 7, 2023 · 3 comments
Closed

XMLHttpRequest error in flutter web #2026

Shahriyar13 opened this issue Nov 7, 2023 · 3 comments

Comments

@Shahriyar13
Copy link

Shahriyar13 commented Nov 7, 2023

Package

dio

Version

5.3.3

Operating-System

Web

Output of flutter doctor -v

[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version 10.0.22621.2428], locale en-US)
    • Flutter version 3.13.6 on channel stable at C:\SDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (6 weeks ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\SDK\Android
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.106
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 115.0.1901.188

[√] Network resources
    • All expected network resources are available.

• No issues found!

Dart Version

3.1.3

Steps to Reproduce

It's works on iOS, macOS, Windows and Android successfully

Send a Post request from Web (Chrome)
Screenshot 2023-11-07 134816
Header:
{Content-Type: application/json, Accept: /, Access-Control-Allow-Origin: *, Access-Control-Allow-Credentials: true, Access-Control-Allow-Headers: Origin, Content-Type, X-Amz-Date, Authorization, X-Api-Key, X-Amz-Security-Token, locale, Cookie, X-CSRF-TOKEN, Accept
, X-XSRF-TOKEN, Access-Control-Allow-Origin, Access-Control-Allow-Methods: GET, POST, OPTIONS, DELETE, PUT}

Expected Result

Call API

Actual Result

DioExceptionType.connectionError
The connection errored: The XMLHttpRequest onError callback was called. This typically indicates an error on the network layer.
Screenshot 2023-11-07 135040

@Shahriyar13 Shahriyar13 added h: need triage This issue needs to be categorized s: bug Something isn't working labels Nov 7, 2023
@AlexV525
Copy link
Member

AlexV525 commented Nov 7, 2023

@AlexV525 AlexV525 closed this as completed Nov 9, 2023
@AlexV525 AlexV525 added i: not reading documents and removed h: need triage This issue needs to be categorized s: bug Something isn't working labels Nov 9, 2023
@Shahriyar13
Copy link
Author

I read documents and I applied everything in both server-side and flutter dio headers, but it's not fixed

@AlexV525
Copy link
Member

AlexV525 commented Nov 9, 2023

We can help investigate the issue if there is a minimal reproducible example that we can run. Before that, there was nothing we could do with the given info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants