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

cors error #524

Open
christopher-jj-k opened this issue Sep 29, 2021 · 1 comment
Open

cors error #524

christopher-jj-k opened this issue Sep 29, 2021 · 1 comment

Comments

@christopher-jj-k
Copy link

My project was working fine last week and now I'm getting cors errors. I have been in contact with google technical support to ensure that my key is set up properly and I can make fetch calls to the library without cors issues as well. The errors I'm seeing output in my console is:

Uncaught (in promise) lf {message: 'loaderCB01632903299228 is not a function', name: 'InvalidValueError', stack: 'Error\n    at new lf (https://maps.googleapis.com/m…ons&v=3&language=en&onerror=ERROR_FUNCTION:309:44'}
Promise.then (async)
Xda @ js?key=AIzaSyB-j1r3ZhIXV9TYHC_gpGdlKT0vTkSbuy4&callback=loaderCB01632903299228&libraries=directions&v=3&language=en&onerror=ERROR_FUNCTION:309
google.maps.Load @ js?key=AIzaSyB-j1r3ZhIXV9TYHC_gpGdlKT0vTkSbuy4&callback=loaderCB01632903299228&libraries=directions&v=3&language=en&onerror=ERROR_FUNCTION:14
(anonymous) @ js?key=AIzaSyB-j1r3ZhIXV9TYHC_gpGdlKT0vTkSbuy4&callback=loaderCB01632903299228&libraries=directions&v=3&language=en&onerror=ERROR_FUNCTION:439
(anonymous) @ js?key=AIzaSyB-j1r3ZhIXV9TYHC_gpGdlKT0vTkSbuy4&callback=loaderCB01632903299228&libraries=directions&v=3&language=en&onerror=ERROR_FUNCTION:439
:3000/:1 Access to fetch at 'https://maps.googleapis.com/maps/api/js?key=AIzaSyB-j1r3ZhIXV9TYHC_gpGdlKT0vTkSbuy4&callback=loaderCB01632903299228&libraries=directions&v=3&language=en&onerror=ERROR_FUNCTION' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
index.js:1 GET https://maps.googleapis.com/maps/api/js?key=AIzaSyB-j1r3ZhIXV9TYHC_gpGdlKT0vTkSbuy4&callback=loaderCB01632903299228&libraries=directions&v=3&language=en&onerror=ERROR_FUNCTION net::ERR_FAILED 200
@christopher-jj-k
Copy link
Author

I rebuilt the project again and now its working? I don't understand what went wrong here. I downloaded my repository, ran npm install to download the node modules and then npm start as usual when it wasn't working. Where did I go wrong?

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

1 participant