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

Shiny works on 3838 but not in RStudio IDE (gray screen) [httpuv] #2064

Closed
philibe opened this issue May 18, 2018 · 15 comments
Closed

Shiny works on 3838 but not in RStudio IDE (gray screen) [httpuv] #2064

philibe opened this issue May 18, 2018 · 15 comments

Comments

@philibe
Copy link

philibe commented May 18, 2018

Hello,

I have two servers in ubuntu 16.04 xenial, the first doesn't work, the new one I Install; and the 2nd works. There are nearly identicals.

The symptom is that the Viewer, or external pane, displays the app and turn gray. It doesn't works even with simple App like Old Faithful Geyser Data . But it works well in web server by 3838.

I have not firewall in those 2 computers.

1) In this one Shiny 1.1.0 doesn't work into RStudio IDE, but works on web server by 3838

I've tried Shiny 1.0.5: same.
I've tried to install with dependencies: same.
I've tried to manage with lib path: same.

Same : it works on web but not into RStudio IDE.
Other R commands works well in RStudio IDE.

With these options, I don't see anything.

options(  error = function() {.rs.recordTraceback(TRUE)  })
options(shiny.sanitize.errors = FALSE)
options(shiny.trace= TRUE)
> sessionInfo()
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shinyRGL_0.1.0 rgl_0.99.16    shiny_1.1.0   

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16           digest_0.6.15          later_0.7.2            mime_0.5               R6_2.2.2               xtable_1.8-2          
 [7] jsonlite_1.5           magrittr_1.5           miniUI_0.1.1           promises_1.0.1         tools_3.4.4            manipulateWidget_0.9.0
[13] htmlwidgets_1.2        crosstalk_1.0.0        httpuv_1.4.3           yaml_2.1.19            compiler_3.4.4         htmltools_0.3.6       
[19] knitr_1.20     

rstudio-server-1.1.453-amd64.deb
shiny-server-1.5.6.875-amd64.deb

2) In this one Shiny 1.0.5 works into RStudio IDE and on web server by 3838

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] magrittr_1.5          scales_0.5.0          plyr_1.8.4            ggplot2_2.2.1         reshape2_1.4.3       
 [6] knitr_1.20            XLConnect_0.2-14      XLConnectJars_0.2-14  ggvis_0.4.3           devtools_1.13.5      
[11] rgl_0.95.1441         collapsibleTree_0.1.6 dplyr_0.7.4           statnet.common_4.0.0  xtable_1.8-2         
[16] RODBCext_0.3.1        DT_0.4                shinyRGL_0.1.0        shinydashboard_0.6.1  shinyjs_1.0          
[21] RODBC_1.3-12          shiny_1.0.5          

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.15       tidyr_0.8.0        visNetwork_2.0.3   assertthat_0.2.0   digest_0.6.15      mime_0.5          
 [7] R6_2.2.2           pillar_1.2.1       rlang_0.2.0        lazyeval_0.2.1     rstudioapi_0.7     DiagrammeR_1.0.0  
[13] downloader_0.4     readr_1.1.1        stringr_1.3.0      htmlwidgets_1.2    igraph_1.2.1       munsell_0.4.3     
[19] compiler_3.4.3     influenceR_0.1.0   rgexf_0.15.3       httpuv_1.3.5       pkgconfig_2.0.1    htmltools_0.3.6   
[25] tibble_1.4.2       gridExtra_2.3      XML_3.98-1.3       viridisLite_0.3.0  withr_2.1.1        grid_3.4.3        
[31] jsonlite_1.5       gtable_0.2.0       stringi_1.1.6      viridis_0.5.0      bindrcpp_0.2       brew_1.0-6        
[37] data.tree_0.7.5    RColorBrewer_1.1-2 tools_3.4.3        glue_1.2.0         purrr_0.2.4        crosstalk_1.0.0   
[43] hms_0.4.2          Rook_1.1-1         yaml_2.1.18        colorspace_1.3-2   memoise_1.1.0      rJava_0.9-8       
[49] bindr_0.1  

rstudio-server-1.1.419-amd64.deb
shiny-server-1.5.6.875-amd64.deb

@philibe
Copy link
Author

philibe commented May 22, 2018

By F12 Network I have a websocket error. I have not Nginx nor Apache, like my old server which is running without errors.

@philibe
Copy link
Author

philibe commented May 24, 2018

I broke and.... repaired the second which was ok : httpuv_1.3.6.2 + Rcpp_0.12.16 + shiny_1.0.5

install.packages(c(
'https://cran.r-project.org/src/contrib/Archive/httpuv/httpuv_1.3.6.2.tar.gz',
'https://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.12.16.tar.gz',
'https://cran.r-project.org/src/contrib/Archive/shiny/shiny_1.0.5.tar.gz'),
lib='~/R/x86_64-pc-linux-gnu-library/3.4',repos=NULL,type='source',
dependencies = TRUE )

For Information httpuv_1.3.6.2 + Rcpp_0.12.16 + shiny_1.1.0 doesn't work

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘httpuv’ 1.3.6.2 is being loaded, but >= 1.4.3 is required
ERROR: lazy loading failed for package ‘shiny’

After that I have to found and fix the problem of the 1st server which was KO.

