From 310dd700ac4451cc21371201edeabb6cb1df5604 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 6 Feb 2025 12:11:38 -0500 Subject: fix: adtl remote binary error handling (cherry picked from commit 860b1ac835a4d7d32fb6488daf6a04ded5524fae) --- backend/decky_loader/browser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/decky_loader/browser.py b/backend/decky_loader/browser.py index 64ecfb78..c8ec122b 100644 --- a/backend/decky_loader/browser.py +++ b/backend/decky_loader/browser.py @@ -75,6 +75,8 @@ class PluginBrowser: packageJsonPath = path.join(pluginBasePath, 'package.json') pluginBinPath = path.join(pluginBasePath, 'bin') + logger.debug(f"Checking package.json at {packageJsonPath}") + if access(packageJsonPath, R_OK): with open(packageJsonPath, "r", encoding="utf-8") as f: packageJson = json.load(f) @@ -83,6 +85,7 @@ class PluginBrowser: chmod(pluginBasePath, 777) if access(pluginBasePath, W_OK): if not path.exists(pluginBinPath): + logger.debug(f"Creating bin directory at {pluginBinPath}") mkdir(pluginBinPath) if not access(pluginBinPath, W_OK): chmod(pluginBinPath, 777) @@ -93,6 +96,7 @@ class PluginBrowser: binName = remoteBinary["name"] binURL = remoteBinary["url"] binHash = remoteBinary["sha256hash"] + logger.debug(f"Attempting to download {binName} from {binURL}") if not await download_remote_binary_to_path(binURL, binHash, path.join(pluginBinPath, binName)): rv = False raise Exception(f"Error Downloading Remote Binary {binName}@{binURL} with hash {binHash} to {path.join(pluginBinPath, binName)}") -- cgit v1.2.3