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
[web]: Http requests throw XMLHttpRequest error #57421
Comments
Check the debug console in your browser for more details on why the http request failed |
Hi @PixelToast |
I solved the issue |
@harshraj6982 please provide info on how the issue was solved before closing the issue. |
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs and the output of |
Here is the code that I'm trying to run :
Here is the error : Here's the o/p to [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [✓] Chrome - develop for the web [✗] Visual Studio - develop for Windows [✓] Android Studio (version 3.6) [✓] VS Code (version 1.45.1) [✓] Connected device (3 available) |
Just enable cors it will not throw this kind of error. I just forget to enable cors in my backend. |
hello I have same issue with flutter web. Could you let me know the solution in detail~? |
Which backend you are using in your project? |
Using firebase now. How could i fix it? Do you Let me know any tip? |
Then you should contact firebase support. |
I have cors enabled in django but still getting same error, please help |
I have got the same problem..can you show me how to enable cors? |
See this Q&A for some help in enabling CORS: |
@suragch I'm experiencing the same problem as well. I've taken a look at the link but it doesn't seem to be helpful for non-AWS backends. I'm currently using Google Cloud Platform's Compute Engine and Firebase on the server side and can't figure out how to enable CORS like @abumasum too. Would really appreciate any advice or help you can give. Thanks! |
I am getting the same error with php api so i add the php code these lines ;
There is no more error.It is enables CORS. I don't know what that is but i am gonna read the manuel. |
#Fixed Thank you so much. Did you read the manual? I suspect it too. |
It's simple for using API. Browsers HTTP is usually reserved access data from other domains. We call this CORS. So we can't use API without permission from this domain. If you are the host of this domain, you can set by following this https://enable-cors.org/server.html (It have many kind of server API). I hope it can help you all. If I miss understand, help me for improve my self. : ) |
Oh thank you! Very useful link. |
This comment was marked as spam.
This comment was marked as spam.
Thanks for sending me.
28 Haz 2021 Pzt 09:06 tarihinde exeptionerror ***@***.***>
şunu yazdı:
… All Possible Solution added [Solved] IN Flutter Web getting
‘XMLHttpRequest’ error while making HTTP call
<https://fluttercorner.com/flutter-web-getting-xmlhttprequest-error-while-making-http-call/>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#57421 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLOG3HPMCFI7GBTHICCFXDTVAGPVANCNFSM4NDJJGWQ>
.
|
edit both files etc/apache2/apache2.conf and add this to the end Header set Access-Control-Allow-Origin "*" then restart apache on terminal service apache2 restart |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Facing this issue on flutter web only, works fine on flutter mobile.
The text was updated successfully, but these errors were encountered: