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

draw.io "Page could not be loaded. Please try refreshing." #2641

Closed
tlaerm opened this issue Oct 10, 2016 · 23 comments
Closed

draw.io "Page could not be loaded. Please try refreshing." #2641

tlaerm opened this issue Oct 10, 2016 · 23 comments

Comments

@tlaerm
Copy link

tlaerm commented Oct 10, 2016

On starting a draw.io grain it loads for few seconds an then displays "Page could not be loaded. Please try refreshing." message in the grains area. This is browser independent. The JS console shows:

https://039e762ea7738ef1fdb8aad96a0ded2b.mydomain.sandcats.io:6080/js/app.min.js Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
039e762ea7738ef1fdb8aad96a0ded2b.mydomain.sandcats.io/:340 Uncaught ReferenceError: EditorUi is not defined

Trying to load the app.min.js gives an empty file.

It did work once and I did some diagramming so I'm really stumped on this. Any ideas? Would be really grateful for any pointers.

@kentonv
Copy link
Member

kentonv commented Oct 14, 2016

This is pretty strange. Is your Sandstorm server behind any kind of proxy?

Does this happen for all draw.io grains (including new ones) or only a specific grain?

@ghost
Copy link

ghost commented Oct 17, 2016

Hi, have same problem.
This happens because whole app is "minificated" in app.min.js and its too heavy (3.9mb) and js file got failed to load after ~6 sec

@ghost
Copy link

ghost commented Oct 18, 2016

@kentonv I'm using clean vagrant installed version. If you want to check it, don't forget to set connection type in chrome dev tools, 3G is enough to emulate this error, trying find out difference between your demo page where all working fine, and my vagrant installed version.

@tlaerm
Copy link
Author

tlaerm commented Oct 18, 2016

Hi Kenton, hi Artjom, thanks for looking into this.
My install is not behind a proxy and running on a fairly powerful bare metal machine. Don't think that's an issue. @artjoms-faltins is probably onto something. I've tested and it happens consistently on a slow connection I have to use sometimes. This is a 6 Mbit DSL link. Works on a 50 Mbit link.

@kentonv
Copy link
Member

kentonv commented Oct 21, 2016

Indeed I can reproduce this. The download dies after ~33 seconds, only having downloaded 3.1MB of the 3.9MB file. But I'm not sure why it would stop. Sandstorm does not impose any timeout here. Maybe Chrome imposes a 30s limit on Javascript?

@davidjgraph, have you run into this before?

@davidjgraph
Copy link

We've never heard of this one outside of Sandstorm. ERR_CONTENT_LENGTH_MISMATCH, I think is usually a mis-behaving proxy, http://stackoverflow.com/questions/23521839/failed-to-load-resource-neterr-content-length-mismatch, but given rdd2 doesn't have one and that we haven't released a new draw recently, could there be a server issue delivering large files?

We certainly could split up the app into 3-4 parts, but 3.9MB shouldn't be causing trouble (is there wire compression?) and we might just be masking a deeper issue.

@ghost
Copy link

ghost commented Oct 21, 2016

@kentonv First I think so but, if you will go to demo service https://oasis.sandstorm.io and try to open draw.io project, you will succeed without any problems. In my case 1.2 min download time. So I think the problem is somewhere inside sandstorm (different versions, or maybe something else). @davidjgraph I also don't have any proxy. And no I disagree 3.9 is large, but not a big deal, even if you'r download time >6 sec it sometimes fails.

@alderg
Copy link

alderg commented Oct 27, 2016

@kentonv Can we add wire-compression in https://github.com/jgraph/draw.io/blob/master/etc/sandstorm/server.c%2B%2B somehow?

@kentonv
Copy link
Member

kentonv commented Oct 28, 2016

Ah hah, indeed, it seems the real bug here is that no compression is being applied.

I think the best way to handle this would be to compress the Javascript at build time, and ship the file as .js.gz.

Here is an untested patch to server.c++ to make it recognize .gz:

kentonv/draw.io@eeb28b3

However, I wasn't able to figure out how to build the client files needed to actually test this out. Additional steps needed:

  • gzip app.min.js during build to produce app.min.js.gz.
  • Modify HTML to use this file instead of app.min.js.

@davidjgraph
Copy link

Thanks. I'll try and make some time to build this next week.

@timmc
Copy link
Contributor

timmc commented Nov 19, 2016

I encountered this today with draw.io and a sandstorm server on the same LAN as the client. Firefox downloads 2.9–3.2 MB in 5.4–5.6 seconds and then gives up. From curl I see a content-length of 4086277 and runtime of 5.4–6.1 seconds and varying quantities of bytes downloaded.

I don't think curl has a time limit for downloading the data. I'd say the lack of compression is a bug, but it seems there's also something in Sandstorm cutting off the download.

@davidjgraph
Copy link

I'm not going to get a chance to test this. If anyone wants to try I've improved the build instructions a little at https://github.com/jgraph/draw.io/tree/master/etc/sandstorm.

@kentonv
Copy link
Member

kentonv commented Nov 27, 2016

@davidjgraph Thanks for the instructions! I now have a fully-working solution and have sent you a pull request: jgraph/drawio#33

@davidjgraph
Copy link

I've pulled it, but I'm getting an error creating a grain. I'll try to make some time to look into it further.

@kentonv
Copy link
Member

kentonv commented Dec 5, 2016

@davidjgraph What kind of error? Is there an error message? Maybe you could post a screenshot?

@TechMD
Copy link

TechMD commented Mar 9, 2017

Hello, draw.io worked fine for me in sandstorm but now i can't open any diagrams and can't create any new one. I have not changed anything on my server (a VPS) ... always the same message. Do you have a step-by-step solution for a noob like me ? Thx
image

@davidjgraph
Copy link

We've a contractor starting next week who'll take over the Sandstorm work. Hopefully, she'll be able to put the build together and get Kenton's fix in.

@davidjgraph
Copy link

The fix is in release 6.5.4 of draw.io on Sandstorm.

@timmc
Copy link
Contributor

timmc commented Apr 21, 2017

I can confirm, thank you!

@JamborJan
Copy link
Contributor

Awesome thanks, finally I can use all my sketches again.

@ocdtrekkie
Copy link
Collaborator

This one can be marked as closed.

@alderg
Copy link

alderg commented Jul 9, 2017

Thanks!

@ocdtrekkie
Copy link
Collaborator

I suggested this could be closed in 2017. I am happy to now close it. :)

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

No branches or pull requests

8 participants