Geoclue location query broken due to Mozilla service retirement

Geoclue is the default daemon in Fedora Workstation that looks up the geolocation for things like timezones, daylight savings, night light etc. It used to rely on the Mozilla geolocation service but that appears to have recently been retired. This causes an error when the system is trying to query the location:

fedora geoclue[1676]: Failed to query location: Query location SOUP error: Not Found

This means geolocation is now more or less broken in Fedora Workstation, it is likely that more user reports will trickle in over the coming period about incorrect location and timezone detection.

The Geoclue config offers Google location services as an alternative provider, yet it requires an API-key that can be generated with Google.

/etc/geoclue/geoclue.conf

# To use the Google geolocation service instead of Mozilla's, uncomment this URL
# while changing YOUR_KEY to your Google API key.
#
# WARNING: Please make sure that you are complying with the Google's ToS and
#          policies if you uncomment this:
#
# https://developers.google.com/maps/documentation/geolocation/policies
#
#url=https://www.googleapis.com/geolocation/v1/geolocate?key=

I generated an API key with Google and uncommented the line above, but it results in a 403-forbidden error:

fedora geoclue[1676]: Failed to query location: Query location SOUP error: Forbidden

Has anyone noticed the issues with geoclue yet, and perhaps tested with Google geolocation queries or have any other suggestions how to get geoclue working again?

2 Likes

Added geoclue

Being tracked here, 2284621 – Mozilla Location Service shutting down June 12

1 Like

I just noticed this issue. What can we do at the moment?

What i did is set my location to static for now. For this you can create a textfile /etc/geolocation containing your coordinates, e.g.:

50.12345   # latitude
5.12345    # longitude
5          # altitude
1          # accuracy radius 

Then in /etc/geoclue/geoclue.conf you can disable the geolocation options and enable the static location, e.g.:

# Enable WiFi source
enable=false

# Enable the static source
# If you make use of this source, you probably should disable other location
# sources in this file so they won't override the configured static location.
enable=true
1 Like

OK, thanks.