Search code examples
rshiny-serverrhandsontable

Rhandsontable displays on a locally deployed app, but not on app displayed in AWS EC2 Ubuntu 18.04 server


I'm trying to deploy on a private server an app that allows me to edit an RHandsontable object. For privacy reasons I cannot be showing a demonstration here.

I have successfully tested my app locally, but when I deploy it on my server the RHandsontable doesn't display, and the app "screen goes gray" after I start interacting there, so it doesn't allow any further interactions there.

This is how it looks on my Windows 10 browser. You can even see a 2 rhandsontables (that are empty because it has no selection whatsoever), that can be edited. The "Guardar" button is currently a dummy.

**This is how it looks on my Windows 10 browser**

This is how it looks on AWS Ubuntu 18.04 Shiny Server. No rhandsontable loads (though the button loads). Same script, just different directories. I verified that the data loaded into both shiny apps were the same. You can also appreciate that the dummy button "Guardar" still appears.

**This is how it looks on AWS Ubuntu 18.04 Shiny Server**

I tried the same rendering equivalent data.tables from both the shiny and DT packages, leading to the same results as shown above.

Also, when I check my server logs at /var/log/shiny-server/ no issue arises (eg.: missing packages, broken code, etc). Last log goes as follows:

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union


Attaching package: ‘DT’

The following objects are masked from ‘package:shiny’:

    dataTableOutput, renderDataTable


Listening on http://127.0.0.1:41757

This suggests me that I have a compatibility / interaction issue that arises in Shiny Server or in Ubuntu that doesn't arise in my PC.

I have seen different sources in Stack Overflow and in jrowen's GitHub page without any success, and I'd like to know if I'm missing anything.

There's a minor difference between R version between both machines (my Ubuntu VM is fresh, so some packages are updated). This could also cause a problem, but I'm not positive this could be the reason.

I also installed JRE on both instances (I also thought this could be caused due to a Java issue that I haven't fixed properly). Running java -version on my VM yields

openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

My personal computer is a Windows 10 Machine. Details:

R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252   
[3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C                  
[5] LC_TIME=Spanish_Spain.1252    

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

other attached packages:
 [1] readxl_1.1.0        lubridate_1.7.4     mailR_0.4.1         forcats_0.3.0      
 [5] stringr_1.3.1       purrr_0.2.5         readr_1.1.1         tidyr_0.8.1        
 [9] tibble_2.0.1        ggplot2_3.0.0.9000  tidyverse_1.2.1     DBI_1.0.0          
[13] RODBC_1.3-15        DT_0.4              rhandsontable_0.3.7 Cairo_1.5-9        
[17] openxlsx_4.1.0      knitr_1.20          dplyr_0.8.0.1       shiny_1.1.0        

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0        lattice_0.20-35   assertthat_0.2.0  digest_0.6.15     mime_0.5         
 [6] R6_2.2.2          cellranger_1.1.0  plyr_1.8.4        backports_1.1.2   evaluate_0.10.1  
[11] httr_1.3.1        highr_0.7         pillar_1.3.1      rlang_0.3.1       lazyeval_0.2.1   
[16] rstudioapi_0.7    R.oo_1.22.0       R.utils_2.8.0     rmarkdown_1.11    htmlwidgets_1.2  
[21] munsell_0.5.0     broom_0.5.0       compiler_3.5.0    httpuv_1.4.4.1    modelr_0.1.2     
[26] pkgconfig_2.0.2   htmltools_0.3.6   tidyselect_0.2.5  crayon_1.3.4      withr_2.1.2      
[31] later_0.7.3       R.methodsS3_1.7.1 grid_3.5.0        nlme_3.1-137      jsonlite_1.5     
[36] xtable_1.8-2      gtable_0.2.0      magrittr_1.5      scales_0.5.0      zip_1.0.0        
[41] cli_1.0.1         stringi_1.1.7     promises_1.0.1    xml2_1.2.0        tools_3.5.0      
[46] glue_1.3.0        hms_0.4.2         rsconnect_0.8.12  yaml_2.1.19       colorspace_1.3-2 
[51] rvest_0.3.2       rJava_0.9-10      haven_1.1.2      

The Ubuntu 18.04 machine goes as follows:

R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] readxl_1.3.1        DT_0.5              rhandsontable_0.3.7
[4] knitr_1.22          shiny_1.2.0         dplyr_0.8.0.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.1       magrittr_1.5     tidyselect_0.2.5 xtable_1.8-3
 [5] R6_2.4.0         rlang_0.3.3      tools_3.5.3      xfun_0.5
 [9] htmltools_0.3.6  assertthat_0.2.1 digest_0.6.18    tibble_2.1.1
[13] crayon_1.3.4     purrr_0.3.2      later_0.8.0      htmlwidgets_1.3
[17] promises_1.0.1   glue_1.3.1       mime_0.6         cellranger_1.1.0
[21] compiler_3.5.3   pillar_1.3.1     jsonlite_1.6     httpuv_1.5.0
[25] pkgconfig_2.0.2

In advance, thanks very much for your help. Please clarify at comments if you need any extra information (that I can provide).

Edit: I checked as well outputting data.tables instead of rhandsontables both locally and on Ubuntu and failed as well rendering only on my Ubuntu VM.


Solution

  • For anyone interested in my problem, it was actually related to a firewall issue, not to a server-side or compatibility issue.

    When I accessed my application from a network that wasn't my organization's (i.e. my cell phone's shared internet or home network) I had no problem at all.