Closed Bug 1215222 Opened 9 years ago Closed 8 years ago

Location is enabled but no permissions show up in Control Center

Categories

(Firefox :: Site Permissions, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox44 --- affected

People

(Reporter: liuche, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [fxprivacy])

Attachments

(1 file)

The location site setting permission doesn't show up in the control center, even if it is enabled/being shown in the webpage. Using google maps, the page shows the blue location dot (indicating location sharing) but it doesn't show up in the control center.
Whiteboard: [fxprivacy] [triage]
Priority: -- → P3
Whiteboard: [fxprivacy] [triage] → [fxprivacy]
I see the same information in Page Info dialog on this page ("Use default" is still checked for Access your location). The Control Center shows permissions only if it's set to a non-default value. But this looks like clearly wrong behavior, because if I reload the page after granting access it can still access location but it's still set as "Use default". Weird thing is that if I run this in the browser console: > Services.perms.testPermission(gBrowser.currentURI, "geo"); > 0 Which is Services.perms.UNKNOWN_ACTION So, why is Services.perms.testPermission geo permission returning unknown even when it's been granted?
(In reply to Brian Grinstead [:bgrins] from comment #1) > I see the same information in Page Info dialog on this page ("Use default" > is still checked for Access your location). The Control Center shows > permissions only if it's set to a non-default value. But this looks like > clearly wrong behavior, because if I reload the page after granting access > it can still access location but it's still set as "Use default". > > Weird thing is that if I run this in the browser console: > > > Services.perms.testPermission(gBrowser.currentURI, "geo"); > > 0 > > Which is Services.perms.UNKNOWN_ACTION > > So, why is Services.perms.testPermission geo permission returning unknown > even when it's been granted? Ehsan, should Services.perms.testPermission be returning something other than UNKNOWN_ACTION if a page is able to actively access geolocation? We need to make sure the frontend is able to show this state so a user can revoke the geolocation access.
Flags: needinfo?(ehsan)
See Also: → 1202143
I should note also that the geo access on the site persists across restarts
(In reply to Brian Grinstead [:bgrins] from comment #3) > I should note also that the geo access on the site persists across restarts Nevermind about that - google maps is just caching the location. Confirmed in PBM that it has to re-request when starting a new PB session
OK so MattN helped track this down a bit further, and it looks like this is related to Google Maps caching the location, so the permission manager doesn't seem to be involved at all.
Flags: needinfo?(ehsan)
What you're seeing is the expected behaviour due to Google doing it's own caching of the most recent location. If you run: `navigator.geolocation.getCurrentPosition(console.log.bind(console))` in the web console on Google Maps when it's not shown in the control center then it will ask for permission again so they don't actually have the permission. You can test the behaviour on a simpler test page to see that Google is caching the last location themselves: https://people.mozilla.org/~dolske/tmp/geoloc-new.html The reason the geolocation permission isn't showing in control center is because I believe you didn't "Always Share Location" which means you are only giving permission for the single request via navigator.geolocation.getCurrentPosition (or similar). The permission manager never even gets told about this request since it would provide no benefit as it's currently intended to work (for a single request). The FxPrivacy team talked about changing/unifying behaviour of our various content permissions as there are variations: per-API-request, per-session, per-document and until revoked (via the Always options). If we always use the permission manager it may reduce confusion but we can't do anything about pages caching info they got while they had permission. Note: It's also possible Google is using navigator.geolocation.watchPosition and perhaps that does use the permission manager but I assume it works the same as getCurrentPosition.
Does the above statement means `wont fix` or `works for me`?
Flags: needinfo?(MattN+bmo)
Closing this, as mentioned in bug 1214334 we're not going to implement an indicator for watchPosition for now.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(MattN+bmo)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: