ECMAScript 262 Edition 11 - Failed to retrieve script script dependency listener from engine bindings

Hello,

when I use JavaScript rules or scripts (ECMA 2021) I get the following warning when I run the script:

[WARN ] [.internal.OpenhabGraalJSScriptEngine] - Failed to retrieve script script dependency listener from engine bindings. Script dependency tracking will be disabled.

After a couple seconds, the script runs just fine. However, the delay can very annoying - for example if you a rule triggers a light. If I run the script / rule again immediatly, no warning is showing and it runs smoothly. If the script is not executed for some time, the same issue occurs again.

The issue is independend from the complexity of the script - also a “console.log(“Hello World”);” shows the same warning. Does anyone have a solotion to this? Thank you!

Kind regards,
Norbert

  • Platform information:
    • Hardware: Raspberry Pi 4, 4 GB

    • OS: "Raspbian GNU/Linux 10 (buster)

    • Java Runtime Environment: openjdk 11.0.11 2021-04-20 LTS // OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS) // OpenJDK Client VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)

    • openHAB version: 3.2.0

see here

Thank you - although the warning itself seems to be OK to ignore, the time lag it seems to cause is very annoying. Any workaround would be appreciated…

Correlation is not causation. The delay you are seeing is far longer than any I’ve seen reported recently but the delay is caused by OH loading and parsing the Script Actions. After that first run it reuses the Script Actions so the parsing delay doesn’t happen.

That warning you see happens when the script is parsed and loaded but it is almost certainly not the source of the delay. It just happens to occur when the script is loaded.

There were reports of similar behavior for Rules DSL rules in the past which you should be able to find by searching. I think the work around was to keep triggering the rule periodically to keep it from being garbage collected and needing to be reloaded and parsed.

1 Like