Giter Site home page Giter Site logo

Comments (35)

garrettgman avatar garrettgman commented on July 24, 2024 1

@jjallaire I'm no longer sure that this is a shiny-prerender issue. Re-rendering and redeploying has failed to activate the Continue button on several more apps (even on apps that I delete from shinyapps.io before redeploying).

Instead, this reliably fixes the problem: after deploying the app and verifying that the Continue buttons do not work, I click "Start Over". Then the buttons begin to work.

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

@jjallaire That seems to be the source, but re-rendering and redeploying did not fix the Continue button until I deleted the app from my shinyapps.io account and then redeployed it (a heavy handed attempt to clear the files on shinyapps.io). Is there a better way to make sure that the app is being re-rendered on the shinyapps.io server?

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

All of the example tutorials seem to display the behavior when you visit them the first time. Here are some screenshots of https://tutorials.shinyapps.io/00-setup/ with the JavaScript console (is this the log you have in mind?)

Immediately after page load

screen shot 2017-03-17 at 12 58 11 pm

After clicking "Continue" (no change)

screen shot 2017-03-17 at 12 58 39 pm

After clicking "Start Over"

screen shot 2017-03-17 at 12 58 54 pm

After clicking "Continue" a second time

screen shot 2017-03-17 at 12 58 59 pm

Note that some of the tutorials begin with a Welcome section (##), but no sub-section (###) in the first topic. In these tutorials, the first Continue button is a proxy "Next Topic" button and works as expected. However, the true "Continue" buttons, which advance between sub-section do not work.

from learnr.

robbyshaver avatar robbyshaver commented on July 24, 2024

So if you press "Start Over" everything works fine? If that's the case, I suspect this issue was caused by the recent code change of skipping sections instead of exercises.

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

It sounds like though that this error occurs for even newly deployed tutorials (i.e. it happens until there is some history to replay at startup, if there is no history at startup then we get the JS error seen above). @robbyshaver Do you have enough to go on here?

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

@robbyshaver I can confirm that if you visit a tutorial for the very first time you will get that JavaScript exception (it goes away after "Start Over"). My guess is that your code is implicitly assuming that some history will have been played back from the server and when that isn't the case there is a data structure that isn't populated the way you expect.

from learnr.

robbyshaver avatar robbyshaver commented on July 24, 2024

Looking at https://tutorials.shinyapps.io/01-data-basics/, here's the error I'm seeing in the console. It's old code - the exerciseSkipped function doesn't exist anymore.

image

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

Thanks @robbyshaver. It looks like there have been several pull requests since I updated tutor this morning, one involving exercise_skipper. I reinstalled tutor (right now), re-rendered each tutorial, and re-deployed to the links below, but I seem to get the same bad behavior (but maybe inconsistently? -- 00-setup seems to work).

Can you guys confirm?

https://tutorials.shinyapps.io/00-setup/
https://tutorials.shinyapps.io/01-data-basics/
https://tutorials.shinyapps.io/03a-data-manip-filter/
https://tutorials.shinyapps.io/03b-data-manip-mutate/
https://tutorials.shinyapps.io/03c-data-manip-summarise/

from learnr.

robbyshaver avatar robbyshaver commented on July 24, 2024

Just took a look - the code running is more up to date and I am seeing tutor firing a section-skipped event on an undefined section when I first open some of the tutorials (3a and 3b).

However, the code does not include the possible fix I checked in a an hour or so ago, so if you could get the latest and repost, that would be helpful.

I'm also seeing occasional internal server errors when I open 01.

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

I re-installed tutor at 7:22 tonight after your messages and re-rendered, and re-deployed each tutorial. It seems to me that the Continue buttons may now work correctly.

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

I'll close this as it looks like the issues have been resolved. @garrettgman Please re-open if you see additional problems.

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

I've encountered this behavior again: the continue buttons do not work when I deploy to shinyapps.io_ (continue buttons always work locally).

I may have identified a cause:

If I deploy a tutorial after clicking "Start Over", or before completing any sections, the tutorial works correctly on shinyapps.io. For example, I deployed this tutorial in this way and it works correctly: https://tutorials.shinyapps.io/04-programming-basics. Here's how it looked before I deployed it

screen shot 2017-06-12 at 11 29 43 am

If I deploy the tutorial after completing sections and without clicking "Start Over", (e.g. with a history), the tutorial does not work on shinyapps.io. For example, I redeployed the same tutorial after completing a few sections here: https://tutorials.shinyapps.io/04-programming-basics-alt. In this version, the continue buttons do not work, with the exception of the continue button at the end of the first section (Welcome), which is actually a disguised "Next Section" button. Here's how the tutorial looked before I deployed it

screen shot 2017-06-12 at 11 29 37 am

Note: I can sometimes get the continue buttons to work in the broken tutorial by jumping around between sections within the tutorial.

TL;DR - It seems that you need to erase a local tutorials history by clicking "Start over" before you deploy it to shinyapps.io. If you do not, the continue buttons will not work when deployed.

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

An addendum to the last comment: the continue buttons for the good link above have stopped working for me on subsequent visits (https://tutorials.shinyapps.io/04-programming-basics).

I also notice that the tutorial does not seem to remember my progress when I revisit it later.

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

It's possible that this is a shinyapps.io error. @jspiewak I see the following 500 error when revisiting the tutorial on shinyappsio (this doesn't occur locally):
screen shot 2017-06-13 at 7 48 31 am

@garrettgman This 500 error would explain all of the other issues you are seeing regarding revisiting of tutorials.

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

I've confirmed that this also occurs on beta.rstudioconnect.com:
screen shot 2017-06-13 at 7 59 47 am

Simple repro Rmd is:

---
title: "Tutorial"
output: learnr::tutorial
runtime: shiny_prerendered
---

```{r setup, include=FALSE}
library(learnr)
knitr::opts_chunk$set(echo = FALSE)
```

## Topic 1

### Exercise 

*Here's a simple exercise with an empty code chunk provided for entering the answer.*

Write the R code required to add two plus two:

```{r two-plus-two, exercise=TRUE}

```

This is AFAIK a new error condition. Perhaps a change in a recent version of RSC or (less likely so) Shiny? @trestletech Could you take a look at this as well?

from learnr.

robbyshaver avatar robbyshaver commented on July 24, 2024

I don't know if this is related or not, but when I try to view the tutorial at: https://tutorials.shinyapps.io/04-programming-basics, I get the following error:

image

from learnr.

jspiewak avatar jspiewak commented on July 24, 2024

@robbyshaver unrelated, that is bug with lucid where it doesn't deal with incorrectly cased applications. The actual URL is https://tutorials.shinyapps.io/04-Programming-Basics/

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

@robbyshaver I've seen that before, but thought it was my web browser autofill misfiring. When I retyped the URL it worked.

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

@jspiewak Should all application names be lower case? Good to know

from learnr.

jspiewak avatar jspiewak commented on July 24, 2024

Well, we should fix the bug for starters.
The work around is to use the same case in the URL as when the application was created.
If one always lower cases application names, then one doesn't need to think about it.
But really we should just fix the bug already. :)

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

