Closed vizJS closed 7 years ago
Hi @vizJS, do you have a presentation example so we can reproduce the problem? Thanks!
Hi @vizJS, you already described the solution to your problem here, when saying
Interestingly, the issue doesn't appear when opening http://localhost:9000/, only when opening index.html or dist/index.html directly.
The behavior you are seeing is due to a security restriction in your browser when using the file://
protocol. The error message
Failed to get the Markdown file slides/index.md. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///< project folder path >/dist/slides/index.md'.
already includes the hint
Make sure that the presentation and the file are served by a HTTP server and the file can be found there.
So, this is not a bug, you just need to access your index.html
via an http server (not via file://
).
Hi @vizJS,
as @janraasch said, you need a http server. You could use something like python -m SimpleHTTPServer
or Node's http-server
.
Thank you for the clarification. I understand now what was happening, and I'll concede that the generator appears to be working as it was designed to.
I had different expectations for the behavior of the generated app in Chrome, based on the behavior I'd observed in Safari. My mistake!
When running the produced html files in Safari, the generator effectively creates a standalone html slider without any need of an http server. This would have been very useful to me if it had also worked that way in Chrome.
Unfortunately, I can't run Safari in production. So altho the generator works as designed, I'll still need to find a workaround for my particular use case.
The key constraints are that I don't have admin privileges, and I have to run in Chrome on Windows Vista. Strange, I know. I guess my next step is to find a preferred http server I can install in user mode.
Thank you again for making this tool, and for your timely response to my issue!
With Firefox, there is no problem displaying via file://
Problem
Slideshow stops and shows error dialogue, awaiting user interaction, every time index.html loads an html or markdown slide in Chrome. On both Mac OS X 10.11 and Windows Vista.
Steps to Recreate the Issue
grunt dist
command. Necessary.Alternatively, just make a new html or markdown slide with
with or without the
--markdown
or--attributes
, build, and open dist/index.html in Chrome. The result will be the same.Result
When index.html loads, a pop up error dialogue box appears that says:
Failed to get the Markdown file slides/index.md. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///< project folder path >/dist/slides/index.md'.
The slide show just sits there waiting for user interaction, effectively disabled. There is a checkbox to disable future dialogues from this page. Once the error is acknowledged by clicking the 'OK' button, the slide show continues and plays as normal, except for two things:
Interestingly, the issue doesn't appear when opening
http://localhost:9000/
, only when opening index.html or dist/index.html directly.My application requires a 5 minute auto-refresh cycle in Chrome, with no NodeJS supported on the release machine, and so this bug disables my use of this tool, except if I continue to produce slide content exclusively in the form of background images. I wish I had discovered this before I developed all that content!!! It took me a while to discover, because my slides were initially just background images attached in the attributes for each slide, with zero markdown or html references. Ouch!
First Response
As a temporary fix, I:
slides/list.json
, rebuilt the project, and distributed the build to release. And so removed the offending slide from the release version running on the front desk display kiosk.Diagnostic Efforts
Then to try to diagnose the issue, I:
slide-name.html
toslides/slide-name.html
inslides/list.json
. Rebuilt and retested, yielding the same kind of error dialogue in Chrome.yo reveal
, yielding the same kind of error dialogue in Chrome.Status
At this point it's very clear to me that this is a fault in generator-reveal. So I'm reporting to you!
I imagine further steps could be taken to narrow down the source of the XmlHttpRequest error. I don't yet know what those steps would be.