You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I upgraded my application to use NPM Blockly 3.20200123.0 instead of Blockly commit 3.20191014.4, and I started getting an issue whenever generating code with Blockly in headless mode (interestingly, this issue is completely non-existent when rendering in non-headless mode).
This issue is present only in 3.20200123.0 onwards; all other Blockly versions work fine.
Every time we tried to generate code, we got this error:
Uncaught TypeError: Cannot read property 'svgPath' of undefined
at Blockly.FieldColour.doValueUpdate_ (field_colour.js:235)
at Blockly.FieldColour.Blockly.Field.setValue (field.js:835)
at Blockly.FieldColour.Blockly.Field.fromXml (field.js:392)
at Object.Blockly.Xml.domToField_ (xml.js:798)
at Object.Blockly.Xml.domToBlockHeadless_ (xml.js:691)
at Object.Blockly.Xml.domToBlockHeadless_ (xml.js:705)
at Object.Blockly.Xml.domToBlockHeadless_ (xml.js:729)
at Object.Blockly.Xml.domToBlockHeadless_ (xml.js:729)
at Object.Blockly.Xml.domToBlockHeadless_ (xml.js:729)
at Object.Blockly.Xml.domToBlockHeadless_ (xml.js:729)
To Reproduce
This is the code we use to generate the code:
this.ffauWorkspace=newBlockly.Workspace();// change the text to domconstdom=Blockly.Xml.textToDom(xmlString);// set the dom into the workspaceBlockly.Xml.domToWorkspace(dom,this.ffauWorkspace);
Describe the bug
Recently, I upgraded my application to use NPM Blockly
3.20200123.0
instead of Blockly commit3.20191014.4
, and I started getting an issue whenever generating code with Blockly in headless mode (interestingly, this issue is completely non-existent when rendering in non-headless mode).This issue is present only in
3.20200123.0
onwards; all other Blockly versions work fine.Every time we tried to generate code, we got this error:
To Reproduce
This is the code we use to generate the code:
Our generators and block definitions can be found at https://github.com/codeddraig/ffau/tree/master/library/ffau.
The specific error shown above was experienced with the XML string found here: https://gist.github.com/palkerecsenyi/89ae1ae104ee005e2d5fde2d7104f2aa.
You can see the error in real life at https://codedragon.org/p/d7be8e0ec87a797e722cc71094407ba1 (headless mode). In non-headless mode, it works perfectly, as shown here: https://codedragon.org/editor/d7be8e0ec87a797e722cc71094407ba1.
Expected behavior
It should generate the following code string:
Desktop (please complete the following information):
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: