rstudio / shinycoreci-apps

SUPERSEDED - Apps for Shiny continuous integration testing
Other
36 stars 4 forks source link

GHA: "200-flexdashboard-render-text" and "147-websocket" app's shinyjster test failures on chrome #134

Open MadhulikaTanuboddi opened 3 years ago

MadhulikaTanuboddi commented 3 years ago

On several Mac and Ubuntu builds, shinyjster tests for above apps fails only in GHA (I ran the same app locally on Mac 4.0 on chrome and all the shinyjster checks are successful)

for ex: https://github.com/rstudio/shinycoreci-apps/runs/2285509176?check_suite_focus=true#step:31:12868 https://github.com/rstudio/shinycoreci-apps/runs/2285509251?check_suite_focus=true#step:31:14116 https://github.com/rstudio/shinycoreci-apps/runs/2285509288?check_suite_focus=true#step:31:12785 https://github.com/rstudio/shinycoreci-apps/runs/2285509391?check_suite_focus=true#step:31:12162 https://github.com/rstudio/shinycoreci-apps/runs/2285509484?check_suite_focus=true#step:31:12319 https://github.com/rstudio/shinycoreci-apps/runs/2285509551?check_suite_focus=true#step:31:14435

As discussed with Barret and Shalu, the cause seems to be similar to https://github.com/rstudio/shinycoreci-apps/issues/133. Browser is closed abruptly after its opened and the test fails.

Additional logs

200-flexdashboard-rendertext (Only on chrome)

[4/5; 1m;17s] 200-flexdashboard-render-text ~ shinyjster-chrome.R
Loading required package: shiny
shinyjster - starting app: 200-flexdashboard-render-text

Listening on http://127.0.0.1:9441
Running java -jar \
  /Users/runner/work/_temp/Library/shinyjster/selenium/selenium.jar chrome \
  1200x1200 'http://127.0.0.1:9441/index.Rmd?shinyjster=1' 120 --headless
pxjava - Starting ChromeDriver 89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}) on port 7127
pxjava - Only local connections are allowed.
pxjava - Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
pxjava - ChromeDriver was started successfully.
pxjava - Apr 07, 2021 9:16:46 AM org.openqa.selenium.remote.ProtocolHandshake createSession
pxjava - INFO: Detected dialect: W3C


processing file: index.Rmd

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |...                                                                   |   4%
  ordinary text without R code

  |                                                                            
  |......                                                                |   9%
label: unnamed-chunk-1

  |                                                                            
  |.........                                                             |  13%
   inline R code fragments

  |                                                                            
  |............                                                          |  17%
label: unnamed-chunk-2

  |                                                                            
  |...............                                                       |  22%
   inline R code fragments

  |                                                                            
  |..................                                                    |  26%
label: unnamed-chunk-3

  |                                                                            
  |.....................                                                 |  30%
   inline R code fragments

  |                                                                            
  |........................                                              |  35%
label: unnamed-chunk-4

  |                                                                            
  |...........................                                           |  39%
  ordinary text without R code

  |                                                                            
  |..............................                                        |  43%
label: unnamed-chunk-5

  |                                                                            
  |.................................                                     |  48%
  ordinary text without R code

  |                                                                            
  |.....................................                                 |  52%
label: unnamed-chunk-6

  |                                                                            
  |........................................                              |  57%
   inline R code fragments

  |                                                                            
  |...........................................                           |  61%
label: unnamed-chunk-7
Loading required package: ggplot2

Attaching package: 'plotly'

The following object is masked from 'package:ggplot2':

    last_plot

The following object is masked from 'package:stats':

    filter

The following object is masked from 'package:graphics':

    layout

  |                                                                            
  |..............................................                        |  65%
   inline R code fragments

  |                                                                            
  |.................................................                     |  70%
label: unnamed-chunk-8

  |                                                                            
  |....................................................                  |  74%
   inline R code fragments

  |                                                                            
  |.......................................................               |  78%
