XMLHttpRequest error #2641
Unanswered
huongtran84
asked this question in
Q&A
Replies: 2 comments
-
Hi @huongtran84 Sorry for the inconvenience. I might be wrong but It seems like a common problem with the flutter web. Have you considered disabling web security as indicated in this answer? Let me know if that resolves the issue. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
-
after I modified config file with added domain name, and HTTPS. It is resolved |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when I run my web flutter in debug mode ,Meilisearch is good working, but when I deploy web on firebase hosting ,throw exception
MeiliSearchApiError - message: XmlHttprequest error .I guess due to Cors policy ,
MeiliSearch live in DigitalOcean server
I modified firebase.json to:
{ "functions": { "source": "functions" }, "hosting": { "public": "build/web", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "headers": [ { "source": "*", "headers": [ { "key": "Access-Control-Allow-Origin", "value": "*" } ] } ] } }
I also did implement Reverse Proxy
but it did not help
here log:
Error: MeiliSearchApiError - message: XMLHttpRequest error.
at Object.throw_ [as throw] (http://localhost:62788/dart_sdk.js:5080:11)
at http_request_impl.HttpRequestImpl.new.throwException (http://localhost:62788/packages/meilisearch/src/http_request_impl.dart.lib.js:139:19)
at http_request_impl.HttpRequestImpl.new.postMethod (http://localhost:62788/packages/meilisearch/src/http_request_impl.dart.lib.js:86:67)
at postMethod.throw ()
at http://localhost:62788/dart_sdk.js:40646:38
at _RootZone.runBinary (http://localhost:62788/dart_sdk.js:40515:59)
at _FutureListener.thenAwait.handleError (http://localhost:62788/dart_sdk.js:35449:33)
at handleError (http://localhost:62788/dart_sdk.js:36015:51)
at _Future._propagateToListeners (http://localhost:62788/dart_sdk.js:36041:17)
at [_completeError] (http://localhost:62788/dart_sdk.js:35878:23)
at [_completeError] (http://localhost:62788/dart_sdk.js:35358:36)
at _SyncCompleter.new.completeError (http://localhost:62788/dart_sdk.js:35282:29)
at onError (http://localhost:62788/dart_sdk.js:35122:49)
at _RootZone.runBinary (http://localhost:62788/dart_sdk.js:40515:59)
at _FutureListener.then.handleError (http://localhost:62788/dart_sdk.js:35449:33)
at handleError (http://localhost:62788/dart_sdk.js:36015:51)
at _Future._propagateToListeners (http://localhost:62788/dart_sdk.js:36041:17)
at [_completeError] (http://localhost:62788/dart_sdk.js:35878:23)
Beta Was this translation helpful? Give feedback.
All reactions