Export Import of Blockly scripts
Hello dear developer,
I am currently having difficulties exporting a Blockly script and then re-importing it. This process almost brings ioBroker to a standstill. The only solution is to roll back to a previous snapshot.
There are two ways to export or import Blockly scripts: via the two buttons in the top right corner, or as a JSON export/import. But here it is only possible to export import all scripts. I would really appreciate it if it were possible to export and import only one scripts as JSON. This method seems cleaner to me than using the text version.
If you want to reproduce copy my script. You can find it here in the rtf file. https://github.com/FlexerJR/Automatische-Dosieranlage
Best regards
An import of one blockly block generates this 8 times. If you have a script with 1000 blocks this bug leads to 8000 blocks after the import and every trigger will be triggered 8 times with all logic behind. I'm currently trying to figure out in which cases this happens.
Vielleicht steht da was im Browser log? https://www.iobroker.net/#de/documentation/faq/_040_contibution.md?fehlerindergrafischeoberflchemelden
Ich habe mein Script mal als Textform in ein leeres Blockly importiert. Die Website hängt sich auf. Das habe ich aus Safari DEV Ansicht rauskopiert. Kann nichts damit anfangen.
[Error] Failed to load resource: Ungültige URL (envelope, line 0) [Error] Failed to load resource: Ungültige URL (envelope, line 0) [Error] Source Map-Ladefehler (x6) [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (blocks_compressed.js.map, line 0) [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (blockly_compressed.js.map, line 0) [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (javascript_compressed.js.map, line 0) [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (loader.js.map, line 0) [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (editor.main.js.map, line 0) [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (editor.main.nls.de.js.map, line 0) [Log] [email protected] (index-BzksVH7W.js, line 1294) [Log] (index-jqxhK8Zt.js, line 15) ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗ ██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝ ██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗ ██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
[Log] Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters (index-jqxhK8Zt.js, line 22) [Log] Help us to create open source project with reactJS! (index-jqxhK8Zt.js, line 22) [Log] See you :) (index-jqxhK8Zt.js, line 22) [Log] [2025-07-24T10:27:27.088Z] Try to connect (socket.io.js, line 1) [Log] Sentry initialized (index-jqxhK8Zt.js, line 15) [Error] Failed to load resource: Ungültige URL (envelope, line 0) [Log] Detected custom blockly: awtrix-light (index-jqxhK8Zt.js, line 15) [Log] Detected custom blockly: email (index-jqxhK8Zt.js, line 15) [Log] Detected custom blockly: iot (index-jqxhK8Zt.js, line 15) [Log] Detected custom blockly: mqtt (index-jqxhK8Zt.js, line 15) [Log] Detected custom blockly: telegram (index-jqxhK8Zt.js, line 15) [Warning] Translation for word "Sends message via telegram" in "de" was ignored: existing = "Sendet eine Nachricht per telegram", new = Sendet Nachricht per Telegramm (index-jqxhK8Zt.js, line 15) [Warning] Translation for word "You can use %s in the text to display current trigger value or %id to display the triggered object ID" in "de" was ignored: existing = "Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, %id, um die ausgelöste Objekt-ID zu verwenden, %name, um den ID-Namen des ausgelösten Objekts anzuzeigen, oder %old, um den alten Triggerwert zu verwenden", new = Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, oder %id, um die ID des ausgelösten Objekts anzuzeigen (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.convert_tonumber to Blockly.JavaScript.forBlock.convert_tonumber (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.telegram to Blockly.JavaScript.forBlock.telegram (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.telegram_call to Blockly.JavaScript.forBlock.telegram_call (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.telegram_ask to Blockly.JavaScript.forBlock.telegram_ask (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.mqtt_sendmessage to Blockly.JavaScript.forBlock.mqtt_sendmessage (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.ifttt_iot to Blockly.JavaScript.forBlock.ifttt_iot (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.email to Blockly.JavaScript.forBlock.email (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.awtrix-light to Blockly.JavaScript.forBlock.awtrix-light (index-jqxhK8Zt.js, line 15) [Log] Migrating Blockly.JavaScript.awtrix-light_playsound to Blockly.JavaScript.forBlock.awtrix-light_playsound (index-jqxhK8Zt.js, line 15) [Warning] Translation for word "You can use %s in the text to display current trigger value or %id to display the triggered object ID" in "de" was ignored: existing = "Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, %id, um die ausgelöste Objekt-ID zu verwenden, %name, um den ID-Namen des ausgelösten Objekts anzuzeigen, oder %old, um den alten Triggerwert zu verwenden", new = Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, oder %id, um die ID des ausgelösten Objekts anzuzeigen (index-jqxhK8Zt.js, line 15) [Warning] The resource http://iobroker.lan:8081/adapter/email/rules/assets/ActionSendEmail__mf_v__runtimeInit__mf_v__-eLULivoH.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing. [Warning] Translation for word "Sends message via telegram" in "de" was ignored: existing = "Sendet eine Nachricht per telegram", new = Sendet Nachricht per Telegramm (index-jqxhK8Zt.js, line 15) [Warning] Translation for word "You can use %s in the text to display current trigger value or %id to display the triggered object ID" in "de" was ignored: existing = "Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, %id, um die ausgelöste Objekt-ID zu verwenden, %name, um den ID-Namen des ausgelösten Objekts anzuzeigen, oder %old, um den alten Triggerwert zu verwenden", new = Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, oder %id, um die ID des ausgelösten Objekts anzuzeigen (index-jqxhK8Zt.js, line 15) [Log] Skript 1 (index-jqxhK8Zt.js, line 15, x2) [Log] Set name: "T" (index-jqxhK8Zt.js, line 15) [Log] T (index-jqxhK8Zt.js, line 15) [Log] Set name: "TE" (index-jqxhK8Zt.js, line 15) [Log] TE (index-jqxhK8Zt.js, line 15) [Log] Set name: "TES" (index-jqxhK8Zt.js, line 15) [Log] TES (index-jqxhK8Zt.js, line 15) [Log] Set name: "TEST" (index-jqxhK8Zt.js, line 15) [Log] TEST (index-jqxhK8Zt.js, line 15) [Error] Failed to load resource: Ungültige URL (envelope, line 0) [Error] Failed to load resource: Ungültige URL (envelope, line 0) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: timeout22 (index-jqxhK8Zt.js, line 15, x2) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: timeout8 (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: timeout9 (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_clearinterval, Field name: NAME, Value: Intervall (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_clearinterval, Field name: NAME, Value: Intervall2 (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: Sending_Telegram (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: Timer_Abgabe_Chlor (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: Check_Redox (index-jqxhK8Zt.js, line 15) [Warning] Cannot set the dropdown's value to an unavailable option. Block type: timeouts_cleartimeout, Field name: NAME, Value: Check_Ph_Minus (index-jqxhK8Zt.js, line 15)
Hier ein zweiter Versuch der Prozess hängt sich auf und bleibt stehen.
I just tested the Export/Import with Javascript 9.0.9. and even without any ms of delay the import was successful.
I guess the bug is fixed?
If yes, thank you very very much. 👍🏻
Maybe this issue here is fixed but there is a much worse import bug since v9.x #1935