-
Notifications
You must be signed in to change notification settings - Fork 55
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
recordTest produces "subscript out of bounds" error #165
Comments
Can you provide the output of |
Here you are. I have tried several shiny apps and they all show this error: devtools::session_info()
#> Session info -------------------------------------------------------------
#> setting value
#> version R version 3.4.3 (2017-11-30)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate C.UTF-8
#> tz Europe/Berlin
#> date 2017-12-11
#> Packages -----------------------------------------------------------------
#> package * version date source
#> assertthat 0.2.0 2017-04-11 CRAN (R 3.4.2)
#> backports 1.1.1 2017-09-25 CRAN (R 3.4.2)
#> base * 3.4.3 2017-12-07 local
#> base64enc 0.1-3 2015-07-28 CRAN (R 3.4.2)
#> compiler 3.4.3 2017-12-07 local
#> crayon 1.3.4 2017-09-16 CRAN (R 3.4.2)
#> curl 3.0 2017-10-06 CRAN (R 3.4.2)
#> datasets * 3.4.3 2017-12-07 local
#> debugme 1.1.0.9000 2017-12-11 Github (gaborcsardi/debugme@f4a116a)
#> devtools 1.13.4 2017-11-09 CRAN (R 3.4.2)
#> digest 0.6.12 2017-01-27 CRAN (R 3.4.2)
#> evaluate 0.10.1 2017-06-24 CRAN (R 3.4.2)
#> graphics * 3.4.3 2017-12-07 local
#> grDevices * 3.4.3 2017-12-07 local
#> htmltools 0.3.6 2017-04-28 CRAN (R 3.4.2)
#> httpuv 1.3.5 2017-07-04 CRAN (R 3.4.2)
#> httr 1.3.1 2017-08-20 CRAN (R 3.4.2)
#> jsonlite 1.5 2017-06-01 CRAN (R 3.4.2)
#> knitr 1.17 2017-08-10 CRAN (R 3.4.2)
#> magrittr 1.5 2014-11-22 CRAN (R 3.4.2)
#> memoise 1.1.0 2017-04-21 CRAN (R 3.4.2)
#> methods * 3.4.3 2017-12-07 local
#> mime 0.5 2016-07-07 CRAN (R 3.4.2)
#> parsedate 1.1.3 2017-03-02 CRAN (R 3.4.3)
#> pingr 1.1.2 2017-03-02 CRAN (R 3.4.3)
#> png 0.1-7 2013-12-03 CRAN (R 3.4.2)
#> processx 3.0.1 2017-12-11 Github (r-lib/processx@709a4bd)
#> R6 2.2.2 2017-06-17 CRAN (R 3.4.2)
#> Rcpp 0.12.14 2017-11-23 CRAN (R 3.4.2)
#> rematch 1.0.1 2016-04-21 CRAN (R 3.4.2)
#> rmarkdown 1.8.3 2017-12-11 Github (rstudio/rmarkdown@07f7d8e)
#> rprojroot 1.2 2017-01-16 CRAN (R 3.4.2)
#> shiny 1.0.5 2017-08-23 CRAN (R 3.4.2)
#> shinytest 1.2.0.9001 2017-12-11 Github (rstudio/shinytest@ce89ac0)
#> showimage 1.0.0 2017-12-11 Github (MangoTheCat/showimage@d9000f0)
#> stats * 3.4.3 2017-12-07 local
#> stringi 1.1.6 2017-11-17 CRAN (R 3.4.2)
#> stringr 1.2.0 2017-02-18 CRAN (R 3.4.2)
#> testthat 1.0.2 2016-04-23 CRAN (R 3.4.2)
#> tools 3.4.3 2017-12-07 local
#> utils * 3.4.3 2017-12-07 local
#> webdriver 1.0.2.9002 2017-12-11 Github (rstudio/webdriver@2ccad63)
#> withr 2.1.0 2017-11-01 CRAN (R 3.4.2)
#> xtable 1.8-2 2016-02-05 CRAN (R 3.4.2)
#> yaml 2.1.15 2017-12-01 CRAN (R 3.4.3) |
Hm, what version of phantomJS do you have installed? You can find out with: system2(webdriver:::find_phantom(), args ="--version") |
The one from Debian stretch (stable): system2(webdriver:::find_phantom(), args ="--version")
#> 2.1.1 |
Same problem here (Linux Mint 18.3, shinytest 1.2.0.900, phantomJS 2.1.1).
|
Is there anything we can do to debug this issue? I have tried to reproduce it using a Docker image:
However, I am getting the error
when I try to run |
@rstub I've pushed a fix to the webdriver package so that it correctly reports errors in starting up PhantomJS. Now it shows this when I try it in your Docker container:
The problem seems to be related to something specific about the version of phantomjs that comes with Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277 Running
I'll add a workaround for this issue. |
@rstub I've added a workaround for your issue in rstudio/webdriver@b66d9bc. |
I have rebuild my Docker image and am now getting the same error there as I am getting on my local machine: shinytest::recordTest(system.file("examples", "01_hello", package = "shiny"))
#> No encoding supplied: defaulting to UTF-8.
#> Error in cont[["value"]]: subscript out of bounds Session infodevtools::session_info()
#> Session info -------------------------------------------------------------
#> setting value
#> version R version 3.4.3 (2017-11-30)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> tz UTC
#> date 2018-02-13
#> Packages -----------------------------------------------------------------
#> package * version date source
#> assertthat 0.2.0 2017-04-11 CRAN (R 3.4.3)
#> backports 1.1.2 2017-12-13 CRAN (R 3.4.3)
#> base * 3.4.3 2018-02-12 local
#> base64enc 0.1-3 2015-07-28 CRAN (R 3.4.3)
#> callr 2.0.2 2018-02-11 CRAN (R 3.4.3)
#> compiler 3.4.3 2018-02-12 local
#> crayon 1.3.4 2017-09-16 CRAN (R 3.4.3)
#> curl 3.1 2017-12-12 CRAN (R 3.4.3)
#> datasets * 3.4.3 2018-02-12 local
#> debugme 1.1.0.9000 2018-02-13 Github (gaborcsardi/debugme@f4a116a)
#> devtools 1.13.4 2017-11-09 CRAN (R 3.4.3)
#> digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
#> evaluate 0.10.1 2017-06-24 CRAN (R 3.4.3)
#> graphics * 3.4.3 2018-02-12 local
#> grDevices * 3.4.3 2018-02-12 local
#> htmltools 0.3.6 2017-04-28 CRAN (R 3.4.3)
#> httpuv 1.3.5 2017-07-04 CRAN (R 3.4.3)
#> httr 1.3.1 2017-08-20 CRAN (R 3.4.3)
#> jsonlite 1.5 2017-06-01 CRAN (R 3.4.3)
#> knitr 1.19 2018-01-29 CRAN (R 3.4.3)
#> magrittr 1.5 2014-11-22 CRAN (R 3.4.3)
#> memoise 1.1.0 2017-04-21 CRAN (R 3.4.3)
#> methods * 3.4.3 2018-02-12 local
#> mime 0.5 2016-07-07 CRAN (R 3.4.3)
#> parsedate 1.1.3 2017-03-02 CRAN (R 3.4.3)
#> pingr 1.1.2 2017-03-02 CRAN (R 3.4.3)
#> png 0.1-7 2013-12-03 CRAN (R 3.4.3)
#> R6 2.2.2 2017-06-17 CRAN (R 3.4.3)
#> Rcpp 0.12.15 2018-01-20 CRAN (R 3.4.3)
#> rematch 1.0.1 2016-04-21 CRAN (R 3.4.3)
#> rlang 0.1.6 2017-12-21 CRAN (R 3.4.3)
#> rmarkdown 1.8.10 2018-02-13 Github (rstudio/rmarkdown@b49b7eb)
#> rprojroot 1.3-2 2018-01-03 CRAN (R 3.4.3)
#> shiny 1.0.5 2017-08-23 CRAN (R 3.4.3)
#> shinytest 1.2.0.9001 2018-02-13 Github (rstudio/shinytest@1f0698c)
#> showimage 1.0.0 2018-01-24 CRAN (R 3.4.3)
#> stats * 3.4.3 2018-02-12 local
#> stringi 1.1.6 2017-11-17 CRAN (R 3.4.3)
#> stringr 1.2.0 2017-02-18 CRAN (R 3.4.3)
#> testthat 2.0.0 2017-12-13 CRAN (R 3.4.3)
#> tools 3.4.3 2018-02-12 local
#> utils * 3.4.3 2018-02-12 local
#> webdriver 1.0.4.9000 2018-02-13 Github (rstudio/webdriver@b66d9bc)
#> withr 2.1.1 2017-12-19 CRAN (R 3.4.3)
#> xtable 1.8-2 2016-02-05 CRAN (R 3.4.3)
#> yaml 2.1.16 2017-12-12 CRAN (R 3.4.3) Both |
I've made another fix to webdriver so that it correctly grabs the error message. This is what it says now when I rebuild your Docker container:
The problem is that the version of PhantomJS that is in the Debian repos isn't complete -- it doesn't include ghostdriver. See: The build of phantomjs that you get with |
Thanks a lot! With
@prubin73 Does that solve the issue on your side as well? |
I've added the check and a more useful error message in rstudio/webdriver@52facdb. I'm glad it works for you! |
For reference, the issue in Debian is already know: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860485 |
Confirming that the fix works for me as well. |
Good to hear! |
When I run
recordTest()
for an example shiny application I get the following error:I am using ce89ac0.
The text was updated successfully, but these errors were encountered: