Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BlockFactory is broken #2040

Closed
AnmAtAnm opened this issue Sep 4, 2018 · 1 comment
Closed

BlockFactory is broken #2040

AnmAtAnm opened this issue Sep 4, 2018 · 1 comment

Comments

@AnmAtAnm
Copy link
Contributor

AnmAtAnm commented Sep 4, 2018

Problem statement

BlockFactory sometime fails to initialize with the following error:

blockly_compressed.js:1441 Uncaught TypeError: Cannot read property 'removeChild' of null
    at Blockly.BlockSvg.dispose (blockly_compressed.js:1441)
    at Blockly.WorkspaceSvg.Blockly.Workspace.clear (blockly_compressed.js:947)
    at Blockly.WorkspaceSvg.clear (blockly_compressed.js:1308)
    at Object.FactoryUtils.getDefinedBlock (factory_utils.js:740)
    at BlockExporterTools.createBlockSelectorFromLib (block_exporter_tools.js:216)
    at new BlockExporterController (block_exporter_controller.js:47)
    at new AppController (app_controller.js:48)
    at init (index.html:39)

In my testing, this failed in local file: execution, worked in the staged domain for the August demos, and rarely worked in the normal block factory URL. There is probably a race condition in how the page gets loaded, but that is at all related to the same code running on different domains is very strange.

The same error was seen when attempting to port recent Blockly changes to scratch-blocks.

This appears strongly related to the replacement of goog.dom.removeNode, and the removal of a .parentNode check in that code.

@AnmAtAnm
Copy link
Contributor Author

AnmAtAnm commented Sep 4, 2018

First reported here: https://groups.google.com/forum/#!topic/blockly/Ded9E_vrmto
Immediately rolled back demos to June release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant