Closed rylid-umil closed 1 month ago
It could be that you have conflicting "names" in the editor workspace. If you see something like blue triangles next to the name, you should change that to something else.
i dont have any conflicting names and it still doesnt show
@rylid-umil Do you see this message on the left pane?
I have encountered same issue and it makes the dev workspace unusable.
All the blocks in workspace are not rendered in preview with the same error:
You can't make a block called <BlockName> in this tool because that name already exists. 4 factory.js:193:15
warnExistingBlock factory.js:193
updatePreview factory.js:205
updateLanguage factory.js:148
fireChangeListener workspace.ts:686
fireNow$$module$build$src$core$events$utils utils.ts:249
(Async: setTimeout handler)
utils utils.ts:227
(Async: FrameRequestCallback)
fireInternal$$module$build$src$core$events$utils utils.ts:226
fire$$module$build$src$core$events$utils utils.ts:211
dispose block.ts:325
dispose block_svg.ts:854
clear workspace.ts:357
clear workspace_svg.ts:2356
openBlock block_library_controller.js:68
setSelectedAndOpen_ block_library_controller.js:253
makeOptionSelectHandler_ block_library_controller.js:271
(Async: EventListener.handleEvent)
addEventListener eval:4
addOptionSelectHandler block_library_controller.js:278
addOptionSelectHandlers block_library_controller.js:289
populateBlockLibrary block_library_controller.js:165
AppController app_controller.js:22
init index.html:40
(Async: EventListener.handleEvent)
addEventListener eval:4
<anonymous> index.html:44
I have checked local storage in the browser - it has no duplicate blocks.
Any Idea why this is happening ?
I had the same problem.
Blockly > Demos > Blockly Developer Tools
https://blockly-demo.appspot.com/static/demos/blockfactory/index.html
Workspace Save Share Link
https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#debreq
Change the default name [block_type]
to name [block_test]
"block_test"
refresh the webpage
Click on "Block Library"
and select "block_test"
.
You have unsaved changes. By proceeding without saving your block first, you will lose these changes.
YES
!Console error:
You can't make a block called block_test in this tool because that name already exists.
warnExistingBlock @ factory.js:
blue warning icon
name conflictPreview:
cannot display preview."block_test"
to "block_test_1"
, the preview will be display.Another external report: https://groups.google.com/g/blockly/c/AIC5qvOXAn4
@NeilFraser caused by Exporter importing these blocks: https://github.com/google/blockly/blob/7d2c307fedbcb2cbb5f40382e69b912109c86666/demos/blockfactory/block_exporter_controller.js#L31
A quick workaround is to rename the block to show the preview, then rename it back when done editing/viewing before clicking "Update" (if necessary)
Another workaround is to clear local storage, then re-import your block library.
Marking this as triage again because it appears to be preventing people from updating to the new block factory.
I think this may be a duplicate of (or at least related to) #5570.
Seems to be called from updateLanguage which marks the Blocklyblock as already created in Firefox but not in Chrome
Check for duplicates
Description
when ever i load a block from block library on firefox, the preview does not show no matter what. its supposed to be there. when i create a new block however, it works fine. all other block displays work.
Reproduction steps
Stack trace
No response
Screenshots
Browsers
Firefox desktop