Closed thomascantrellsea closed 3 years ago
To be clear, the workaround diff is really simple:
--- a/src/index.js
+++ b/src/index.js
@@ -34,8 +34,6 @@ class ElgatoKeylightInstance extends instance_skel {
this.initConstants();
this.initActions();
-
- this.upgrade();
}
static GetUpgradeScripts() {
I did a pull from mainline today and spent some time debugging why things weren't working. It appears that a recent commit related to upgrade APIs broke the module, causing it to take an exception on init.
Error
Forgive me for not having a callstack, but the code takes an exception on startup in index.js when this.upgrade() is called in the constructor.
Issue
The following commit updated the upgrade logic: https://github.com/bitfocus/companion-module-elgato-keylight/commit/e7975576aeaa94237e1025248bf20d135b2ef78e.
It also removed the this.upgrade() function, hence the exception.
Workaround
Remove this.upgrade from index.js. That's what I'm doing locally, but not sure it's actually 100% the right way forward.
If I understand the move from this.addUpgradeScript to GetUpgradeScripts correctly, this may be all that's required. But I'd like to make sure haven't dropped out functionality by doing this. @Julusian - any thoughts?
Thanks!
Thomas