Skip to content

App driver won't start during GitLab CI/CD job #108

Open
@DivadNojnarg

Description

@DivadNojnarg

Error happens in the GitLab runner while trying to test a basic hello world app:

ℹ You can inspect the failed AppDriver object via `rlang::last_error()$app`
ℹ AppDriver logs:
{shinytest2} R info  07:31:41.41 Start AppDriver initialization
{shinytest2} R info  07:31:41.41 Starting Shiny app
{shinytest2} R info  07:31:45.26 Creating new chromote session
{shinytest2} R info  07:31:45.60 Error while initializing AppDriver:
                                 Failed to start chrome. Error: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
                                 Failed to generate minidump.
{shiny}      R error ----------- Loading required package: shiny
{shiny}      R error -------
In addition: Warning message:
In readLines(p$get_error_file()) :
  incomplete final line found on '/tmp/RtmpOod8Dt/chrome-stderr-f12847a1cdf49.log'
> chromote:::find_chrome()
[1] "/usr/bin/google-chrome"

On our servers, we have to specify a couple of tags to the Chrome browser to make it start (especially --no-sandbox) properly for instance:

Running /usr/bin/google-chrome --no-first-run --headless \
   '--user-data-dir=/gitlab-runner/.local/share/********' \
   '--remote-debugging-port=9222' \
   '--proxy-server=http://******' \
   '--proxy-bypass-list=localhost;127.0.0.1;${NO_PROXY};******' \
   --no-sandbox --no-proxy-server '--enable-logging=stderr' '--v=1' \
   '--window-size=1920,1200'

This might be the issue but I don't see any way to pass them to the shinytest2::AppDriver$new method.


Session details:

sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

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

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 datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7            pillar_1.6.2          compiler_4.1.0       
 [4] later_1.3.0           shinytest2_0.0.0.9001 tools_4.1.0          
 [7] testthat_3.1.2        digest_0.6.27         jsonlite_1.7.2       
[10] lifecycle_1.0.0       tibble_3.1.3          checkmate_2.0.0      
[13] pkgconfig_2.0.3       rlang_0.4.11          shiny_1.6.0          
[16] cli_3.0.1             rstudioapi_0.13       xfun_0.25            
[19] pagedown_0.15         fastmap_1.1.0         withr_2.4.2          
[22] fs_1.5.0              vctrs_0.3.8           websocket_1.4.1      
[25] chromote_0.0.0.9003   R6_2.5.1              processx_3.5.2       
[28] fansi_0.5.0           callr_3.7.0           magrittr_2.0.1       
[31] backports_1.2.1       ps_1.6.0              promises_1.2.0.1     
[34] ellipsis_0.3.2        htmltools_0.5.1.1     mime_0.11            
[37] xtable_1.8-4          renv_0.14.0           httpuv_1.6.5         
[40] utf8_1.2.2            crayon_1.4.1          brio_1.1.2 

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions