Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] _download_remote_binaries_for_plugin_with_name seems to be broken #533

Open
4 tasks done
wheaney opened this issue Sep 5, 2023 · 1 comment
Open
4 tasks done
Labels
bug Something isn't working

Comments

@wheaney
Copy link
Contributor

wheaney commented Sep 5, 2023

Please confirm

  • I have searched existing issues
  • This issue is not a duplicate of an existing one
  • I have checked the common issues section in the readme file
  • I have attached logs to this bug report (failure to include logs will mean your issue may not be responded to).

Bug Report Description

Installing a plugin where the package.json file contains a remote_binary config seems to break the install.

See the attahced log. If it was a hash mismatch failure, it would have logged Fatal Error: Hash Mismatch for remote binary. The except case in helpers.py download_remote_binary_to_path unfortunately doesn't log any debug info, so that's where our failure is getting swallowed. I suspect it has something to do with these lines, either opening the ClientSession or the actual GET call to download the file:

            async with ClientSession() as client:
                res = await client.get(url, ssl=get_ssl_context())

After this, the installation never completes. My plugin and bin directories still have the 777 chmod flags set on them because it never completes.

Expected Behaviour

It should download the binaries, verify their hashes, and put them in the bin directory.

SteamOS version

SteamOS 3.4.10 Stable

Selected Update Channel

Stable

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

Yes

Logs

I set my log level to DEBUG, this is what I got (without all the inotify logs):

Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][INFO]: uninstalling XREAL Air Driver
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][INFO]:  at dir /home/deck/homebrew/plugins/decky-xrealAir
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: calling frontend unload for XREAL Air Driver
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: result of unload from UI: {'id': 1, 'result': {'result': {'type': 'undefined'}}}
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: Plugin XREAL Air Driver was found
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: Plugin XREAL Air Driver was stopped
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: Plugin XREAL Air Driver was removed from the dictionary
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: Removed any settings for plugin XREAL Air Driver
Sep 04 18:46:07 steamdeck PluginLoader[3939]: [browser][DEBUG]: removing files XREAL Air Driver
Sep 04 18:46:18 steamdeck PluginLoader[3939]: [browser][INFO]: Installing XREAL Air Driver from URL (Version: 0.1.2-7ad3e09)
Sep 04 18:46:18 steamdeck PluginLoader[3939]: [browser][DEBUG]: Fetching https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/de89cefa68a7ec662fb8a9b785cc86011f017aea8d3664969f0620608adff82c.zip
Sep 04 18:46:18 steamdeck PluginLoader[3939]: [base_events][ERROR]: Unclosed client session
Sep 04 18:46:18 steamdeck PluginLoader[3939]: client_session: <aiohttp.client.ClientSession object at 0x7f45e2417c10>
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [browser][DEBUG]: Got 200. Reading...
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [browser][DEBUG]: Read 47437 bytes
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [browser][DEBUG]: Unzipping...
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file created: /home/deck/homebrew/plugins/decky-xrealAir/main.py
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/main.py
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file created: /home/deck/homebrew/plugins/decky-xrealAir/dist/index.js
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file created: /home/deck/homebrew/plugins/decky-xrealAir/dist/index.js
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/dist/index.js
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/dist/index.js
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/main.py
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/dist/index.js
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/main.py
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/dist/index.js
Sep 04 18:46:20 steamdeck PluginLoader[3939]: [loader][DEBUG]: file modified: /home/deck/homebrew/plugins/decky-xrealAir/main.py
Sep 04 18:51:21 steamdeck PluginLoader[3939]: [browser][DEBUG]: Error Downloading Remote Binary xrealAirLinuxDriver.tar.gz@https://github.com/wheaney/xrealAirLinuxDriver/releases/download/0.3.2/xrealAirLinuxDriver.tar.gz with hash 02193b33ad5024af83706ccda4c7e6e6d5a31f5a3395713a4b867ac8fb9f025a to /home/deck/homebrew/plugins/decky-xrealAir/bin/xrealAirLinuxDriver.tar.gz
Sep 04 18:51:21 steamdeck PluginLoader[3939]: [browser][CRITICAL]: Failed Downloading Remote Binaries
@wheaney wheaney added the bug Something isn't working label Sep 5, 2023
@wheaney
Copy link
Contributor Author

wheaney commented Sep 5, 2023

With the CLI PR I submitted, I think this _download_remote_binaries_for_plugin_with_name code should be removed entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant