I'm new to Shiny, but not new to R. Because of work, I'm now doing R development in RStudio server. It is running on Google Compute Engine, if that makes a difference. RStudio server runs just fine, but Shiny is having problems.
After installing shiny, I ran the example command:
runExample("01_hello")
At first, this brought up the Hello Shiny! app, but everything was grey. I restarted RStudio, cleaned the workspace, and ran the command again. Now a window pops up, but it immediately disappears. I tried restarting RStudio server, and running in a different browser, but the behavior continues.
I've tried quickly clicking the "Open in Browser" button, and that gets me a tab in my browser that's grey, just like before I restarted.
Any suggestions? Thank you.
EDIT:
When I launch the example, the RStudio console gives:
Listening on http://127.0.0.1:4096
And just sits there until I press esc.
The IE Console gives no errors (although I'm also not sure if I'm using it right--not a web guy, sorry).
The Chrome console does give an error:
'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.
Which has a link to VM320:6635 which reads:
function _b(b,c){var d=b;var e=Gni(function(){var a=wj();d.Df(a)});return $wnd.webkitRequestAnimationFrame(e,c)}
I've figured out my issue, mostly. The window still closes as soon as I launch the Shiny app, but now I can navigate to the Shiny app. This is good enough for me to consider this fixed.
There were two things I had to do. First, I had to open up the port that Shiny was listening on using GCE's command line, which was the second answer here, using the command line: How to open a specific port such as 9090 in Google Compute Engine
Then, I had to launch the Shiny app with the following command:
This works with the
runApp
command as well. 9999 is the port number you open with GCE, andhost=0.0.0.0
seems to tell Shiny to listen for external connections (from the in-R?runApp
help documentation). You need to literally put 0.0.0.0 in, not the IP of your machine or anything like that.Even though the window closes still when I launch the example, I can how navigate to the external IP of the instance with the port number and use the Shiny app.
Thank you both for your assistance. Please feel free to comment if you think anything more should be said.