@philibe
Copy link
Author

philibe commented May 24, 2018

same thing that #2073 about httpuv ?

@philibe philibe changed the title Shiny works on 3838 but not in RStudio IDE (gray screen) Shiny works on 3838 but not in RStudio IDE (gray screen) [httpuv] May 24, 2018
@philibe
Copy link
Author

philibe commented May 24, 2018

Rstudio IDE works now with shiny on my new server with httpuv_1.3.6.2 + Rcpp_0.12.16 + shiny_1.0.5

I will stay a moment at this config if the dependencies of other packages will not force me to upgrade. (shiny 1.1.0 is maybe too young for every configurations: one week ago :) )

@philibe philibe closed this as completed May 24, 2018
@philibe
Copy link
Author

philibe commented May 28, 2018

RStudio IDE seems to work with httpuv_1.3.6.2 + shiny_1.0.5 (dependencies = TRUE) and Rcpp_0.12.17 (dependencies = FALSE)

@diegoperoni
Copy link

Hi Philibe,
I've same problem after upgrading RStudio to last release.
I've downgraded my libraries as you suggested and now the problem is changed: the shiny popup opens correctly but immediatly it closes without logging errors.
This is my sessionInfo:
R version 3.4.4 (2018-03-15)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] shiny_1.0.5 ruta_1.0.2
[3] keras_2.1.6 magrittr_1.5
[5] plyr_1.8.4 quantstrat_0.10.0
[7] foreach_1.4.4 blotter_0.14.2
[9] PerformanceAnalytics_1.5.2 FinancialInstrument_1.3.0
[11] quantmod_0.4-13.1 TTR_0.23-3
[13] xts_0.10-2.2 zoo_1.8-1
[15] tensorflow_1.5

loaded via a namespace (and not attached):
[1] Rcpp_0.12.17 compiler_3.4.4 base64enc_0.1-3 iterators_1.0.9
[5] tools_3.4.4 boot_1.3-20 zeallot_0.1.0 digest_0.6.15
[9] jsonlite_1.5 lattice_0.20-35 rlang_0.2.1 Matrix_1.2-14
[13] curl_3.2 yaml_2.1.19 grid_3.4.4 reticulate_1.7
[17] R6_2.2.2 purrr_0.2.5 whisker_0.3-2 codetools_0.2-15
[21] tfruns_1.3 htmltools_0.3.6 mime_0.5 xtable_1.8-2
[25] httpuv_1.3.6.2 quadprog_1.5-5

It seems something similar to this recent bugfix:
rstudio/rstudio#2061

Do you have idea of what causes it?

Thanks in advance!

Diego

@wch
Copy link
Collaborator

wch commented Jun 5, 2018

@diegoperoni Does your problem sound like #2085? If so, can you comment on that issue? Thanks!

@philibe
Copy link
Author

philibe commented Jun 5, 2018

Hello @diegoperoni

I am not specialist on Shiny Config, only empiric.

What It seems for me, this :

  • OK: httpuv_1.3.6.2 + shiny_1.0.5 (dependencies = TRUE) and Rcpp_0.12.17 (dependencies = FALSE)
  • OK : httpuv_1.3.6.2 + shiny_1.0.5 + Rcpp_0.12.16 (dependencies = TRUE).
  • KO : httpuv_1.3.6.2 + shiny_1.0.5 + Rcpp_0.12.17 (dependencies = TRUE).

2nd one (ok) and 3rd one (ko) : in the sameinstall.packages(); 1st one (ok) with no dependencies for Rcpp_0.12.17.

Maybe it's the luck and the cause is something else I don't know.

@diegoperoni
Copy link

Thanks you for details.
Unfortunately doesn't work on my centos7
Diego

@jcheng5 jcheng5 reopened this Jun 7, 2018
@jcheng5
Copy link
Member

jcheng5 commented Jun 8, 2018

Thank you @philibe and @diegoperoni, we think we've figured it out!

Underlying issue: rstudio/rstudio#2940
Fix in RStudio: rstudio/rstudio#2951
Workaround in httpuv: rstudio/httpuv#153

Either the RStudio fix OR the httpuv workaround should solve the issue (devtools::install_github("rstudio/httpuv#153") if you want to verify).

@philibe
Copy link
Author

philibe commented Jun 9, 2018

Good news :) Thanks.

And as I understand these issues, Shiny 1.1.0 is possible now because it requires httpuv >1.4 fixed.

I will try the fix, but I have a little fear to break my config which works. Maybe I will wait a couple of days the test of @diegoperoni because his config doesn't work.

@diegoperoni
Copy link

It works perfectly!
Thanks to @jcheng5 and @philibe !

Diego

@philibe
Copy link
Author

philibe commented Jun 9, 2018

ah yes ? :) I will try at the beginning of the week.

@philibe
Copy link
Author

philibe commented Jun 11, 2018

Yes. It works :)

  • OK: shiny_1.0.5 + httpuv_1.4.3.9002
  • OK: shiny_1.1.1 + httpuv_1.4.3.9002

Thank you :)

(with rstudio-server-1.1.419-amd64.deb not changed)

@wch
Copy link
Collaborator

wch commented Jun 11, 2018

Glad it's working!

@wch wch closed this as completed Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants