jwhitlow45 / free-loader

Plugin to provide notifications for and easy access to free games on the Steam store
Other
3 stars 1 forks source link

Notification spam when not connected to the internet #3

Closed LewdM3at closed 3 months ago

LewdM3at commented 4 months ago

When the steamdeck is not connected to the internet, the plugin will spam the notification that it cannot update the game list for like 20 times in a row. Even with notification turned off.

jwhitlow45 commented 4 months ago

I'm unable to replicate this behavior on the latest version of the plugin (1.2.0). I've tried manually checking for new games with WiFi off, manually checking for games with WiFi on but not connected to a network, and rebooting with WiFi off. Each time I only got a single notification that the games list failed to update. What circumstances are causing this to occur? Is it reproduceable, or just a one-off issue?

Logs would be particularly helpful in this instance. If you could upload a zip of the FreeLoader logs folder I may be able to diagnose why this happened. They are located at /home/deck/homebrew/logs/free-loader/.

I appreciate the PR, but I am hesitant to tie an error notification (Failed to update games list) to the "Notify on Free Games" option as a user with "Notify on Free Games" off wouldn't ever know if game list updates were failing. I think a better option would be a "silent mode" in which all notifications are disabled. This would be more in line with expected behavior.

I'm planning on working on a minor release this weekend to address some feedback I got on the most recent major release and will try to incorporate this feature as well.

LewdM3at commented 4 months ago

I'll try to get the log when I get back to my deck. Is it possible that the Error message gets stored up while the deck is asleep with no internet connection? And when you wake it up, the plugin shows the messages all at once? Though I still got that when setting the update frequency to 3 days, and the deck definitely hasn't been asleep for even a day.

LewdM3at commented 4 months ago

2024-03-18_00.04.21.zip Here's the log. Relevant line should be around 963. Is it maybe the daylight saving time in Europe? I notice some timestamp discrepancy in the logs. The plugin's internal clock seems to be an hour behind the actual time. Would explain why the plugin tries to immediately update the list again and again and again.

jwhitlow45 commented 4 months ago

I think your suspicion is correct, and I probably messed up some time logic when handling the last updated time leading to the continuous message spam, or possibly messed up the timer responsible for the periodic checks. Would you mind telling me what time zone you are in so I can attempt to replicate it on my machine?

I'll take a look at the code once I get some time after work tomorrow.

LewdM3at commented 4 months ago

I'm in UTC+01:00 In 3 days the problem is gonna fix itself if that really was the bug haha

jwhitlow45 commented 4 months ago

I changed my time zone to UTC+1 Central Europe but the issue does not occur even after a reboot and with no network. I'm planning to manually validate the code by hand tomorrow either way to be extra sure. In the meantime if you could try hitting "Clear Games Database", "Restore Settings", and then reinstalling the plugin to see if the issue persists? I'm starting to think something just ended up in a bad state and needs a reset.

Also, after double checking the way I'm utilizing the logger I'm not the one generating the timestamp. It's the default log timestamp from decky_plugin and I'm just calling their logger method. The log time discrepancy may actually be an issue with Decky Loader itself. I'll raise this issue in the Discord tomorrow and see if anyone working on SDH can do some digging since I'm not familiar with the code base.

Thanks for all the help so far!

jwhitlow45 commented 3 months ago

Closing due to inability to replicate, and issue appearing to stem from Decky Loader itself. Feel free to let me know if the issue is still occurring. Thanks.