Location Services with javascript are not working in Brave

Description of the issue:
Geolocation services not available to web pages using javascript.

Steps to Reproduce (add as many as necessary): 1. 2. 3.

I saw other topics about this that were dismissed so i found an online test that is consistent and simple:

and

the second link will actually show the error being triggered

This occurs in in normal and private windows in a clean profile.

Actual Result (gifs and screenshots are welcome!):

The permission popup occurs. i allow. (the timeframe doesn’t matter)

navigator.geolocation gives a true result when called in javascript
if no error handling, there is no errors or indicators showing that navigator.geolocation.getCurrentPosition fails.

if the error is caught ā€œPOSITION_UNAVAILABLEā€ is the result.

Expected result:
Shows your Latitude and Longitude

works in chrome Version 131.0.6778.140 (Official Build) (64-bit)

Reproduces how often:
every time

Operating System and Brave Version(See the About Brave page in the main menu):
Windows 10
Brave Version 1.73.101 Chromium: 131.0.6778.139 (Official Build) (64-bit)

Additional Information:

Google maps in Brave will accurately geolocate my area

edit: added more detailed info

1 Like

@glypher,
This is working for me on both macOS and Windows 10 systems. Strange that Google Maps geo location works but the w3schools site does not.

Do you have any custom Shields settings configured for w3schools?

no i dont have any custom shields. like i said, new profile. i only discovered this because i was doing a custom website with geolocation using these techniques.

other sites that break:
https://mylocation.org/ -Browser geolocation test
https://www.gps-coordinates.net/my-location
https://gps-coordinates.org/my-location.php

basically any site that uses browser based geolocation.

again, this DOES work in my chrome browser and in firefox.

Now that im thinking about it, Google is probably using IP based Location, since it does not ask for browser location permissions.

NOTE: i know in firefox there are are super-advanced settings: ā€œabout:configā€ → geo.enabled [true/false]. which if set to false in firefox, mimics the Brave behavior.

I’m not sure if there are high-level settings i could check?

I’ll need to take a look over in the next few days, seems to a be regression

just curious if there are any suggestions

Hi glypher,

I don’t know if you still need this but I also encountered the same issue and this is my work around that works on my end.

First I tried to test my web app on Chrome since I’m having an error using it on Brave. Everything is working on Chrome.

I also tried to use [https://gps-coordinates.org] on Chrome, everthing is working fine, but not on Brave.

So here’s what I did:

  • On your computer, search the word ā€œLocationā€
  • Click Location privacy settings
  • On Location screen, turn on these settings:

Allow access to location on this device: Change to ON
Allow apps to access your location: ON
Allow desktop apps to access your location: ON

Here are some screenshots for more visual guide


This will turn on the Location settings on your computer

That’s all! I hope this help you and future users that might encounter this same issue.

1 Like

I am having the same problem. Fixing it on my computer will not work because it needs to work for other visitors to my site.
GeolocationPositionError {code: 2, message: ā€˜ā€™}

Are they working on a fix?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.