Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Network location provider at 'https://www.googleapis.com/' : Returned error code 403 in Webapp

I am using Geolocation.watchPosition() and I get the following error on callback

Network location provider at 'https://www.googleapis.com/' : Returned error code 403.

This seems to be only happening in chrome desktop browser. firefox seems to be fine. This is also just started happening today, I have never come across this error before within my web app using the Geolocation.watchPosition().

Update: bug https://bugs.chromium.org/p/chromium/issues/detail?id=753242

like image 939
jasan Avatar asked Dec 14 '16 08:12

jasan


3 Answers

This happened to me too. I had to enable location services on my Mac.

like image 112
Jarzka Avatar answered Oct 18 '22 08:10

Jarzka


After looking for an answer, I think there is something wrong with Google

I tried it with developers.google site

Safari: worked
Google Chrome: failed

Current location in developers.google also not working

like image 3
chinnawatp Avatar answered Oct 18 '22 07:10

chinnawatp


It is indeed a chrome issue, to get around it you have to check your developer dashboard and make sure that your API key has no warnings.

Also, you need to make sure that the proper usage restrictions are in place for the development phase:

This key is unrestricted. To prevent unauthorized use and quota theft, restrict your key. Key restriction lets you specify which web sites, IP addresses, or apps can use this key.

More information can be found here.

like image 1
Carlos_E. Avatar answered Oct 18 '22 09:10

Carlos_E.