-
Notifications
You must be signed in to change notification settings - Fork 240
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
Intermitent parse error trailing garbage error #597
Comments
Two related RStudio Community posts: |
From |
It's miltiple students. We tell students to update to the lastest Rstudio (which should update Markdown shouldn't it?), so that's what they should be running. Anbd yes, they'd have the latest learnr from CRAN because we can't build from source in university computer labs (at least not easily) so we have to try to stick with CRAN packages. I can ask my tutors to get |
Yes, asking for Another thing that could be helpful would be to send me the prerendered HTML file for the tutorial. When the error arises, you could ask the user (possibly with the tutor's help) to find the # Navigate to the tutorial's folder in the RStudio Files pane
rstudioapi::filesPaneNavigate(
system.file("tutorials", "discovr_XX", package = "discovr")
) |
Total newbie here. I consistently get the error when trying to run tutorial "Filter observations". Here's the output of
In @gadenbuie 's suggestion, I didn't know what However, the problem disappeared after issuing |
@bwagner The system.file("tutorials", package = "learnr")
#> [1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/learnr/tutorials" and then you can look in that folder to see the list of tutorials dir(system.file("tutorials", package = "learnr"))
#> [1] "ex-data-basics" "ex-data-filter" "ex-data-mutate"
#> [4] "ex-data-summarise" "ex-setup-r" "hello"
#> [7] "polyglot" "quiz_question" "setup-chunks"
#> [10] "slidy" or find the folder for a specific tutorial system.file("tutorials", "ex-data-filter", package = "learnr")
#> [1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/learnr/tutorials/ex-data-filter" If you can reliably reproduce this issue with the Filter observations tutorial, would you mind following the steps above and sharing the |
Attached is a zip file containing three recent cases. Each case I include the pre-renedered html file and the session info. I hope this is useful. |
added two more cases, case 5 includes 2 html files from sequential failures. Updated RStudio and it rendered after that |
Hi, @profandyfield, we had the same issue publishing to an RStudio Connect server (exact same error messages). Everything worked fine last year, but this year we couldn't publish anything (even ones that worked last year). We found that the issue was the latest version of RStudio that we were publishing from - if we downgraded from that, we didn't have the issues any more. Our errors popped up every time though, so I guess slightly different. Not sure if that's helpful, but you are not alone! |
we've been collecting some of these errors throughout term (this is not exhaustive by the way, just a selection of instances where we've been around to collect the failing html file and the session Info). There's now 15 cases (the first 5 cases are the same as those that I posted on Oct 22nd). I'm happy to keep stockpiling these if it's useful, but if it's not let me know and I'll stop |
Hi @profandyfield , were you able to solve this? we are facing a similar issues on shinyapps. thanks! |
Hi @gadenbuie , me again :) We started facing this issue when we upgraded from free to the basic plan and started changing the setting for the app ( maybe not related, but worth mentioning). We see this error happen after the app goes to sleep for some time and then we try to access it. any pointers on this, please? thanks! |
Hi @yassinza – I've spent quite a while looking into this on many occasions. I have some theories, but the fact that I haven't been able to reliably reproduce it has been a major hinderance. Would you be able to send me the |
One thing that might work to help avoid this is to set the
(If that does help, please let me know. That information will help isolate the bug.) |
Hi all. Thank you very much to everyone in this thread for your help with this bug. In particular thank you @profandyfield and @yassinza for providing example files. My apologies that this took so long to track down, but in returning to this issue with fresh eyes I found a new thread to pull and I think I understand why the bug is happening (but I still don't entirely know how this is happening). In rstudio/rmarkdown#2499 I've outlined the mechanics of the bug as I understand it, and in rstudio/rmarkdown#2500 I've provided a work-around that at least avoids the crash on app startup. If you can try that PR, I'd appreciate it. remotes::install_github("rstudio/rmarkdown#2500") |
Thanks a lot @gadenbuie!
It was there before also, and seems to happen right before the parsing error.
As agreed I will open a support ticket at this point, thanks a lot! |
Hi @gadenbuie , I Just wanted to update you on this. We are using both fixes together now. This is the error we see:
The app works fine upon refreshing the page though. Thanks! |
So I think there must be two root causes here that are different depending on whether the tutorial is running under RStudio or under connect. We'll still need to research @yassinza's connect/shinyapps.io variant, but the RStudio one is probably this: You can reproduce this most of the time by running on a remote instance of RStudio so that there is some network latency involved, and double-clicking on the @gadenbuie gets most of the credit for identifying that the error message is caused by a corrupted html file and that one way to generate such a file is to render it twice concurrently. All I really did from there was think like a user 😁 |
We've continued to pursue this and there are now bugs open in Connect, RStudio Server, and |
Thanks a lot! Let me know if I can help in any way. |
Sorry for my silence - just got back from leave. We switched to teaching with posit cloud this year instead of a campus-install of RStudio run over a network via a software hub and we've had hardly any (maybe none?) of these errors. I think this corroborates the network latency/double click explanation of the error because when we used the software hub RStudio we had endless issues with the network connection between the users PC and Rstudio being slow that we just don't get with posit cloud. Anyway, thought this info might be worth sharing. |
I'm using a package of learnr tutorials for teaching that I wrote (https://github.com/profandyfield/discovr ).
Some students intermitently get the following error when the click 'start tutorial'.
I had similar issues last year as well which remained unresolved. I can't post a reporducible example because we can't reporduce it: We can't see any consistent predictors of when it happens or for whom. It feels impossible to debug but I also don't really understand the process of what happens when someone clicks the 'start tutorial' button (other than it reneders my RMD into a tutortial ... or how it uses a stored html file when a tutorial starts or how a stored html might become corrupt.
We have students who, for example, load a tutorial successfully using the RStudio tutorials pane, but then next time they load it they get this error. Based on my explorations last year I assume it's an error with the html renedering. Consistent with this assumption if we (a) manually delete the html of the problematic tutorial from the package library on their system, or (b) force a reinstall (which would also clear the html files) the problem goes away. However, it can return (for the same student).
I don't know if this is a bug, and I appreciate (really I do having tried to workiit out for over a year) how impossible it is to have a solution when we can't reliably reproduce the issue, but I would really appreciate some pointers about why this might be happening - like, some options to explore or some better understanding of the rendering process and why it might fail when it has succeeded before. Could this be down to user input in a previous session using the tutorial? Could it be to do with strange text in my hints? Is there something I can do within the tutorial to prevent it (I currently don't error catch any code that students type into exercises). Any useful pointers?
The text was updated successfully, but these errors were encountered: