Skip to content
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

Have some difficulties to access to the shiny app launched in rstudio on shinyproxy ? #3

Open
mos790 opened this issue Jun 1, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@mos790
Copy link

mos790 commented Jun 1, 2022

Hi,

I'm using the latest rstudio version with shinyproxy, basic script and packages installation seems to work.
When I start a shiny app with terminal Rscript app.R I get nonfunctional URL

Listening on http://127.0.0.1:5491

I also tried to configure the port and host directly in shiny app

options(shiny.host = '0.0.0.0'); options(shiny.port = 8888)

Have you some advice about for a working configuration ?

Thanks

@mnazarov
Copy link
Member

mnazarov commented Jun 1, 2022

Not really an advice, but a question - why do you start the app from the terminal and not from the console?.. the latter should work fine. And the former would similarly not work (I believe) also in a 'usual' rstudio server...
If you could share a bit more about your process and what you are trying to achieve, this might help to find a solution.

@mos790
Copy link
Author

mos790 commented Jun 1, 2022

Thanks for the reply.
You are right about the fact I can use directly the console for shiny apps.

My problem is about dash apps, I wanted to execute it from terminal ... Seems not to work in the console ...

It seems to be more about the port / host config ?

import dash
import dash_core_components as dcc
import dash_html_components as html
 
app = dash.Dash()
 
app.layout = html.Div(children=[
html.Div(children='Hi'),
dcc.Graph(
id='graphss',
figure={
'data': [
{'x':[1,2,3,4,5,6,7], 'y':[11,12,22,23,24,44,55], 'type':'line', 'name':'Energy'},
{'x':[1,2,3,4,5,6,7], 'y':[13,15,26,27,34,44,65], 'type':'bar', 'name':'Time'},
],
'layout': {
'title': 'Graph for Time and Energy'
}
}
)
])
 
if __name__ == '__main__':
    app.run_server(debug=False)

image

@LEDfan
Copy link
Member

LEDfan commented Aug 8, 2022

Hi

I'm afraid that if RStudio has no native support to host dash apps, this will not work in ShinyProxy currently.
We could introduce a feature to also proxy traffic to a different port, therefore I will keep this open as a feature request.

BTW, it seems that jupyter notebooks may have good integration for dash apps see openanalytics/shinyproxy#359 and https://github.com/plotly/jupyter-dash

@LEDfan LEDfan added the enhancement New feature or request label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants