jasan
jasan

Reputation: 12937

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

Upvotes: 51

Views: 26842

Answers (9)

Hamidreza Bahmani
Hamidreza Bahmani

Reputation: 1

in my case I blocked google to get my geolocation. After Delete it from black list I got response. chrome://settings/content/location Not allowed to see your location if still not worked ,you may need have VPN after all.

Upvotes: 0

Mohammad Noor
Mohammad Noor

Reputation: 85

Just restart Chrome (Force Quit), and it will work fine!

Upvotes: 1

V Jazz
V Jazz

Reputation: 51

In my case I reset my location permission to Ask(default) in chrome and after reload Allow the location and boom... , its worked.

Upvotes: 1

Jarzka
Jarzka

Reputation: 773

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

Upvotes: 6

Ferdinan Darmalim
Ferdinan Darmalim

Reputation: 39

I had the same issue where it is not working on Chrome. And then I found this link https://www.reddit.com/r/webdev/comments/3j8ipj/anyone_else_had_issues_with_the_html5_geolocation/

According to one of Reddit user, you need set to enableHighAccuracy to true. The code looks something like this

//Get current location    
if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(
                position => {
                    console.log(position.coords);
                },
                error => {
                    console.log("Error: ", error)
                },{ enableHighAccuracy: true });
}

Hope this helps.

Upvotes: 0

kiwicomb123
kiwicomb123

Reputation: 1680

This might be the answer you're looking for. 403 means you've reached your daily limit when using googleapis, I am getting the same problem on all my google software.

Source: https://developers.google.com/maps/documentation/geolocation/intro

Upvotes: 1

Sajjad Ali
Sajjad Ali

Reputation: 114

Currently there is might be an issue with google map API. I was also using google map API yesterday and it was not working as it should be. And then i started using this free plugin and it worked for me like a charm. http://www.geoplugin.com/

Upvotes: 0

Carlos_E.
Carlos_E.

Reputation: 680

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.

Upvotes: 1

chinnawatp
chinnawatp

Reputation: 1530

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

Upvotes: 3

Related Questions