Analyses tab: error previewing analysis
Using the new beta Analyses tab, I created an RStudio notebook and ran some code in an RStudio environment. I later returned to the "Analyses" tab and clicked on the notebook name, but I got an "Error previewing analysis" with details "Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."
Comments
14 comments
Hi Stephanie,
Thank you for writing in about this issue. Can you share the workspace where you are seeing this issue with Terra Support by clicking the Share button in your workspace? The Share option is in the three-dots menu at the top-right.
Can you also send a screenshot of the error you're receiving? I'll be happy to take a closer look as soon as I can!
Kind regards,
Pamela
Hi,
I shared with support. Here's a screenshot of the error after clicking "details":
thanks,
Stephanie
Hi Stephanie,
Thank you for this information and the screenshot. I am able to reproduce the error on my end. Are you still able to open and edit the notebook after restarting your RStudio environment?
Kind regards,
Pamela
Yes, it works fine in RStudio.
Hi Stephanie,
Thank you for letting me know. It looks like this is actually a bug with previewing Rmd files that our engineers are working on resolving. I'm glad that for now, you are still able to view and edit your notebook. I can let you know when I have any updates on the fix.
Kind regards,
Pamela
I'm curious why they don't just use the standard R notebook header and then display the ".nb.html" file automatically generated by RStudio? That would be a lot more intuitive for experienced RStudio users.
Hi Stephanie,
From investigating the .Rmd file of the previous user who is also seeing the preview error, it looks like there was a specific line in the file that was interfering with the preview. We aren't sure why the line is causing the error so our engineers are looking into it to resolve the preview issue. Thank you for your suggestion and I can pass this information along to our engineers. Please let me know if you have any further questions in the meantime.
Kind regards,
Pamela
Is there an update on this? I'm still having this problem even though the Analyses tab is out of beta. I'd like to create some public workspaces to share with colleagues, but being unable to preview my notebooks is a blocker.
Hi Stephanie,
Sorry for the delayed response. It appears that the fix for the preview error bug was deployed to the system, so it may be that there is a different issue causing this is same error, or a different bug is affecting the same outcome. I'm sorry for any inconvenience this may be causing.
What I'd like to do now is help troubleshoot this issue and see if we can help resolve it. I have a few follow up questions:
The answers to those questions will help us to move forward with our troubleshooting. Please let me know if you have any questions.
Best,
Josh
I have deleted and recreated the cloud environment and persistent disk, and I still can't preview my analysis. this is the workspace (shared with support): https://anvil.terra.bio/#workspaces/primed-stephanie/PRIMED_1000G_genotype_demo
Hi Stephanie,
Thanks for the information! I took a look at the workspace and was able to replicate the issue in my testing workspace with this notebook file. While the file can still be edited in RStudio, it does appear there is still an issue with previews for .rmd files. I've already let our engineering teams know of this issue, and I'll reply to this thread as soon as I have any updates.
Please let me know if you have any questions.
Best,
Josh
I do have a question: I'm curious how the notebook output is generated for the preview (when it works correctly). I've been using RStudio notebooks for a long time, and they always have the following header:
When code in a file with this header is run and the file is saved, it writes to an HTML output file. I would have expected AnVIL to simply use these output files to display notebook previews, but that doesn't appear to be the case, since notebook files are created without headers and in the simplest cases can display without them as well. So I'm curious how the previews are generated, and if using the headers interferes with that process in any way, because I prefer to save my notebooks that way so I can share the HTML files outside of AnVIL as well.
Hi Stephanie,
Thanks for the update! Our engineering teams were able to determine that there is in fact a different bug affecting this .rmd file, and we're currently working to get that resolved as soon as we can. I'll let you know once we have any updates
As for your question: Terra has a background service that generates the HTML for the preview outside of the Rstudio Knit function. This is done partially for interoperability between R and Python notebook files.
Please let me know if that information was helpful or if you have any questions.
Best,
Josh
Hi Stephanie,
I wanted to give you an update. While our engineering teams are still investigating the bug affecting previews of .rmd files, we may have a workaround for you to use in the meantime. The Knit function of RStudio will run the notebook and return a HTML file with both the notebook text as well as output.
We did however notice it failing on this notebook file and after some tests we found that we were able to make it work with the follow steps:
In RStudio, run this command from the Console pane:
You'll be prompted which packages you'd like to update. Select "1" for all. Then run this command:
After that, select the notebook file and then select the Preview button from the preview pane and select the Knit option. After that, the application will return a new HTML file with the text and output in it. You can then download the file to distribute.
While it is not a perfect solution, it is important to us that you have a workaround while we investigate this issue. I'll let you know once I have any more updates.
Please let me know if you have any questions.
Best,
Josh
Please sign in to leave a comment.