rstudio / shiny

Easy interactive web applications with R
https://shiny.posit.co/
Other
5.37k stars 1.86k forks source link

runApp() opens incorrect URL for RStudio servers #98

Closed erichare closed 10 years ago

erichare commented 11 years ago

Absolutely loving Shiny. Great job. I did notice one issue in my testing. If I'm working off a remote RStudio server (or, theoretically, a remote R server although I've yet to do this), and I go to run an app with runApp(), a browser pops up attempting to connect to localhost:8100 rather than rstudio_server_url:8100. The relevant code is this line:

appUrl <- paste("http://localhost:", port, sep = "")

Is there any way that the URL of the server instance (as retrieved from the browser) can be used instead of localhost, if running in an rstudio server?

jcheng5 commented 11 years ago

Yeah, this is a mess, sorry. We don't have our RStudio Server + Shiny story straight at all, but hope to resolve that in the medium term.

erichare commented 11 years ago

No problem at all! You guys are doing a great job, I just figured I'd report the issue in case this is a less common use case for the development team. Best of luck.

yihui commented 10 years ago

This issue has been solved in RStudio Server, but I do not remember if it is still in the development version (I only tested the development version).

jamiecmontgomery commented 9 years ago

Has this been fixed? Just tried running this gist on RStudio Server and it runs yet nothing is showing up in the viewer pane, or in an external window when using shinyApp(ui, server,options = list(launch.browser =TRUE))

I've had this problem with other shinyapps as well...is there documentation on running shiny from rstudio server?

yihui commented 9 years ago

@jafflerbach What is your RStudio Server version? I believe it have been fixed. However, you need to make sure your web browser does not block pop-up windows from RStudio Server.

jamiecmontgomery commented 9 years ago

RStudio Server version version is 0.98.1091

My web browser pop-up blocker is disabled, and it is still failing to load.

yihui commented 9 years ago

@jafflerbach Can you try a more recent version? http://www.rstudio.com/products/rstudio/download-server/ Sorry I do not work on RStudio Server, so I may not be the best person to answer this question.