Lexpedite / blawx

A user-friendly web-based tool for Rules as Code.
MIT License
96 stars 9 forks source link

No Blockly.utils.xml.textToDom function defined #550

Closed Gauntlet173 closed 11 months ago

Gauntlet173 commented 1 year ago

the call to getKnownCategories in window.onload in scenario editor is sometimes being called before the Blockly libraries have succesfully loaded in the background, causing an error about textToDom not being available. We need to make it run when the script has loaded, and not before that, or figure out some way to get the utils.xml library to load faster.

Gauntlet173 commented 1 year ago

image

Gauntlet173 commented 1 year ago

add a concurrency_bug_test branch that i'm hoping will solve the problem.

Gauntlet173 commented 1 year ago

waiting on feedback from others about whether or not this is an ongoing issue...

Gauntlet173 commented 12 months ago

Confirmed that this problem is still happening on a machine running 1.6.15-alpha. However the machine has other problems, and so the user is investigating those first, and will advise if the problem remains afterward.

Gauntlet173 commented 11 months ago

Problem was with a version of Blockly that had renamed the relevant function. Somewhere around 9.2.0. The problem was resolved in later versions of Blockly, but the user's machine was not properly getting the latest version of Blockly when running the docker build commands. That was detected by going into the console in Rule Editor andrunning Blockly.VERSION to see the version running. If the version is wrong, find the running container with docker ps, use the container ID to run a shell inside the running container with docker exec -it container_id /bin/sh, and then run npm install blockly inside the shell. That seems to be the current workaround. It was happening on a machine that was using podman instead of docker, but we don't yet know if that was the cause of the issue.