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 when running with Flutter Web #201

Open
MisterJimson opened this issue Mar 30, 2021 · 3 comments
Open

XMLHttpRequest Error when running with Flutter Web #201

MisterJimson opened this issue Mar 30, 2021 · 3 comments

Comments

@MisterJimson
Copy link

MisterJimson commented Mar 30, 2021

I've setup this project https://github.com/subfuzion/dart-flutter-fullstack-demo

Works great with macOS desktop, running the backend locally and on Google Cloud Run.

When I try with Flutter Web, both local and on Google Cloud I get error when making the request.

Google Cloud
Client error: XMLHttpRequest error

Local
Client error: XMLHttpRequest error
Backend error:

2021-03-30T09:27:16.234904  0:00:00.003117 OPTIONS [400] /
[BAD REQUEST] OPTIONS	/
Content-Type header is required. (400)
dart:isolate  _RawReceivePortImpl._handleMessage

Flutter Doctor

[✓] Flutter (Channel beta, 2.1.0-12.2.pre, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.3)
[✓] VS Code (version 1.54.3)
[✓] Connected device (4 available)
@MisterJimson
Copy link
Author

@subfuzion here is the related issue on this repo FYI

@jomiplaz
Copy link

jomiplaz commented Jul 9, 2021

Same problem

@jpeiffer
Copy link

jpeiffer commented Apr 19, 2022

I had this same problem and traced it back to CORS which the repo did not previously support. The CORS issue is documented in #201, and I am patiently awaiting on feedback for a fix via: #317.

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

No branches or pull requests

3 participants