JohnCoates / Aerial

Apple TV Aerial Screensaver for Mac
MIT License
20.75k stars 1.05k forks source link

Weather overlay location not updating in Sonoma 14.0 #1336

Closed stilwellweather closed 8 months ago

stilwellweather commented 9 months ago

General troubleshooting tips

Before logging an issue please check that:

If none of this fixes your issue, tell us about the problem you are experiencing or the feature you'd like to request.

Required information

In order to help us sort your issue, we ask that you provide the following information:

If appropriate, please enable Debug mode and Log to disk in Advanced tab and replicate your bug, then attach the AerialLog.txt file (You can access this file through the Advanced tab).

Description of issue / Feature request

Whenever I take my laptop to work, the location used for the weather overlay never updates.

I tried re-installing Aerial through Homebrew and the issue persisted.

I tried turning location services off and the program was still pulling a location for me - my home city.

After reviewing the log file (attached), it looks like Aerial is using cached location data rather than dynamically updating my location as it did under Ventura. AerialLog.txt

glouel commented 9 months ago

Hey @stilwellweather

Your log extract is from System Settings so it doesn't mean much. What you see in that precise case is that Aerial will only fetch those once per time it's launched. This is a local runtime cache that is hit in that instance.

There is however (I think, been a while I worked on this) a secondary cache where I store your last known location in preferences, this is a workaround for cases where your location may not be available.

There's a bunch of new restrictions for screensavers in Sonoma so it's quite possible that location services can't run when the screen saver is running and I missed that, but that's not what your log shows. I'll try to have another look but in general you want a log from the screensaver itself running, not under system settings (which has a different set of restrictions, I know, it doesn't make sense, but that's the way it works 😩).

I'll try to have a look and keep you posted.

glouel commented 9 months ago

Quick update, I think I can confirm that this is a new restriction. Usually allowing legacyScreenSaver to access your location was enough but for some reason it fails :

2023-10-05 19:39:56.151 : Starting Location initialization
2023-10-05 19:39:56.151 : Location services disabled
2023-10-05 19:39:56.151 : Couldn't retrieve your location, using latest cached coordinates instead

I'll try to dig a bit but it's just one more of these annoying restrictions. As a workaround in the meantime, if you use Aerial Companion, because it's unrestricted (providing you allow it to use your location, obviously, that's in system settings), it should be able to look up your location fine and the screensaver will use that later on.

stilwellweather commented 9 months ago

Can confirm Aerial Companion is able to access my location as I move around. Likely going to use that moving forward. Thanks for the tip!

stilwellweather commented 8 months ago

Spoke too soon - I'm seeing the same issue in the Aerial Companion log as well. Did the exact same troubleshooting steps and it's still pulling my work address rather than my home address.

Probably going to turn the overlay off for the time being and turn it back on if/when there's a solution. Thank you for looking into this! AerialUnderCompanionLog.txt

glouel commented 8 months ago

I think because it caches your location, it will only look it up again if you quit/restart Companion.

It's not great and I'll try to think of a workaround for this.

glouel commented 8 months ago

@stilwellweather i should have a workaround later today, would you have some time to give it a test ?

glouel commented 8 months ago

@stilwellweather

Afterwards location should work again. Please note though, weather is cached for 15 minutes between launches (this is to make sure we don't get kicked of the free weather forecast api). Let me know how it works for you.

stilwellweather commented 8 months ago

Sure thing!

stilwellweather commented 8 months ago

I'm remote today - I'll be able to report if the location automatically updates tomorrow. Thanks for jumping on this so quick!

stilwellweather commented 8 months ago

Looks like it's updating like it did pre-Sonoma. I work where three different municipalities overlap and it looks like the overlay is moving between the municipalities (which is normal behavior) like before. I'd consider this resolved.

glouel commented 8 months ago

Awesome, thanks for confirming ! there's a 15 mins delay between updates so it's possible if your commute is short you get the wrong location (and it was exactly the same before), but for 99.9% of the cases it should be fine !

Closing this, let me know if you still hit an issue, take care!