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

Slide Notes timer doesn't work #1922

Closed
vvug opened this issue Jun 17, 2017 · 17 comments
Closed

Slide Notes timer doesn't work #1922

vvug opened this issue Jun 17, 2017 · 17 comments
Labels

Comments

@vvug
Copy link

vvug commented Jun 17, 2017

When I open the Slide Notes browser page (pressing s) the timer doesn't start. I'm using Chromium and I'm getting this error in the console

Uncaught ReferenceError: Reveal is not defined
    at getTimings (notes.html:484)
    at setupTimer (notes.html:541)
    at handleConnectMessage (notes.html:387)
    at notes.html:354

this doesn't happen in the standard view. I'm using the latest git version with Chromium 59. I'm initializing the presentation like this:

    <script src="../reveal.js/lib/js/head.min.js"></script>
    <script src="../reveal.js/js/reveal.js"></script>
    <script>
      Reveal.initialize({
          dependencies: [
            // Interpret Markdown in <section> elements
            { src: '../reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
            { src: '../reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
            { src: '../reveal.js/plugin/notes/notes.js', async: true }
          ],
          slideNumber: false
      });
    </script>
@srushe
Copy link

srushe commented Jun 19, 2017

I'm seeing the same issue. This bug appears to have crept in in commit 715cf0b.

@hakimel
Copy link
Owner

hakimel commented Jun 20, 2017

Took a while but I found out how to reproduce that error. It happens when you press the 'S' to open the speaker view, and then go back to the main window and press the 'S' key again while the popup is still open in the background.

It's not happening when first opening the speaker view in any browser that I've tested.

Wasn't able to find a way to fix it yet though.

@vvug
Copy link
Author

vvug commented Jun 20, 2017

To me it does happen the first time I press s.

@aaroncampbell
Copy link

It happened for me the first time I pressed s as well. Using incognito mode fixed it for me, so I think it was some kind of caching issue (I had upgraded from a previous release). Killing all cache didn't seem to help, but restarting Chrome did.

@seanho00
Copy link

I'm pulling Reveal from a CDN and have run into this issue as of 3.5.0, due to a CORS issue for the slide timing stuff.

Because notes.html is on the CDN and the main presentation is on a different domain, notes.js:25 fails, and the pop-up never gets a reference to the main window's Reveal object.

Would it be possible to use the existing message-passing postMessage() channel between the two windows to send the slide timing data, so that the Reveal object doesn't need to be shared between the two windows?

This issue doesn't appear when notes.html is on the same domain as the main presentation.

@kuncevic
Copy link

kuncevic commented Sep 30, 2017

If I just git clone https://github.com/hakimel/reveal.js and then run demo.html pressing s timer just won't start and in console window what I can see is Uncaught ReferenceError: Reveal is not defined

@seanho00
Copy link

seanho00 commented Oct 1, 2017

@kuncevic, are you opening demo.html directly in the browser (file:/// URL), or running a local web server?

As per the documentation on speaker notes, notes only work from a web server.

@kuncevic
Copy link

kuncevic commented Oct 1, 2017

@seanho00 i c, thanks for pointing that out. I was using a file:///

@sbegueria
Copy link

I'm having the same issue: timer not working when pressing 's', either on Chrome and Safari.

@lechten
Copy link
Contributor

lechten commented Dec 4, 2017

For me the following works with Firefox (for presentations served from a web server as well as with local files):

  1. Press "s"
  2. Allow pop-ups. The speaker view window opens, timers stay at 0.
  3. Close the pop-up window
  4. Press "s" again. The speaker view window opens, timers advance.

@sbegueria
Copy link

sbegueria commented Dec 4, 2017

You're right, I got the same behavior on Firefox (for Mac). I could not replicate it on either Safari or Chrome, though: the timer is not working even the second time I open the window.

Update: That was when reading from a local file, when I read a presentation served from a web server the timer works OK on the three browsers, the first time I open the speaker window.

@bnjmnt4n
Copy link
Collaborator

bnjmnt4n commented Feb 1, 2018

Closing since this isn't an issue as notes are meant to be run from a server for postMessage to work properly.

@bnjmnt4n bnjmnt4n closed this as completed Feb 1, 2018
@pioorg
Copy link

pioorg commented Mar 23, 2018

@bnjmnt4n

notes are meant to be run from a server

Why is that?
What's wrong in using notes (in speaker view) locally, without any server?
Previous versions used to work like that.
Please note that there are many cases in which there's no way to be online or start any server. All you can to is to show your presentation using attached USB drive.
"Be online/use server or don't use notes" is IMHO a ridiculous requirement.

EDIT: this seems to be fixed by this PR: #2104 ?

@WebWorkingMan
Copy link

WebWorkingMan commented Sep 13, 2018

Took a while but I found out how to reproduce that error. It happens when you press the 'S' to open the speaker view, and then go back to the main window and press the 'S' key again while the popup is still open in the background.

It's not happening when first opening the speaker view in any browser that I've tested.

Wasn't able to find a way to fix it yet though.

@bnjmnt4n @hakimel

This bug is still present. I can reproduce it e.g. on https://revealjs.com/ You may reconsider to open this issue again.

@ccamara
Copy link

ccamara commented Sep 18, 2018

I am having the same issue here.

@hakimel
Copy link
Owner

hakimel commented Sep 18, 2018

I tested revealjs.com again in Chrome canary/stable but the timer is working every time, except for the issue with pressing S while notes are already opened that I described above.

#2104 looks like a good improvement to make the notes work locally.

I've moved the timer bug when opening notes twice to a new issue #2229

@mshagirov
Copy link

I had the same issue, the timer didn't work for safari and chrome (whichever way I press "s").

Following the "full setup" from https://github.com/hakimel/reveal.js/ solved the issue.

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

No branches or pull requests