SteamDeckHomebrew / decky-loader

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

[BUG] decky-loader doesn't install plugins #446

Closed metya closed 1 week ago

metya commented 1 year ago

Please confirm

Bug Report Description

I have a very strange bug.

I installed decky-loader within decky-installer.desktop and it seems to work, but the store isn't working properly - there are no pictures and the install button doesn't do anything. I noted that the website https://plugins.deckbrew.xyz/ doesn't work, but I can retrieve json from https://plugins.deckbrew.xyz/plugins, and even can retrieve files from cdn address like https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/968444702eaf59e1c107922a01d5028f07d4e4753a6f4f6aa2948b00e02a044f.zip for example.

When I try to install some plugin in the logs there are line about it.

May 08 16:36:21 steamdeck PluginLoader[54108]: [browser][INFO]: Installing Decky Cloud Save from URL (Version: 1.2.1)
May 08 16:36:21 steamdeck PluginLoader[54108]: [browser][DEBUG]: Fetching https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/968444702eaf59e1c107922a01d5028f07d4e4753a6f4f6aa2948b00e02a044f.zip

But nothing changes, and it seems that downloading doesn't happen, cause aiohttp_session is still open when you start to do something else, and it closes after that with a log like

May 08 16:34:35 steamdeck PluginLoader[47597]: [base_events][ERROR]: Unclosed client session
May 08 16:34:35 steamdeck PluginLoader[47597]: client_session: <aiohttp.client.ClientSession object at 0x7fe73522f610>

So nothing installs to the plugin's directory.

But if download the zip file manually and unzip it in that directory, that works as it should. A plugin is in the list and works properly.

Expected Behaviour

It should work just fine :)

SteamOS version

Steam OS 3.4.6 Stable

Selected Update Channel

Stable

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

No

Logs

deckylog.txt

metya commented 1 year ago

Now, when https://plugins.deckbrew.xyz/ is up, everything works properly. Installing and uninstalling plugins are working.

PartyWumpus commented 1 year ago

that's unusual, as the reason the store appeared to be down was because there was a plugin with zero versions, which breaks the web UI. But it shouldn't have affected the loader at all, so it's possible just restarting fixed it.

metya commented 1 year ago

No, I didn't restart Steam Deck, Steam OS, or Steam itself, and didn't exit from game mode. Just woke it up and checked. Or do you mean restarting the website? I noted that there was a plugin without a version, now this plugin is gone :)

dkettenm94 commented 1 year ago

I'm experiencing a similar issue. Several weeks ago I noticed that I can't seem to update or install any plugins anymore. I can go to the plugin store and scroll through the different plugins, but once I click on "Install", there is just nothing happening at all.

I thought it might just sort itself out, but unfortunately that wasn't the case. I uninstalled and reinstalled Decky Loader several times now, tried the stable and the prerelease version, but nothing appears to solve this problem.

here's a quick video: https://streamable.com/bq1t2s

does anyone know how to fix this?

Ur2slow1 commented 1 year ago

I'm experiencing a similar issue. Several weeks ago I noticed that I can't seem to update or install any plugins anymore. I can go to the plugin store and scroll through the different plugins, but once I click on "Install", there is just nothing happening at all.

I thought it might just sort itself out, but unfortunately that wasn't the case. I uninstalled and reinstalled Decky Loader several times now, tried the stable and the prerelease version, but nothing appears to solve this problem.

here's a quick video: https://streamable.com/bq1t2s

does anyone know how to fix this?

same issue installing works it just takes so long, took me 10 minutes to install powertools. It wasn't like that before it started after the latest steamos beta when deckyloader was spewing a bunch of errors rolled back to stable steamos and stable deckyloader and now installing plugins takes ages.

dkettenm94 commented 1 year ago

I'm experiencing a similar issue. Several weeks ago I noticed that I can't seem to update or install any plugins anymore. I can go to the plugin store and scroll through the different plugins, but once I click on "Install", there is just nothing happening at all. I thought it might just sort itself out, but unfortunately that wasn't the case. I uninstalled and reinstalled Decky Loader several times now, tried the stable and the prerelease version, but nothing appears to solve this problem. here's a quick video: https://streamable.com/bq1t2s does anyone know how to fix this?

same issue installing works it just takes so long, took me 10 minutes to install powertools. It wasn't like that before it started after the latest steamos beta when deckyloader was spewing a bunch of errors rolled back to stable steamos and stable deckyloader and now installing plugins takes ages.

