Jovian-Experiments / Jovian-NixOS

Discussions: https://matrix.to/#/#Jovian-Experiments:matrix.org
https://jovian-experiments.github.io/Jovian-NixOS/
MIT License
499 stars 51 forks source link

Decky frontend fails to load #387

Open Faupi opened 2 months ago

Faupi commented 2 months ago

Possibly related to changes from #386, Decky frontend now builds with different chunk.js files, which makes the frontend of the plugin (tab in QAM and its configuration) fail to load. The backend along with decky plugins still load fine, but configuration UI is inaccessible as a whole.

NixOS + nixpkgs: unstable 00d80d13810dbfea8ab4ed1009b09100cca86ba8 (1/7/2024) System flake: https://github.com/Faupi/nixos-configs/tree/79231cc1dac3af2249b72ded53c3c0d4a6e772f4/nixos/cfgs/go Hardware: Lenovo Legion Go

Logs of decky loader service:

% journalctl -b -u decky-loader.service
Jul 04 00:23:34 go systemd[1]: Starting Steam Deck Plugin Loader...
Jul 04 00:23:35 go systemd[1]: Started Steam Deck Plugin Loader.
Jul 04 00:23:35 go decky-loader[1303]: [main][ERROR]: chown/chmod exited with a non-zero exit code
Jul 04 00:23:35 go decky-loader[1303]: [helpers][WARNING]: Failed to execute get_system_pythonpaths(): [Errno 2] No such file or directory: 'python3'
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: plugin_path: /home/faupi/.local/share/decky/plugins
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: import plugins from /home/faupi/.local/share/decky/plugins
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: found plugin: hhd-decky
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: Loaded Handheld Daemon
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: found plugin: protondb-decky
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: Loaded ProtonDB Badges
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: found plugin: decky-steamgriddb
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: Loaded SteamGridDB
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: found plugin: TabMaster
Jul 04 00:23:35 go decky-loader[1303]: [loader][INFO]: Loaded TabMaster
Jul 04 00:23:35 go decky-loader[1467]: chown: changing ownership of '/home/faupi/.local/share/decky/logs/hhd-decky/2024-07-04 00.23.35.log': Operation not permitted
Jul 04 00:23:35 go decky-loader[1475]: chown: changing ownership of '/home/faupi/.local/share/decky/logs/hhd-decky/2024-07-04 00.23.35.log': Operation not permitted
Jul 04 00:23:45 go decky-loader[1303]: [loader][INFO]: Hot reload enabled
Jul 04 00:24:05 go decky-loader[1303]: [updater][INFO]: Updated remote version information
Jul 04 00:24:16 go decky-loader[1303]: [main][INFO]: Loading Decky frontend!
Jul 04 00:24:16 go decky-loader[1303]: [web_protocol][ERROR]: Unhandled exception
Jul 04 00:24:16 go decky-loader[1303]: Traceback (most recent call last):
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/qnlv489ma14dri3kpj82f9wrzp531f3h-python3-3.11.9-env/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 531, in start
Jul 04 00:24:16 go decky-loader[1303]:     resp, reset = await task
Jul 04 00:24:16 go decky-loader[1303]:                   ^^^^^^^^^^
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/qnlv489ma14dri3kpj82f9wrzp531f3h-python3-3.11.9-env/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
Jul 04 00:24:16 go decky-loader[1303]:     reset = await self.finish_response(request, resp, start_time)
Jul 04 00:24:16 go decky-loader[1303]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/qnlv489ma14dri3kpj82f9wrzp531f3h-python3-3.11.9-env/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 630, in finish_response
Jul 04 00:24:16 go decky-loader[1303]:     await prepare_meth(request)
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/qnlv489ma14dri3kpj82f9wrzp531f3h-python3-3.11.9-env/lib/python3.11/site-packages/aiohttp/web_fileresponse.py", line 153, in prepare
Jul 04 00:24:16 go decky-loader[1303]:     filepath, st, gzip = await loop.run_in_executor(
Jul 04 00:24:16 go decky-loader[1303]:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/concurrent/futures/thread.py", line 58, in run
Jul 04 00:24:16 go decky-loader[1303]:     result = self.fn(*self.args, **self.kwargs)
Jul 04 00:24:16 go decky-loader[1303]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/qnlv489ma14dri3kpj82f9wrzp531f3h-python3-3.11.9-env/lib/python3.11/site-packages/aiohttp/web_fileresponse.py", line 144, in _get_file_path_stat_and_gzip
Jul 04 00:24:16 go decky-loader[1303]:     return filepath, filepath.stat(), False
Jul 04 00:24:16 go decky-loader[1303]:                      ^^^^^^^^^^^^^^^
Jul 04 00:24:16 go decky-loader[1303]:   File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/pathlib.py", line 1013, in stat
Jul 04 00:24:16 go decky-loader[1303]:     return os.stat(self, follow_symlinks=follow_symlinks)
Jul 04 00:24:16 go decky-loader[1303]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 04 00:24:16 go decky-loader[1303]: FileNotFoundError: [Errno 2] No such file or directory: '/nix/store/dsk97hi1fqlxmiyarzkk4riw0jkhvs24-decky-loader-2.12.3/lib/decky-loader/src/../static/chunk-6238f864.js'

To see if it was an issue with the mentioned PR, I checked the older cached build I still had on my system: Older build (pre-386, you can still see the chunk-6238f864.js mentioned as not found in traceback):

% ls /nix/store/mybzhjra764qivi1f3ahp3kl9nr06k9l-decky-loader-2.12.3/lib/decky-loader/static -w100
chunk-0011e8d5.js  chunk-24629cdb.js  chunk-6238f864.js  chunk-88dafba6.js  chunk-fb1a119f.js
chunk-0cdfd0f2.js  chunk-3cf31948.js  chunk-675a8ac2.js  chunk-b3840d48.js  index.js
chunk-17e77101.js  chunk-466cd2e5.js  chunk-716ea64d.js  chunk-e4a1610d.js

New build (post-386):

% ls /nix/store/dsk97hi1fqlxmiyarzkk4riw0jkhvs24-decky-loader-2.12.3/lib/decky-loader/static -w100
chunk-00b6e60c.js  chunk-219d38ef.js  chunk-85dea9a4.js  chunk-b4f9f3fd.js  chunk-e58656b4.js
chunk-09ac2217.js  chunk-23a818d0.js  chunk-9d8160f5.js  chunk-c10d7146.js  index.js
chunk-0ba3a284.js  chunk-2f24be8d.js  chunk-a1810bee.js  chunk-c9d41843.js
K900 commented 2 months ago

Ugh, Steam caches that, and I guess the output is no longer deterministic. Try clearing the CEF cache, and we'll need a better solution...

Faupi commented 2 months ago

Tried removing appcache and depotcache from Steam directory as well as clearing the download cache in the client, but Decky frontend still points to that non-existent chunk file. Is there anything else I could potentially try? I have tried to dig into it for a few hours yesterday with no luck as I have practically zero experience with CEF and thelike.

K900 commented 2 months ago

Hmm, maybe we should just patch Decky to blow out the cache then...

Faupi commented 2 months ago

One thing maybe worth mentioning is that it seems that it's the Decky backend requesting that chunk from the frotend, which as I understand is the only part being built differently now, so maybe there's where that mismatch happens? At least it feels like the issue isn't really tied with the Steam client itself as much.

K900 commented 2 months ago

No, it's Steam requesting it.

bigsaltyfishes commented 2 months ago

Tried removing appcache and depotcache from Steam directory as well as clearing the download cache in the client, but Decky frontend still points to that non-existent chunk file. Is there anything else I could potentially try? I have tried to dig into it for a few hours yesterday with no luck as I have practically zero experience with CEF and thelike.

They are not CEF cache, cef cache is located at $HOME/.local/share/Steam/config/htmlcache, remove this folder to clear CEF cache, decky-loader will load correctly then.

Faupi commented 2 months ago

They are not CEF cache, cef cache is located at $HOME/.local/share/Steam/config/htmlcache, remove this folder to clear CEF cache, decky-loader will load correctly then.

Oh, awesome, that worked just fine! Thanks a ton, seems like a good workaround for the time being.