Console: User denied Geolocation / Only secure origins are allowed (geolocation) / GeolocationPositionError code 1
navigator.geolocation failed because the user blocked location, the page is not on HTTPS, or the OS has location services off.
User denied GeolocationOnly secure origins are allowed (see: https://goo.gl/Y0ZkNV)PERMISSION_DENIED geolocationGeolocation permission has been blocked Meaning
The error object has a code: 1 PERMISSION_DENIED, 2 POSITION_UNAVAILABLE, 3 TIMEOUT. Chrome and others require a secure context for geolocation. Permission is remembered per site, so a past "Block" keeps failing until reset.
Common causes
- User clicked Block (saved for the site)
- Page served over HTTP, or an iframe without
allow="geolocation" - OS location services disabled for the browser
- Position unavailable indoors / no GPS or Wi-Fi data (code 2)
- Timeout too short (code 3)
⚡ Quick fix
- Serve the page over HTTPS and ask after a user action
- Reset the site permission (lock icon → Site settings → Location)
- Enable system location services for the browser
Detailed fix by platform
JavaScript
navigator.geolocation.getCurrentPosition(ok, err => console.log(err.code, err.message), { enableHighAccuracy: false, timeout: 10000 })
Windows
- Settings → Privacy & security → Location → on, and allow desktop apps
macOS
- System Settings → Privacy & Security → Location Services → browser on
How to diagnose
- Code — GeolocationPositionError code 1, 2 or 3?
- Context — HTTPS?
- OS — Location services on?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Aw, Snap! Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory
- captive portal Browser: This network requires you to sign in — captive portal (hotel, airport, café Wi-Fi) blocking HTTPS sites
- clipboard write blocked NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Document is not focused.
Most viewed in Browser
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026