Repository navigation
Description
What happened?
In the integrated desktop browser, navigator.permissions.query({ name: "geolocation" }) returns granted, but navigator.geolocation.getCurrentPosition() fails with code 3, Timeout expired, after 30 seconds.
This was reproduced on https://example.com/, with a secure context and a visible document. No login, bank account, or financial data is needed to reproduce the failure.
Steps to reproduce
- Open
https://example.com/in the integrated desktop browser. - Run the following in that page's console, or execute it through the preview evaluation tool and inspect the resulting console messages:
navigator.permissions.query({ name: "geolocation" })
.then(({ state }) => console.log("permission:", state));
navigator.geolocation.getCurrentPosition(
() => console.log("location: available"),
({ code, message }) => console.log("location error:", code, message),
{ enableHighAccuracy: true, maximumAge: 0, timeout: 30000 }
);The success callback deliberately logs no coordinates.
Observed result
permission: granted
location error: 3 Timeout expired
At the time of the reproduction, window.isSecureContext was true and document.visibilityState was visible.
Expected behavior
If desktop geolocation is supported, an authorized request should obtain a real position through a working location provider. Necessary user consent should be requested. If the capability is unavailable, the permission state and failure should communicate that clearly.
Environment
- macOS 26.5.1
- T3 Code Nightly 0.0.46-nightly.20261005.2689
- Electron 44.4.2
- Chromium 152.0.7977.130
- Local desktop browser host
Investigation and proposed scope
The installed application automatically grants geolocation through its preview permission request and check handlers. The same handler logic is present on upstream main at 3dfe373fddb966101371805b0b102ae5af75b15b:
| browserSession.setPermissionRequestHandler((_webContents, permission, callback) => { |
The installed macOS app bundle has no NSLocationUsageDescription, and the desktop processes have no GOOGLE_API_KEY environment variable. These are investigation clues; the timeout alone does not establish which provider or authorization path is failing.
Related PR: #8291. That proposal addresses automatic permission grants. This report establishes a location acquisition failure. Any fix should coordinate with that work and respect user consent.
Could maintainers triage whether real geolocation is intended to be supported in the desktop browser and confirm the preferred provider and authorization approach? A follow-up PR could then address that agreed scope with focused tests and a before/after real-position availability check that omits coordinates from the evidence.
Verified follow-up
The first-run macOS authorization path was reproduced separately from the bank. In an isolated Electron 44.4.2 app on macOS 26.5.1:
- The existing request/check handler behavior timed out after 30 seconds with macOS authorization still not determined.
- Adding
NSLocationUsageDescriptionalone produced the same timeout. - Requesting native CoreLocation authorization produced the macOS consent dialog. After user approval, a real position became available without
GOOGLE_API_KEY. - The actual modified T3
BrowserSessionand native bridge were then bundled into an isolated Electron app. Its first request changed macOS authorization from not determined to authorized and obtained a real position.
The probe recorded availability and authorization states only. It used https://example.com/, enableHighAccuracy: true, maximumAge: 0, and timeout: 30000.
Proposed focused fix: #16599. All 104 focused tests, affected-file lint/format checks, and desktop/scripts typechecks passed. The PR preserves the existing preview allowlist and checks it before requesting native authorization, including compatibility with the policy change proposed in #8291.
A complete signed T3 artifact and the BBVA login flow still need validation; the earlier bank HTTP 403 has not been established as a consequence of this geolocation defect.
Prepared with GPT-6.1-Sol using Codex in T3 Code.
Activity
theBrokenCat commentedon Nov 21, 2026
Retested on T3 Code (Beta)
0.1.11(Electron 44.10.1,Chromium 152.0.7977.169,macOS 27.2build26B123,arm64) usinghttps://example.com/:navigator.permissions.query({ name: "geolocation" })now initially returns"denied"(no longer auto-granted), and callinggetCurrentPosition()displays T3's new Allow/Block consent dialog.code: 3(Timeout expired) after10002 ms(timeout: 10000,enableHighAccuracy: true,maximumAge: 0), with no macOS CoreLocation prompt./Applications/T3 Code (Beta).app/Contents/Info.plistin0.1.11still does not declareNSLocationUsageDescription.Note that open PR #26006 targets the pre-#37866 handler in
apps/desktop/src/preview/BrowserSession.ts.