Firefox cannot determine location in Ubuntu 20.04

This only happens in Ubuntu, and only with Firefox; Chrome seems to be able to determine my current location (although slightly inaccurate). Is there any particular setting for Ubuntu to allow Firefox to determine the location properly?

Firefox does determine the location in my Mac, and Chrome does determine the location in Ubuntu, so it is something specific to Firefox in Ubuntu, which is strange since it comes installed by default and it's the default browser.

Any clue?

To try to reproduce this behavior, open https://www.google.com/maps/ and click on the location dot, allow location access when prompted.

In my case, it shows the following:

test


Solution 1:

Is GPS installed on your PC? If it is installed, then you might have not given the location permission to firefox and in case, you are getting a precise location in google-chrome without any GPS installed,that means you are using the same google account for any of your android phones as well as in google chrome.

Here, your google account is determining your location as per the location of your android phone.