running draw.io from local file system fails in Chrome and Electron
See original GitHub issueStory: As a user I want to run draw.io locally, ideally also without an internet connection.
Using Chrome/Chromium
What I tried:
- I cloned the git repo and went to the war folder.
- I opened index.html or app.html using chrome.
What I expected: I expected to see the where-do-you-want-to-save screen and, afterwards, the draw.io application
What happened:
- Chrome displayed the content of the index.html- page (Flowchart Maker and Online Diagram Software […] Loading… Please ensure JavaScript is enabled )
- on the devtools console, I got
app.min.js:325 XMLHttpRequest cannot load file:///home/[somefolders]/draw.io/war/stencils.xml. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.mxXmlRequest.send @ app.min.js:325
app.min.js:325
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///home/[somefolders]/draw.io/war/stencils.xml'.
I tried using Firefox instead, there it works without errors – I can use draw.io there without problems
(On Firefox 49.0, and Chromium 53.0.2785.143; running on Ubuntu 16.04 (64-bit))
Via HTTP-Server
What I tried: I tried to run draw.io on a local server (via python -m SimpleHTTPServer
):
What happened
It worked in non of the browsers:
- In Firefox: SSL_ERROR_RX_RECORD_TOO_LONG
- In Chrome: ERR_SSL_PROTOCOL_ERROR
while the server says:code 400, message Bad request version
after some (base64?) encoded lines which start right after “/images/logo-confluence.png” is loaded.
(same browser versions and OS as above)
Via Electron
What I tried
- in the war folder, I ran
npm install
- npm start
What happened: As on Chrome, it never got beyond the initial page as it seemed to be unable to access needed javascript files, e.g. file:///home/[somefolders]/mxgraph2/javascript/src/js/mxClient.js.
Note that the repo was cloned into file:///home/[somefolders]/draw.io/ initially, so the file looked for is not even searched for in the repo.
Sorry for the long issue, I hope the descriptions are clear enough. Also, if you need any more extensive log files, I can provide those too.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (8 by maintainers)
Top GitHub Comments
If you want to run draw.io locally you can:
python -m SimpleHTTPServer 8000
) in the/war
directory.index.html
with the parametersoffline=1
andhttps=0
, (e.g.http://localhost:8000/index.html?offline=1&https=0
)Thanks for any help