Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

blockly developer tools block display is broken #6820

Closed
1 task done
rylid-umil opened this issue Feb 5, 2023 · 12 comments · Fixed by #8605
Closed
1 task done

blockly developer tools block display is broken #6820

rylid-umil opened this issue Feb 5, 2023 · 12 comments · Fixed by #8605
Assignees
Labels
component: devtools help wanted External contributions actively solicited issue: bug Describes why the code or behaviour is wrong

Comments

@rylid-umil
Copy link

rylid-umil commented Feb 5, 2023

Check for duplicates

  • I have searched for similar issues before opening a new one.

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

  1. have blocks in the block library
  2. load one
  3. look at the preview

Stack trace

No response

Screenshots

image

Browsers

Firefox desktop

@rylid-umil rylid-umil added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Feb 5, 2023
@mrkprdo
Copy link

mrkprdo commented Feb 6, 2023

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.

@rylid-umil
Copy link
Author

i dont have any conflicting names and it still doesnt show

@Njinx
Copy link

Njinx commented Feb 9, 2023

@rylid-umil Do you see this message on the left pane?
2023-02-09_15-17

@maribethb maribethb added component: devtools and removed issue: triage Issues awaiting triage by a Blockly team member labels Feb 22, 2023
@lkarthee
Copy link

lkarthee commented Apr 5, 2023

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.
image

Any Idea why this is happening ?

@993499094
Copy link

993499094 commented Apr 8, 2023

I had the same problem.
Alt

Reproduction steps

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]

  • Save "block_test"
  • F5 refresh the webpage

Click on "Block Library" and select "block_test".

  • Dialog Box: 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:

  • Show blue warning icon name conflict
  • And Preview: cannot display preview.
  • but if you change "block_test" to "block_test_1", the preview will be display.

In summary: even if you select a saved block from the "Block Library", the program considers it to be a duplicate of the "NAME". The preview cannot be displayed.

@NeilFraser
Copy link
Contributor

Another external report: https://groups.google.com/g/blockly/c/AIC5qvOXAn4

@alicialics
Copy link
Contributor

alicialics commented Oct 27, 2023

@NeilFraser caused by Exporter importing these blocks:

this.blockOptions = this.tools.createBlockSelectorFromLib(

this.addBlockDefinitions(blockXmlMap);

@Apro123
Copy link

Apro123 commented Dec 28, 2023

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)

@lancefisher
Copy link

Another workaround is to clear local storage, then re-import your block library.

@cpcallen cpcallen added the issue: triage Issues awaiting triage by a Blockly team member label Jul 1, 2024
@cpcallen
Copy link
Contributor

cpcallen commented Jul 1, 2024

Marking this as triage again because it appears to be preventing people from updating to the new block factory.

@cpcallen cpcallen added help wanted External contributions actively solicited and removed issue: triage Issues awaiting triage by a Blockly team member labels Jul 3, 2024
@BeksOmega BeksOmega added the issue: triage Issues awaiting triage by a Blockly team member label Jul 8, 2024
@cpcallen cpcallen removed the issue: triage Issues awaiting triage by a Blockly team member label Jul 19, 2024
@cpcallen
Copy link
Contributor

I think this may be a duplicate of (or at least related to) #5570.

@tashee
Copy link

tashee commented Sep 6, 2024

Seems to be called from updateLanguage which marks the Blocklyblock as already created in Firefox but not in Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: devtools help wanted External contributions actively solicited issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.