-
Notifications
You must be signed in to change notification settings - Fork 15k
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
navigators Geolocation API returns error 400-2 #13143
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
@cwittenb Geolocation services are rate limited based on the |
@MarshallOfSound : Sorry for bothering, but I was expecting a 403 in case I hit the limit. Thanks for your help - adding an API key fixed it! |
Expected Behavior
navigator.geolocation.getCurrentPosition should return the position of the device used.
Actual behavior
If you try to get a devices location via the geolocation API, like:
navigator.geolocation.getCurrentPosition(function(r){console.log(r)}, function(e){console.log(e)});
It returns an error like this:
PositionError
{code: 2, message: "Network location provider at 'https://www.googleapis.com/' : Returned error code 400."}code: 2
message: "Network location provider at 'https://www.googleapis.com/' : Returned error code 400."
proto: PositionError
PERMISSION_DENIED: 1
POSITION_UNAVAILABLE: 2
TIMEOUT: 3
code: 2
message: "Network location provider at 'https://www.googleapis.com/' : Returned error code 400."
My network connection is fine, the same code works outside the electron container.
To Reproduce
Run the above in your electron dev console.
The text was updated successfully, but these errors were encountered: