Repository navigation
Description
I'm sure that
- This issue is still present in the current beta version of this adapter
- There is no other (open) issue with the same topic (use the search!)
- This issue is not described in the adapter documentation / FAQ (read the docs!)
Script type
JavaScript, Blockly (did not test the other ones)
The problem
Steps to reproduce:
- Enable “Mirror scripts to file path”.
- Create and enable a JavaScript script named
JsScriptin the web editor:log("Changed by javascript website", "warn");
- Save. The message appears once.
- Open the mirrored file through the filesystem.
- Change its content to:
log("Changed by file", "warn");
- Save the file.
Actual behavior:
The message appears multiple times. Debug logs show multiple “Update script … in DB” entries and repeated script starts for a single save. With long-running scripts, concurrent executions have also been observed.
Expected behavior:
One restart per saved change, with only one active execution of the script.
Adapter version: 10.4.4
Possibly related: #598, #905
The underlying cause has not yet been verified.
iobroker.current.log (in debug mode!)
11/20/2026, 10:15:41 AM.113 [debug]: javascript.0 (128677) Script history: stored version 1795166141100 of script.js.scripts.test.JsScript (29 kept)
11/20/2026, 10:15:41 AM.116 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: Stopping script
11/20/2026, 10:15:41 AM.125 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: start JavaScript (Javascript/js)
11/20/2026, 10:15:41 AM.128 [warn ]: javascript.0 (128677) script.js.scripts.test.JsScript: Änderung mit javascript-website
11/20/2026, 10:15:41 AM.128 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
11/20/2026, 10:15:53 AM.953 [debug]: javascript.0 (128677) Update script script.js.scripts.test.JsScript in DB
11/20/2026, 10:15:53 AM.955 [debug]: javascript.0 (128677) Update script script.js.scripts.test.JsScript in DB
11/20/2026, 10:15:53 AM.960 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: Stopping script
11/20/2026, 10:15:53 AM.963 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: start JavaScript (Javascript/js)
11/20/2026, 10:15:53 AM.964 [warn ]: javascript.0 (128677) script.js.scripts.test.JsScript: Änderung mit file change
11/20/2026, 10:15:53 AM.964 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
11/20/2026, 10:15:53 AM.965 [debug]: javascript.0 (128677) Script history: stored version 1795166153959 of script.js.scripts.test.JsScript (30 kept)
11/20/2026, 10:15:53 AM.965 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: Stopping script
11/20/2026, 10:15:54 AM.009 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: start JavaScript (Javascript/js)
11/20/2026, 10:15:54 AM.010 [warn ]: javascript.0 (128677) script.js.scripts.test.JsScript: Änderung mit file change
11/20/2026, 10:15:54 AM.010 [info ]: javascript.0 (128677) script.js.scripts.test.JsScript: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
Version of nodejs
v24.22.3
Version of ioBroker js-controller
7.2.5
Version of adapter
v10.4.4
Activity
GermanBluefox commentedon Nov 21, 2026
Thanks for the detailed report. The mirror reacts to every single
fs.watchevent immediately. Many editors save a file in several steps (truncate + write, or temp file + rename), so one save fires several events. The first one probably reads an intermediate content and updates the DB, and the second one updates it again with the final content. Each update restarts the script.The fix will be to debounce file changes per file, so that one save leads to one update and one restart. A PR will follow.