noflo / noflo-ui

NoFlo Development Environment
https://app.flowhub.io
MIT License
767 stars 173 forks source link

Uncaught Error: LoadGraph ERROR when loading .json graphs from GitHub #230

Closed xippi closed 10 years ago

xippi commented 10 years ago

I get a JavaScript error when I try to pull .json graphs from GitHub. The test repository I'm trying to download from is at: https://github.com/xippi/noflo, when I try pull it I get the following error and I can see only .fbp graph:

Uncaught Error: LoadGraph ERROR: No connections available noflo-ui.js:4894
OutPort.checkRequired noflo-ui.js:4894
OutPort.send noflo-ui.js:4841
LoadGraph.toGraph noflo-ui.js:20698
(anonymous function) noflo-ui.js:20664
Emitter.emit noflo-ui.js:336
InPort.handleSocketEvent noflo-ui.js:4720
(anonymous function) noflo-ui.js:4675
Emitter.emit noflo-ui.js:336
InternalSocket.send noflo-ui.js:4399
(anonymous function) noflo-ui.js:5176
Port.send noflo-ui.js:5174
(anonymous function) noflo-ui.js:14118
Emitter.emit noflo-ui.js:336
(anonymous function) noflo-ui.js:5126
Emitter.emit noflo-ui.js:336
InternalSocket.send noflo-ui.js:4399
(anonymous function) noflo-ui.js:5176
Port.send noflo-ui.js:5174
(anonymous function) noflo-ui.js:20175
(anonymous function) noflo-ui.js:19750
pager.trigger noflo-ui.js:19749
complete noflo-ui.js:19634
Request.callback noflo-ui.js:19310
(anonymous function) noflo-ui.js:18981
Emitter.emit noflo-ui.js:336
xhr.onreadystatechange noflo-ui.js:19380
forresto commented 10 years ago

Was this a Github issue? Should we close this issue, or make it about showing the user error info in the UI?

xippi commented 10 years ago

I'm not sure is this GitHub, nofo-ui or me but I still have this issue with .json graphs. I'll try to be more specific how I run into this error.

I create a new project with one graph and one component and use UI to push it to GitHub. When I take a look at https://github.com/xippi/noflo I see that UI has created two folders and pushed core.json into graphs/ and repeatComponent.coffee into components/. If I remove indexedDB nofo-ui database, clear browser cache, login again and try to pull that repository from GitHub I get this error and I can see 0 graphs and 1 component locally. This is happening to me even if I expose core.json trough package.json, I can add it as a subgraph to the new graphs (I can see it in search results as ENV/CORE) but there is no way to edit that graph again.

If I manually add any .fbp graph into graphs/ folder it gets autodiscovered by UI. Components are stacked one on top of another (I know this is because of the missing metadata) but when try to push .fbp graph back to GitHub it gets saved under .json format and I'm running into the same problem again.

I get the same behavior both on local noflo-ui and flowhub.io. Can you please take a close look at this repository and check what I'm doing wrong ?