Repository navigation
fix(desktop): built-in browser denies geolocation on macOS instead of timing out - #26006
juliusmarminge wants to merge 4 commits into
Conversation
…n macOS Adds a failing test: with HostProcess.Platform set to darwin, both preview permission handlers must deny geolocation. The existing grant test is pinned to linux so it stays platform-independent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…timing out Electron cannot request macOS CoreLocation app authorization, so a granted geolocation request always hung to code 3 "Timeout expired". On darwin both permission handlers now deny geolocation, so pages get an immediate PERMISSION_DENIED. Other permissions and platforms are unchanged. Fixes #16589 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — macOS browser sessions will deny geolocation immediately rather than report permission granted and time out. Human confirmation is needed for this change to the browser’s default permission behavior. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
# Conflicts: # apps/desktop/src/preview/BrowserSession.test.ts # apps/desktop/src/preview/BrowserSession.ts
| }).pipe(Effect.provide(layer)), | ||
| ); | ||
|
|
||
| it.effect( |
There was a problem hiding this comment.
This duplicates the existing permission-handler test. Could you fold the macOS case into that test, parameterizing the platform and expected geolocation result?
Posted via Macroscope — Test Signal
|
The automated pipeline stopped on this pull request and will not merge it: the proof has no capture anyone can open:
It stays open for a person to finish or close. |
Problem
On macOS, a page in the desktop app's built-in browser sees
navigator.permissions.query({ name: "geolocation" })returngranted, butgetCurrentPosition()fails with code 3Timeout expiredafter 30 seconds.BrowserSessiongrantsgeolocationon every platform. On macOS, Chromium then waits for CoreLocation app authorization. Electron has no API to request that authorization, and the app bundle declares noNSLocationUsageDescription, so the request can only time out.Change
On darwin,
BrowserSessiondropsgeolocationfrom the preview's allowed permissions. Both the request handler and the check handler read that one derived set, so pages seedeniedand get an immediatePERMISSION_DENIED. The platform comes from the existingHostProcess.Platformreference. Other permissions, theopenExternalconfirmation, and Linux and Windows behaviour are unchanged.Scope and approval
Fixes #16589
Triaged via the automated issue flow.
Verification
vp test run apps/desktop/src/preview/BrowserSession.test.ts: 8 passed. The new testdenies geolocation on macOS, where Electron cannot request location authorizationprovidesHostProcess.Platformasdarwin. It fails on main withAssertionError: request handler should deny geolocation: expected true to be false. The existing grant test is pinned tolinux, so it still covers the unchanged platforms.vp run check:changed: format, lint, knip, typecheck, and tests all pass.A runtime check of Chromium's response to each handler policy, with Electron 44.9.3 on Linux under Xvfb, loading
https://example.com/and running the issue's snippet (driver, transcript):permissions.querygetCurrentPositiongranteddeniedUser denied Geolocationafter 5 msNo UI renders differently, so there are no screenshots.
cannot-verify macos: no macOS runtime was available. That macOS now reports
deniedand fails right away rather than after 30 seconds is inferred from the handler policy and the Linux check above.Claude Opus 5.5 (claude-opus-5-5) in Claude Code via T3 Code, with review from GPT-6.1-Sol in Codex.
🤖 Generated with Claude Code