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

Demos / Blockly Factory fails to import library #629

Closed
cshotton opened this issue Sep 19, 2016 · 10 comments
Closed

Demos / Blockly Factory fails to import library #629

cshotton opened this issue Sep 19, 2016 · 10 comments

Comments

@cshotton
Copy link

Importing a previously saved library fails in the Blockly Factory app. The code fails with an exception:

TypeError: Cannot read property 'selectNodes' of undefined

in line 184 of app_controller.js

Regression: load the Blockly Factory app, create a single block, save the block, download block library, attempt to re-import block library file.

This was using latest Google Chrome with --allow-file-access-from-files specified and the index.html file loaded from the file system.

@rachel-fenichel
Copy link
Collaborator

@quachtina96 @evd2014

@picklesrus
Copy link
Contributor

Do you have the repo checked out and run it off of file://?

I think the issue might be that you don't have closure, but I haven't deleted mine to check if I have the same issue yet. We probably should be showing a message and pointing you to this page like we do when the playground detects you don't have closure: https://developers.google.com/blockly/guides/modify/web/closure

Or do you already have closure?

@picklesrus
Copy link
Contributor

I confirmed I run into errors if I remove my local copy of closure because blocklyfactory references a closure file here: https://github.com/google/blockly/blob/develop/demos/blocklyfactory/index.html#L20

I'll look into building the deps into the demo, but in the meantime you can get a copy of closure as described here: https://developers.google.com/blockly/guides/modify/web/closure or try using the demo we have hosted here: https://developers.google.com/blockly/guides/modify/web/closure

@cshotton
Copy link
Author

cshotton commented Sep 21, 2016

I'll give it a shot and report back. Thanks for the quick response!

(That was, indeed, the problem. Feel free to close this issue unless you want it as a reminder.)

@picklesrus
Copy link
Contributor

I'm going to keep it open. We should either package the library functions up properly, avoid using them, or at least show a message that points you to how to work around it when you're working off of the file: url. I'll close it once we do one of those things :)

@picklesrus
Copy link
Contributor

I submitted #669 to develop to warn about the missing dependency and filed #668 to track removing the closure dependency so closing this one.

@bhar937
Copy link

bhar937 commented May 14, 2019

Hello Guys,

I am receiving "Error: Closure not found. Read this:https://developers.google.com/blockly/hacking/closure", when I try to run the "Build.py" file. Kindly advise on how to fix this.

@RoboErikG
Copy link
Contributor

Please go to the link and read it.

@bhar937
Copy link

bhar937 commented May 15, 2019

I have followed up the instructions mentioned on the site but it still gives me the same error.

I would appreciate any advice on how to get this working.

@RoboErikG
Copy link
Contributor

Could you please make a post on the forum with details about what OS you're on and a screenshot of your development directory (showing Blockly and the closure library)? It's probably a naming issue or the folder's at the wrong level, but it'll be easier to discuss and debug on the forums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants