Comments (35)
@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.
from learnr.
@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.
from learnr.
from learnr.
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
After clicking "Continue" (no change)
After clicking "Start Over"
After clicking "Continue" a second time
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.
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.
from learnr.
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.
@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.
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.
from learnr.
from learnr.
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.
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.
from learnr.
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.
I'll close this as it looks like the issues have been resolved. @garrettgman Please re-open if you see additional problems.
from learnr.
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
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
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.
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.
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):
@garrettgman This 500 error would explain all of the other issues you are seeing regarding revisiting of tutorials.
from learnr.
I've confirmed that this also occurs on beta.rstudioconnect.com:
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.
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:
from learnr.
@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.
@robbyshaver I've seen that before, but thought it was my web browser autofill misfiring. When I retyped the URL it worked.
from learnr.
@jspiewak Should all application names be lower case? Good to know
from learnr.
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.
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.
This should now be fixed. @garrettgman Could you confirm that all is well on your end?
from learnr.
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:
-
There is a noticeable delay between when a tutorial loads and when it advances to the saved state.
-
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.
from learnr.
@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.
Okay, found the problem. All should be well! (please test your tutorials and let me know if you see any problems)
from learnr.
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.
This seems to be working. Closing
from learnr.
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.
from learnr.
Related Issues (20)
- Flashcards HOT 1
- webR support? HOT 1
- Release learnr 0.11.3 HOT 5
- Add a function to update code box dynamically from server
- Port to Quarto environment? HOT 2
- `?` shows `_` between each letter in the title of the documentation HOT 1
- Error if `-solution` chunk has an unneeded `exercise.setup` option HOT 1
- Make learnr tests less brittle wrt error classes
- Improved `try_again` checkbox question message does not apply when question is created by `question()`
- Option to precompile/render html HOT 2
- The 'message' field of feedback must be a character vector or an htmltools tag or tagList HOT 4
- Release learnr 0.11.4
- verbatim environment does not work in learnr R markdown files HOT 2
- Can't access data in data folder tutorial directory HOT 1
- Hashpipe-style chunk options cause learnr to crash HOT 1
- Progressive Reveal for Topics at Level 2 Header ##
- Example tutorials that require gradethis should error if not installed
- Fix CRAN issues in Debian r-devel
- Release learnr 0.11.5
- YAML options to customize included directories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learnr.