Closed Bug 2033385 Opened 1 month ago Closed 1 month ago

Requesting the Geolocation now opens the system preferences on macOS since April 20th, 2026

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

defect
Points:
1

Tracking

(firefox-esr115 unaffected, firefox-esr140 unaffected, firefox150 unaffected, firefox151 fixed, firefox152 fixed)

RESOLVED FIXED
152 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox150 --- unaffected
firefox151 --- fixed
firefox152 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [webdriver:m20])

Attachments

(2 files)

In recent Puppeteer canary jobs a geolocation test seems to always timeout now:
https://github.com/puppeteer/puppeteer/actions/runs/24654349380/job/72084101159
https://github.com/puppeteer/puppeteer/actions/runs/24654349380/job/72084101069

This did not happen with any former jobs including Friday last week. Checking recent landings on mozilla-central I can see bug 2013135 which added some UX for geolocation permission requests only for macOS. I assume that this change most likely caused this regression.

I can see that there was as well a new preference geo.prompt.macos_use_not_determined added which might be used to workaround the issue, but why cannot we use dom.permissions.testing.enabled here as well to turn off the UX for testing? We added this pref last week to our code via bug 2031230.

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(mstange.moz)
Flags: needinfo?(krosylight)

dom.permissions.* pref is for Permissions API. We have geo.provider.testing that should ideally also cover this purpose.

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(mstange.moz)
Flags: needinfo?(krosylight)
Flags: needinfo?(davidp99)

i.e. with geo.provider.testing the Geolocation API should not request system permission prompt. (which is not the case now)

(But maybe there should be a general pref that blocks system permission prompt. We certainly want this for other permissions and it's not ideal to have separate prefs for all of them.)

(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #2)

i.e. with geo.provider.testing the Geolocation API should not request system permission prompt. (which is not the case now)

Well, we have that preference set to true in our recommended preferences and it explicitly states macOS dialogs. So why did we create a new preference to handle that scenario?

Is there a way to know what test was causing it to hang?

Tests use geo.prompt.open_system_prefs to disable the new UI (same pref that we've used for this on Windows for a long time). This is set in user.js here and here. Does it also then need to be set in RecommendedPreferences.sys.mjs? Do you know of any other places it might need to be fixed?

Flags: needinfo?(davidp99) → needinfo?(hskupin)

Yes, it's this test:
https://searchfox.org/firefox-main/rev/dab03896ede1413be148884e054b311767bcf1a0/remote/test/puppeteer/test/src/page.spec.ts#427

Simply change it( to it.only( and then run ./mach puppeteer-test to reproduce the timeout.

I checked with geo.prompt.open_system_prefs: false locally and it indeed fixes the problem. We do not see it in our WebDriver tests (as part of web-platform tests) because we set this pref to false at:

https://searchfox.org/firefox-main/rev/dab03896ede1413be148884e054b311767bcf1a0/testing/profiles/web-platform/user.js#108

That means that all of our external consumers of WebDriver on macOS will be affected as long as we do not set this preference in our recommended preferences for the Remote Protocol. As such we should clearly get it added and then uplifted to mozilla-beta to have it fixed for 151 as well.

Blocks: 1886512
Summary: Puppeteer test "[page.spec] Page Page.setGeolocation should work" is perma timing out on macOS since April 20th, 2026 → Requesting the Geolocation now opens the system preferences on macOS since April 20th, 2026
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Points: --- → 1
Priority: -- → P2
Whiteboard: [webdriver:m20]
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/667c368fe98a https://hg.mozilla.org/integration/autoland/rev/194e71366fc1 [remote] Do not open system settings when geolocation is requested without OS permission. r=jdescottes,saschanaz
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

Upstream CI jobs for Puppeteer are no longer failing for the geolocation tests. I'll uplift the patch.

Severity: -- → S3
Attachment #9572338 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: WebDriver tests that access geolocation on macOS may be blocked because the system settings panel opens when OS permissions have not yet been granted. This impacts not our own CI but every external consumer. It's a regression from bug 2013135.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Only adds a new preference that disables opening the system preferences panel.
  • String changes made/needed?: None
  • Is Android affected?: yes
Attachment #9572338 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
See Also: → 2033711
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: