WebThingsIO / gateway

WebThings Gateway - a self-hosted web application for monitoring and controlling a building over the web
http://webthings.io/gateway
Mozilla Public License 2.0
2.62k stars 339 forks source link

SquareTheme 1.0.6 fails to load on 1.1.alpha.2 release #3036

Closed IJCJI-IAN closed 1 year ago

IJCJI-IAN commented 1 year ago

Following an OTA upgrade of a 1.0 WebThings gateway, the Square Theme was no longer active. Attempting to reinstall failed. Same thing following a reboot from a fresh boot from a newly flashed 1.1.alpha.2 install.

image

Nothng obvious in the LOG file

benfrancis commented 1 year ago

Thank you for reporting this and for the testing you've done.

This was also reported on the WebThings chat, where we determined that the add-on fails due to a missing exec line in its manifest, which is required in WebThings Gateway 1.1.

The add-on's GitHub repository has been archived by its maintainer, but appears to have newer versions which might work but which aren't currently included in the WebThings add-on directory.

I'm chatting with them to find out if they can update the add-on.

benfrancis commented 1 year ago

See also: https://github.com/WebThingsIO/gateway/issues/3037

IJCJI-IAN commented 1 year ago

with DEBUG enabled, the log file now contains: 2022-12-12 20:59:50.841 ERROR : Failed to load add-on square-theme: Error: Error found in manifest for add-on square-theme: Manifest is missing: gateway_specific_settings.webthings.exec at loadManifestJson (/home/pi/webthings/gateway/build/addon-utils.js:219:15) at Object.loadManifest (/home/pi/webthings/gateway/build/addon-utils.js:278:16) at AddonManager.loadAddon (/home/pi/webthings/gateway/build/addon-manager.js:547:44) at fs_1.default.readdir (/home/pi/webthings/gateway/build/addon-manager.js:635:22) at FSReqWrap.args [as oncomplete] (fs.js:140:20)

Can this be added manually into the "manifest.json" file - and if yes, what would it be?

benfrancis commented 1 year ago

Thank you for confirming that.

It could probably be set to an empty string which would pass validation.

However, I'm trying to fix it at the gateway level because an extension add-on shouldn't need to define it. See https://github.com/WebThingsIO/gateway/issues/3037#issuecomment-1346988139

benfrancis commented 1 year ago

Fixed by https://github.com/WebThingsIO/gateway/pull/3040