label: unnamed-chunk-9

  |                                                                            
  |..........................................................            |  83%
   inline R code fragments

  |                                                                            
  |.............................................................         |  87%
label: unnamed-chunk-10

  |                                                                            
  |................................................................      |  91%
   inline R code fragments

  |                                                                            
  |...................................................................   |  96%
label: unnamed-chunk-11 (with options) 
List of 2
 $ fig.width : num 10
 $ fig.height: num 7

  |                                                                            
  |......................................................................| 100%
   inline R code fragments

output file: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpivkmG2/index.knit.md

/usr/local/bin/pandoc +RTS -K512m -RTS /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpivkmG2/index.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpivkmG2/file919c62ce1ca3.html --lua-filter /Users/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/latex-div.lua --variable bs3=TRUE --standalone --section-divs --template /Users/runner/work/_temp/Library/flexdashboard/www/flex_dashboard/default.html --id-prefix section- --variable theme=cosmo --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-before-body /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpivkmG2/file919c4b12961c.html --highlight-style pygments --include-before-body /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpivkmG2/file919c32d09788.html --include-after-body /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpivkmG2/file919c1c8c7bc8.html 

Output created: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpivkmG2/file919c62ce1ca3.html
shinyjster - Progress: 1/94 (waiting)
shinyjster - Progress: 1/94 (running)
shinyjster - Browser window has been closed. Stopping Shiny Application now.
shinyjster - Browser process is still alive. Sending SIGINT!
shinyjster - Checking browser...
shinyjster - Checking browser...
shinyjster - Browser is closed!
shinyjster - stopping app: 200-flexdashboard-render-text
List of 4

 $ appDir     : chr "/Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/200-flexdashboard-render-text/index.Rmd"

 $ successful : logi FALSE
[5/5; 1m; 0s] 200-flexdashboard-render-text ~ shinytest.R

 $ returnValue:List of 1
  ..$ :List of 1
  .. ..$ type: chr "Session closed early"
 $ browser    : chr "chrome_headless"
Error in shinyjster-chrome.R
Error in assert_jster(ret): 
shinyjster - Failing apps:
shinyjster - * /Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/200-flexdashboard-render-text/index.Rmd - chrome_headless

147-websocket (Chrome and Firefox)

shinyjster - starting app: 147-websocket

Attaching package: ‘shinyjs’

The following object is masked from ‘package:shiny’:

    runExample

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

    removeClass, show

Listening on http://127.0.0.1:15895
Running java -jar \
  /Users/runner/work/_temp/Library/shinyjster/selenium/selenium.jar chrome \
  1200x1200 'http://127.0.0.1:15895/?shinyjster=1' 120 --headless
