Google Maps does not have permission to use your location on MacOS
Categories
(Core :: DOM: Geolocation, enhancement)
Tracking
()
People
(Reporter: mossop, Assigned: handyman)
Details
Attachments
(2 files)
Whenever I try to use My Location or something in Google Maps it pops up a banner saying "Google Maps does not have permission to use your location.". Then when I look in the permissions drop-down it shows that "Access your location" is allowed and was last accessed a few seconds ago. It has been like this for quite a while.
This is Firefox Nightly running on macOS 14 (though it was certainly behaving this way on previous versions of the OS too).
Comment 1•1 year ago
|
||
happens to me too on stable release.
Comment 2•1 year ago
|
||
The severity field is not set for this bug.
:farre, could you have a look please?
For more information, please visit BugBot documentation.
Comment 3•1 year ago
|
||
I'm not entirely certain that this has got to do with the implementation of DOM: Geolocation, but maybe more with how permissions are displayed.
:mconley, I'm just reaching for someone with immense frontend knowledge here. Do you happen to have an idea?
Comment 4•1 year ago
|
||
I'm not entirely certain that this has got to do with the implementation of DOM: Geolocation, but maybe more with how permissions are displayed.
Hm, tell me more about this theory. I was able to reproduce, and just traced through what occurs here on the front-end. With the geolocation permission having been previously granted to the site, the permission request comes up through BrowserGlue here, and a prompt is created. The prompt, however, tells us that the permission is already granted for the site, and calls allow
on the underlying request.
I don't have a binary build available for me to check, but I presume we then eventually enter here in the content process after some IPC shenanigans, and actually allow the request.
I suspect what's actually happening here isn't a Firefox bug, but a Google Maps bug. I suspect Google Maps isn't correctly handling the case where the browser client (despite having permission from the user) cannot get a location fix from the OS. My suspicion is bolstered by the fact that I can reproduce this issue using Opera (see screenshot).
Comment 5•1 year ago
|
||
Reporter | ||
Comment 6•1 year ago
|
||
Ah. Turns out I had not given permission to Firefox to get the location from macOS. Perhaps there is some way we should flag this to the user?
Comment 7•1 year ago
|
||
The OS is supposed to pop up a permission dialogue the first time the browser tries to use geolocation, but maybe if you fail to pick something it kind of ends up in a weird state?
Reporter | ||
Comment 8•1 year ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #7)
The OS is supposed to pop up a permission dialogue the first time the browser tries to use geolocation, but maybe if you fail to pick something it kind of ends up in a weird state?
It's entirely possible it did the first time and I denied it. This would probably have been quite some time ago. When I went into the system settings the location setting for Nightly was off.
Comment 9•1 year ago
|
||
Gian-Carlo, we're thinking ghat this is an OS issue, where it becomes confusing if you've denied permission to use geolocation previously. It's still in this component but we should look into why our graceful fallback isn't working and what we could do to improve the weird state situation.
Comment 10•1 year ago
|
||
I'm being needinfo-ed here but I don't see a question. Given that the severity was reset, I'm completely unclear what you are expecting.
Assignee | ||
Comment 11•1 year ago
|
||
Quick experimentation suggests to me that geolocation isn't working at all on Mac when "Enable Location Services" is turned off in MacOS system permissions. When MacOS (or any platform) reports that geolocation is turned off (see CoreLocationLocationProvider
), we try to fall back to doing a lookup on MLS/GLS (using the NetworkGeolocationProvider
), which provides location based on characteristics of the local wifi environment . But we're getting rejection for every attempt. Without doing proper debugging, I believe this is us aborting geolocation when the user has blocked the permission, instead of falling back to MLS/GLS. (You can see the "Failed to acquire position" message in the browser console.) On Windows, we consider our doorhanger to be permission enough, so we allow MLS/GLS when the user has blocked geolocation in Windows settings. FYI, Windows will be blocking access needed for the fallback in this case in the next year, so we are putting together a plan to handle that. It will hopefully involve opening the right system settings for the user to toggle the system geolocation permission. We could remove the code above that aborts before trying MLS/GLS but that's not guaranteed to work. Otherwise, something like the plan for Windows might be warranted.
Just to be clear on STR:
- Make sure "Enable Location Services" is turned off in MacOS system preferences
- Launch Firefox
- Go to https://www.google.com/maps or use the MDN geolocation example or a similar site. Ignore any Fx doorhangers asking for location. If you have previously granted geolocation permission to the site with "do not ask again" then you will have to undo that first.
- Click the "Show Your Location" button
- Allow location access in the doorhanger that appears
Actual result: The web page reports that the location is blocked
Expected result: The web page shows the MLS/GLS-obtained location
Assignee | ||
Comment 12•1 year ago
|
||
Removing the error check enables me to get geolocation on my MacBook Pro with system location disabled, but the results are less accurate than they are on my Windows machine that is also using the fallback (by about 1/8 mi) for unknown reasons. The cause may just be less-accurate wifi scanning, although the difference seems extreme for that.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
FWIW I hit this error today on my new Mac and it was only because of this bug that I understood what was happening and went to find out where the set the permission in the OS. Apparently I had location services disabled for everything. I'm not sure what happened.
Assignee | ||
Comment 15•1 year ago
|
||
That makes the point that we do the fallback silently and the results are inherently lower quality than the system geolocation results -- it would be nice to find a way to let the user know this is happening.
Comment 16•1 year ago
|
||
Comment 17•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Comment 18•1 year ago
|
||
I have reproduced this issue in Release v122.0 and confirmed the fix in Beta v123.0b5 and Nightly v124.0a1 in MacOS 11. When the location is turned off in MacOS settings, the location is still provided in Google Maps "on characteristics of the local wifi environment".
Description
•