Hey there,
I'm teaching a class in R this week and in a bit of a pickle because of this whole COVID-19 thing - I have to transition all my lecturing to online. I thought I'd take the opportunity to try out RStudio Cloud for some live coding.
Unfortunately, there seems to be a problem in how I'm launching localhost web apps in RStudio cloud.
Here is a link to my project: Posit Cloud (it is public).
When I run the same code locally, I serve up the app (Rscript app.R
), and can then open the app in either a browser, or in the viewer using rstudioapi::viewer("http://localhost:8050")
Here is a screenshot of it working (locally) --> can't add two screenshots... darn.
And here's what happens when I try to run it in RStudio Cloud:
It's stuck on the loading screen. When I right click in the viewer and click open frame in new window, the new URL is: https://firas-moosvi.rstudio.cloud/3a97e29ffc204637b4884ab0047ebb09/p/359db0e0/?viewer_pane=1&capabilities=1&host=https%3A%2F%2Ffiras-moosvi.rstudio.cloud
But it's still stuck on the loading screen. The only thing I could thing to do was use the Javascript console to look at errors. It seems the app cannot find the resources it needs at this address :
[Error] Failed to load resource: the server responded with a status of 404 () (dash_renderer.v1_2_2m1584421283.min.js, line 0)
This https://forum.posit.co/t/launching-localhost-web-apps-in-rstudio-cloud/21078/12
topic was very helpful in getting me started at some things to try, but eventually I think our issues diverged.
Appreciate any tips you might have!