Official chrome's guide on how to fetch user's geolocation from background service worker using offscreen document stopped working

328 views
Skip to first unread message

Stefan Markovic (Markoni)

unread,
Oct 10, 2025, 6:56:17 PMOct 10
to Chromium Extensions
Official chrome's guide on how to fetch user's geolocation from background service worker using offscreen document stopped working

https://developer.chrome.com/docs/extensions/how-to/web-platform/geolocation

It returns GeolocationPositionError with code:2 (POSITION_UNAVAILABLE)

Any solution for this?

Patrick Kettner

unread,
Oct 14, 2025, 12:06:05 PMOct 14
to Stefan Markovic (Markoni), Chromium Extensions
Hey Stefan! 
I am not able to replicate what you are seeing. Looking at the code, this happens when you don't have a valid geolocation provider for your device. 

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/98aa14ff-003e-4906-b0cb-d344132407fcn%40chromium.org.
Message has been deleted

Stefan Markovic (Markoni)

unread,
Oct 15, 2025, 4:14:07 PMOct 15
to Chromium Extensions, Patrick Kettner, Chromium Extensions, Stefan Markovic (Markoni)
Hi Patrick, I just realized the reason is that extension was deployed through GAC and some admins have turned off geolocation permission from there.
Case closed :)
Reply all
Reply to author
Forward
0 new messages