You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute the oldscript script. Observe that we still get the error from the new script engine (org.graalvm.polyglot.PolyglotException: ReferenceError: "itemRegistry" is not defined), even after the addon has been uninstalled
Restart openHAB, and re-execute the oldscript script. One can see that script executes without an error, using the default javascript engine.
Context
Trying to migrate to ES6 in rules/scripts.
Your Environment
Version used: (e.g., openHAB and add-on versions)
Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...):
Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...):
I can reproduce with 3.2.0 M2. Probably present with 3.1.0 as well, but have not tried.
Linux 5.13.13-200.fc34.x86_64 #1 SMP Thu Aug 26 17:06:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
ssalonen
added
the
bug
An unexpected problem or unintended behavior of an add-on
label
Sep 8, 2021
Furthermore, the behaviour that a UI script of one engine can still be run after the engine has been uninstalled (not sure if this the same now or it has changed) is related to core.
I have noticed that jsscripting addon uninstallation has unexpected behaviour.
Also discussed in community forums: https://community.openhab.org/t/all-my-ecmascript-scripts-stopped-working-throwing-exceptions/125341/8
Expected Behavior
Uninstallation of the jsscripting bundle should make future executions of javascript scripts/rules to use the default javascript engine immediately.
Current Behavior
Restart is needed after addon uninstallation to ensure that all scripts/rules use the default engine.
Steps to Reproduce (for Bugs)
oldscript
script. Observe that we still get the error from the new script engine (org.graalvm.polyglot.PolyglotException: ReferenceError: "itemRegistry" is not defined
), even after the addon has been uninstalledoldscript
script. One can see that script executes without an error, using the default javascript engine.Context
Trying to migrate to ES6 in rules/scripts.
Your Environment
I can reproduce with 3.2.0 M2. Probably present with 3.1.0 as well, but have not tried.
The text was updated successfully, but these errors were encountered: