lejard-h / google_maps_webservice

BSD 3-Clause "New" or "Revised" License
168 stars 219 forks source link

xmlHttpRequest Error #139

Open adnan-haider007 opened 2 years ago

adnan-haider007 commented 2 years ago

Hi i am using this project to get the places but it will give me the error which is.

  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 910:28                get current
packages/http/src/browser_client.dart 69:22                                                                                    <fn>
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 159: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 592: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 1288:7                                             <fn>
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 37301:58                              <fn>

    at Object.createErrorWithStack (http://localhost:50954/dart_sdk.js:5080:12)
    at Error._throw (http://localhost:50954/dart_sdk.js:20337:18)
    at Error.throwWithStackTrace (http://localhost:50954/dart_sdk.js:20334:18)
    at async._AsyncCallbackEntry.new.callback (http://localhost:50954/dart_sdk.js:40851:18)
    at Object._microtaskLoop (http://localhost:50954/dart_sdk.js:40708:13)
    at _startMicrotaskLoop (http://localhost:50954/dart_sdk.js:40714:13)
    at http://localhost:50954/dart_sdk.js:36191:9

i dont know why it give me this error :

flutter doctor :

C:\src\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.1826], locale en-US)
    • Flutter version 2.10.5 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (3 months ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

kindly look into this matter. i really appreciate that

programmingalex2019 commented 2 years ago

Hello :(

anything new on this ?

mario202k commented 1 year ago

Same here.

jay2jp commented 1 year ago

Im assuming you guys are using this on the web, the problem is the google maps autocomplete api does not allow for cors. https://stackoverflow.com/questions/61170862/xmlhttprequest-error-with-flutter-web-using-google-places-api-firebase-hosting