hrvojecukman / image_downloader_web

MIT License
3 stars 10 forks source link

Error: XMLHttpRequest error. #2

Open sardarvanshi opened 2 years ago

sardarvanshi commented 2 years ago

Launching lib\main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... This app is linked to the debug service: ws://127.0.0.1:57034/HPEnMuBs6W4=/ws Debug service listening on ws://127.0.0.1:57034/HPEnMuBs6W4=/ws

Running with sound null safety Debug service listening on ws://127.0.0.1:57034/HPEnMuBs6W4=/ws Flutter Web Bootstrap: Auto fetchPhotos: 200 Error: XMLHttpRequest error. C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 963:28 get current packages/http/src/browser_client.dart 69:22 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1685:54 runUnary C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 147:18 handleValue C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 766:44 handleValueCallback C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 795:13 _propagateToListeners C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 557:7 [_complete] C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/stream_pipe.dart 61:11 _cancelAndValue C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/stream.dart 1530:7 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14 _checkAndCall C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39 dcall C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/html/dart2js/html_dart2js.dart 37309:58

at Object.createErrorWithStack (http://localhost:56992/dart_sdk.js:5093:12)
at Error._throw (http://localhost:56992/dart_sdk.js:20399:18)
at Error.throwWithStackTrace (http://localhost:56992/dart_sdk.js:20396:18)
at async._AsyncCallbackEntry.new.callback (http://localhost:56992/dart_sdk.js:40921:18)
at Object._microtaskLoop (http://localhost:56992/dart_sdk.js:40778:13)
at _startMicrotaskLoop (http://localhost:56992/dart_sdk.js:40784:13)
at http://localhost:56992/dart_sdk.js:36261:9
9series-flutter commented 1 year ago

Same error getting

kakash commented 1 year ago

I am getting this error in debug. However, in production, i get error that anchor size is more than 2mb. Try downloading a small image to verify its same issue.

mudi256 commented 1 year ago

Google Cloud now has an inline editor to make this process even easier. No need to install anything on your local system. 1 ) Open the GCP console and start a cloud terminal session by clicking the >_ icon button in the top navbar. Or search for "cloud shell editor" in the search bar. 2) Click the pencil icon to open the editor, then create the cors.json file. 3) Run gsutil cors set cors.json gs://your-bucket 8ZlQ7