pxjava - Starting ChromeDriver 89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}) on port 23655
pxjava - Only local connections are allowed.
pxjava - Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
pxjava - ChromeDriver was started successfully.
pxjava - Apr 08, 2021 9:09:35 AM org.openqa.selenium.remote.ProtocolHandshake createSession
pxjava - INFO: Detected dialect: W3C
shinyjster - Progress: 1/33 (waiting)
shinyjster - Progress: 1/33 (running)
shinyjster - Progress: 2/33 (waiting)
shinyjster - Progress: 3/33 (waiting)
shinyjster - Progress: 3/33 (running)
shinyjster - Progress: 4/33 (waiting)
shinyjster - Progress: 4/33 (running)
shinyjster - Progress: 5/33 (waiting)
shinyjster - Progress: 6/33 (waiting)
shinyjster - Progress: 6/33 (running)
shinyjster - Progress: 7/33 (waiting)
shinyjster - Progress: 8/33 (waiting)
shinyjster - Progress: 8/33 (running)
shinyjster - Progress: 9/33 (waiting)
shinyjster - Progress: 10/33 (waiting)
shinyjster - Progress: 10/33 (running)
shinyjster - Progress: 11/33 (waiting)
shinyjster - Progress: 12/33 (waiting)
shinyjster - Progress: 12/33 (running)
shinyjster - Progress: 13/33 (waiting)
shinyjster - Progress: 14/33 (waiting)
shinyjster - Progress: 15/33 (waiting)
shinyjster - Progress: 15/33 (running)
shinyjster - Progress: 16/33 (waiting)
shinyjster - Progress: 17/33 (waiting)
shinyjster - Progress: 17/33 (running)
shinyjster - Progress: 18/33 (waiting)
shinyjster - Progress: 19/33 (waiting)
shinyjster - Progress: 19/33 (running)
shinyjster - Progress: 20/33 (waiting)
shinyjster - Progress: 21/33 (waiting)
shinyjster - Progress: 21/33 (running)
shinyjster - Progress: 22/33 (waiting)
shinyjster - Progress: 23/33 (waiting)
shinyjster - Progress: 24/33 (waiting)
shinyjster - Progress: 24/33 (running)
shinyjster - Progress: 25/33 (waiting)
shinyjster - Progress: 26/33 (waiting)
shinyjster - Progress: 26/33 (running)
shinyjster - Progress: 27/33 (waiting)
shinyjster - Progress: 28/33 (waiting)
shinyjster - Progress: 28/33 (running)
shinyjster - Progress: 29/33 (waiting)
shinyjster - Progress: 30/33 (waiting)
shinyjster - Progress: 30/33 (running)
shinyjster - Progress: 31/33 (waiting)
shinyjster - Progress: 32/33 (waiting)
shinyjster - Progress: 32/33 (running)
shinyjster - Progress: 33/33 (waiting)
shinyjster - Progress: 33/33 (running) - Error found: 'Connected to wss://... does not equal 'Closed: 1000 -'
shinyjster - JS error found! Error:
    msg: 'Connected to wss://... does not equal 'Closed: 1000 -'
    x: Connected to wss://echo.websocket.org
    y: Closed: 1000 -
    xStr: 'Connected to wss://echo.websocket.org'
    yStr: 'Closed: 1000 -'
shinyjster - Error found! Closing Browser window
shinyjster - Browser window has been closed. Stopping Shiny Application now.
shinyjster - stopping app: 147-websocket
List of 4
 $ appDir     : chr "/Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/147-websocket"
 $ successful : logi FALSE
 $ returnValue:List of 1
  ..$ :List of 2
  .. ..$ type : chr "error"
  .. ..$ error:List of 5
  .. .. ..$ message: chr "'Connected to wss://... does not equal 'Closed: 1000 -'"
  .. .. ..$ x      : chr "Connected to wss://echo.websocket.org"
  .. .. ..$ y      : chr "Closed: 1000 -"
  .. .. ..$ xStr   : chr "'Connected to wss://echo.websocket.org'"
  .. .. ..$ yStr   : chr "'Closed: 1000 -'"
 $ browser    : chr "chrome_headless"
Error in shinyjster-chrome.R
Error in assert_jster(ret): 
shinyjster - Failing apps:
shinyjster - * /Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/147-websocket - chrome_headless
MadhulikaTanuboddi commented 3 years ago

Just fyi, this is happening mostly on Mac builds. Additional logs

* 147-websocket ~ shinyjster-chrome.R
<simpleError in assert_jster(ret): 
shinyjster - Failing apps:
shinyjster - * /Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/147-websocket - chrome_headless>

* 147-websocket ~ shinyjster-firefox.R
<simpleError in assert_jster(ret): 
shinyjster - Failing apps:
shinyjster - * /Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/147-websocket - firefox_headless>

* 200-flexdashboard-render-text ~ shinyjster-chrome.R
<simpleError in assert_jster(ret): 
shinyjster - Failing apps:
shinyjster - * /Users/runner/work/shinycoreci-apps/shinycoreci-apps/apps/200-flexdashboard-render-text/index.Rmd - chrome_headless>