wow, you're right. I just successfully installed PowerTools again, had to wait it out for like 5 minutes. still not perfect, but at least we can use Plugins. thanks for the tip!

NGnius commented 1 year ago

Instead of the download not happening, could it be a case of the download starting but being slow to complete (either due to DNs resolving slowly or just a large or slow download)?

metya commented 1 year ago

@NGnius I think it is a good assumption, cause if you start doing something else during installation, the session that downloads the plugin sends the connection-breaking error, so I think it is really trying to download. And eventually, it can be successful with some time.

deckynotworkingplsfix commented 1 year ago

I have made an account just for this, same problem, please fix it, is it maybe caused by having dual boot with refind or Cryobyte tools?

Cloudef commented 1 year ago

Having same issue EDIT: permission issue with plugins folder, it was not writable. Works now

TomiOrRon commented 1 year ago

Same problem, but the plugins page does not load

ekolis commented 1 year ago

I can't get to the plugins page anymore either. I just upgraded from 2.8.2 to 2.10.0, then to 2.10.1 - apparently there was some issue with the updater not working for prerelease versions until recently?

Tsoomer commented 1 year ago

Same issue, in addition the connection speed of installed plugins is also incredibly slow (like ProtonDB Badges taking very long to load, etc) and it also doesn't appear when I connect to the internet via Hotspot from my phone.

ILadis commented 1 year ago

I am also unable to install any plugins from the store.

Could it be that the plugins/ directory is not changed to being writeable? When looking at the logs I can see that the _install method gets to the "Unzipping..." part but not any further:

Jul 16 21:22:08 steamdeck PluginLoader[3563]: [browser][INFO]: Installing TS3 QuickAccess from URL (Version: 1.0.0-2de9315)
Jul 16 21:22:08 steamdeck PluginLoader[3563]: [browser][DEBUG]: Fetching https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/89d88>
Jul 16 21:22:08 steamdeck PluginLoader[3563]: [browser][DEBUG]: Got 200. Reading...
Jul 16 21:22:08 steamdeck PluginLoader[3563]: [browser][DEBUG]: Read 9120 bytes
Jul 16 21:22:08 steamdeck PluginLoader[3563]: [browser][DEBUG]: Unzipping...

The plugins/ directory is write protected:

drwxr-xr-x  7 deck deck 4.0K Jul  9 01:06 .
drwxr-xr-x 39 deck deck 4.0K Jul  9 00:23 ..
drwxr-xr-x  3 deck deck 4.0K Jul  9 01:06 data
drwxr-xr-x  3 deck deck 4.0K Jul  9 01:06 logs
dr-xr-xr-x  2 deck deck 4.0K Jul 16 21:11 plugins
drwxr-xr-x  2 deck deck 4.0K Jul  9 00:42 services
drwxr-xr-x  3 deck deck 4.0K Jul  9 17:15 setting

If I manually add write permissions the plugin installs just fine:

$ chmod +w -R plugins/
NGnius commented 1 year ago

A quick look through the code brought me to a place where the plugin base path is chmod-ed to 555, which removes write permissions for root (write is 2, read is 4). Presumably that was meant to be 755.

https://github.com/SteamDeckHomebrew/decky-loader/blob/main/backend/browser.py#L82

PartyWumpus commented 1 year ago

Looks like it's intended, was initially done over a year ago in https://github.com/SteamDeckHomebrew/decky-loader/pull/37 which explicitly says "Plugins are now owned by root and have read-only permissions.

https://github.com/SteamDeckHomebrew/decky-loader/blame/198591dbd7b0b6dd311ab9265d4cda4a733ee280/backend/browser.py#L45

ILadis commented 1 year ago

Ah, I need to mention that I am not running Decky under the root user. If I recall correctly root should be able to write to any files and folders. So this might be an issue only I am facing.

PartyWumpus commented 1 year ago

Ah right, that'll be your problem then. Should work mostly fine if you manually mess with file ownership and permissions, but the loader doesn't currently support being run as the user so you might come also across more issues later. EDIT: This has now been fixed, and decky should work fine if run as the user.

mdeguzis commented 2 months ago

Having a terrible time trying to install EmuDecky from ZIP. It notes "installed EmuDecky Dev" when I add it, but it never shows up... I see it in the file browser within ~/homebrew/plugins/EmuDecky, but not in Steam.

TrainDoctor commented 1 week ago

Stale issue.