5.10 JavaScript library causes issue with openweather widget/script

Using OH 4.3.4. I recently loaded the JavaScript 5.10 library and it seems like it is not working well with the openweather widget/script from @florian-h05 here.

Is anyone else seeing this or having issues? I’m still debugging - there could be some other problem that is causing this.

2025-04-06 16:28:04.206 [ERROR] [.script.javascript.openweathermap.js] - Failed to execute script: TypeError: Access to host class org.openhab.core.persistence.extensions.PersistenceExtensions.RiemannType is not allowed or does not exist.
        at <js>.:anonymous(item-persistence.js:9)
        at com.oracle.truffle.polyglot.PolyglotMapAndFunction.apply(PolyglotMapAndFunction.java:46)
        at org.openhab.automation.jsscripting.internal.OpenhabGraalJSScriptEngine.lambda$13(OpenhabGraalJSScriptEngine.java:273)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at org.openhab.automation.jsscripting.internal.OpenhabGraalJSScriptEngine.lambda$11(OpenhabGraalJSScriptEngine.java:273)
        ... 30 more
2025-04-06 16:28:04.221 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script '/etc/openhab/automation/js/openweathermap.js': org.graalvm.polyglot.PolyglotException: TypeError: Access to host class org.openhab.core.persistence.extensions.PersistenceExtensions.RiemannType is not allowed or does not exist.

The widget shows:

I do not see anything interesting in the events log - all the OneCall Items look okay, but I may have missed something.

Reimann averaging wasn’t added until after OH 5.0 M1. Therefore I’m pretty sure the latest JS library is only going to be compatible with versions of OH after that method was added.

It meant to be backward compatible/working on older openHAB versions, I will fix that.

1 Like

@jswim788 I have just released version 5.10.1 with a fix for the bug, please upgrade.

1 Like

Works again. Thank you.

1 Like