From 4f6592b7498bed177b1024af276239d44192578d Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Mon, 4 May 2026 17:45:46 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20install=5Ffailure=20type=20mismatch=20?= =?UTF-8?q?=E2=80=94=20issue=20never=20reached=20GitHub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SetupActivity was sending type 'install-failure' (hyphen) but the PHP version-guard bypass list only checked for 'install_failure' (underscore). Result: if the kiosk was not on the latest released version the error was silently discarded and no GitHub issue was created. Fix: - SetupActivity: change type to 'install_failure' (underscore, consistent with KioskActivity which already used the correct name) - api/index.php: add 'install-failure' (hyphen) to the bypass list as defensive fallback so old APK builds already in the field are covered too --- api/index.php | 2 +- .../main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/index.php b/api/index.php index dbdacf9..120d4a7 100644 --- a/api/index.php +++ b/api/index.php @@ -5691,7 +5691,7 @@ function reportError(): void { // Exception: install/update errors are ALWAYS reported regardless of version, // because a device that is failing to install the update is by definition on // an old version — suppressing the issue is the opposite of useful. - $installErrorTypes = ['install_download_failed', 'install_failure', 'install_packager_exception']; + $installErrorTypes = ['install_download_failed', 'install_failure', 'install-failure', 'install_packager_exception']; $bypassVersionGuard = in_array($type, $installErrorTypes, true) || ($context['version_guard_bypass'] ?? false); if (!$bypassVersionGuard && !_isLatestVersion($version)) { diff --git a/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt b/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt index 0f06b2a..3e19b9c 100644 --- a/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt +++ b/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt @@ -868,7 +868,7 @@ class SetupActivity : AppCompatActivity() { val msg = intent?.getStringExtra(android.content.pm.PackageInstaller.EXTRA_STATUS_MESSAGE) ?: "status=$status" setGatewayUI("❌", getString(R.string.install_error_install), msg, 0xFFf87171.toInt()) ErrorReporter.reportMessage( - "install-failure", + "install_failure", "PackageInstaller failed: status=$status msg=$msg", mapOf("pkg" to targetPkg, "status" to status, "msg" to msg) )