SteamDeckHomebrew / decky-loader

A plugin loader for the Steam Deck.
https://decky.xyz
GNU General Public License v2.0
4.68k stars 162 forks source link

[BUG] Frontend for plugin fails to load if network status changes while a plugin's frontend is being loaded #718

Open eXhumer opened 3 hours ago

eXhumer commented 3 hours ago

Please confirm

Bug Report Description

When the frontend for a plugin is being loaded and Steam Deck's network status changes, it will fail to load the frontend until you reboot.

This is hard to reproduce on demand as it only happens if the Steam Deck's network status changes while a plugin's frontend is being loaded, but enough reboots should make one or many plugins fail if the plugin was being loaded around the time network status changes while that plugin is being loaded.

image

Additional comment from @PartyWumpus in Discord, where I first reported the issue.

image

Expected Behaviour

No plugin loading issues while network status changes during plugin load time.

SteamOS version

SteamOS 3.6.19 Stable

Selected Update Channel

Stable

Decky Loader Version

v3.0.4-pre1

Plugin Info

  1. MagicPods (1.0.7)
  2. Storage Cleaner (1.4.0)
  3. Controller Tools (2.0.0)
  4. Wine Cellar (0.1.6)
  5. TabMaster (2.7.2)
  6. CSS Loader (2.1.2)
  7. Decky Recorder (0.4.1)
  8. MusicControl (1.1.6)
  9. PowerTools (2.0.3)
  10. SteamGridDB (1.5.1-loaderv2)
  11. steamdeck-input-disabler (1.0.2)
  12. Volume Mixer (1.2.1-1)
  13. CheatDeck (0.4.0)
  14. Shotty (0.1.0)
  15. ScreenshotUpdater (0.0.3)

Have you modified the read-only filesystem at any point?

No

Backend Logs

deckylog.txt

Used journalctl -b -1 -u plugin_loader.service > deckylog.txt to generate deckylog.txt as it happened on previous boot.

Frontend Logs

cef_log.previous.txt cef_log.txt

cef_log.previous.txt contains the errors, I rebooted to make sure the plugins work as expected on reboot.

PartyWumpus commented 3 hours ago

This is likely triggered on both legacy and esmodule plugins, so here https://github.com/SteamDeckHomebrew/decky-loader/blob/43f22329e1b2ca4f707e6c748ea9c013337de8b2/frontend/src/plugin-loader.tsx#L425 and here https://github.com/SteamDeckHomebrew/decky-loader/blob/43f22329e1b2ca4f707e6c748ea9c013337de8b2/frontend/src/plugin-loader.tsx#L437

I think the best solution is just retrying imports a few times if they failed.