I now have a local repro for the 500 error (it has to do with how jsonlite is round-tripping R data structures, perhaps something changed in the v1.5 version of jsonlite). More soon!

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

This should now be fixed. @garrettgman Could you confirm that all is well on your end?

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

Thanks guys. I can no longer reproduce the error.

@jjallaire I do notice two things. Let me know if you'd like me to open them as new issues:

  1. There is a noticeable delay between when a tutorial loads and when it advances to the saved state.

  2. I deployed the same tutorial in two places (to make the comparison above). They seem to share state now (each advances to where I left off in the other).
    https://tutorials.shinyapps.io/04-programming-basics/
    https://tutorials.shinyapps.io/04-programming-basics-alt/

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

@jjallaire, I am using Google Chrome. Here is the source code:
https://github.com/rstudio/ggtutorials/blob/master/the-basics/04-Programming-Basics/04-Programming-Basics.Rmd

from learnr.

jjallaire avatar jjallaire commented on July 24, 2024

Okay, found the problem. All should be well! (please test your tutorials and let me know if you see any problems)

from learnr.

garrettgman avatar garrettgman commented on July 24, 2024

Ferit observed the behavior reported in the original issue today (10/17/2018) while working through https://rstudio.cloud/learn/primers/2.3, i.e.

The second Continue button in the tutorial did not advance the tutorial in Google Chrome (the first Continue button is a Next Topic button). The Continue button began to work when he revisited the tutorial later.

from learnr.

schloerke avatar schloerke commented on July 24, 2024

This seems to be working. Closing

from learnr.

amf60 avatar amf60 commented on July 24, 2024

R studio Cloud - Primer - Iterate - "Continue" button issue -

despite having correctly answered the exercise the progress to next part is blocked by a pop window saying "You must complete the exercise in this section before continuing". Forced the way to the next part and got the same issue with the other sessions of iterate. So I am uncertain of the real progress done with this very important lesson. Thank you in advance for your help.

Screenshot 2020-09-16 at 14 42 20

from learnr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.