rstudio / shinytest

Automated testing for shiny apps
https://rstudio.github.io/shinytest/
Other
225 stars 55 forks source link

unable to find an inherited method for function ‘span’ for signature ‘"shiny.tag"’ #435

Closed sneumann closed 7 months ago

sneumann commented 7 months ago

Hi, I am only starting with shinytest so I can refactor a larger application without breaking it :-) I can successfully recordTest(".") in shiny/examples/02_text from the shiny package.

In my own app, which uses quite a few dependencies I am getting an unable to find an inherited method for function ‘span’ for signature ‘"shiny.tag"’

> recordTest(".")
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'object' in selecting a method for function 'span': unable to find an inherited method for function ‘span’ for signature ‘"shiny.tag"’

The whoppy shinytest-traceback.txt is attached, sessionInfo() is below. I'd create a minimum reproducible example if I knew where to start :-(

=> I am mainly interested in 1) debugging the cause and 2) improving shinytest diagnostics ("Sorry, can't handle ...")

Yours, Steffen

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

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

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

time zone: Europe/Berlin
tzcode source: system (glibc)

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

other attached packages:
 [1] promises_1.2.0.1    MetFamily_0.99.1    egg_0.4.5           gridExtra_2.3       plotly_4.10.2       slam_0.1-50         plotrix_3.8-4       matrixStats_1.0.0   xcms_4.1.2          MSnbase_2.25.1     
[11] ProtGenerics_1.33.1 S4Vectors_0.36.2    mzR_2.37.1          Rcpp_1.0.10         BiocParallel_1.32.6 stringr_1.5.0       searchable_0.4.0    gdata_3.0.0         cowplot_1.1.1       cba_0.2-23         
[21] proxy_0.4-27        pcaMethods_1.90.0   Biobase_2.58.0      BiocGenerics_0.48.1 mixOmics_6.26.0     ggplot2_3.4.2       lattice_0.21-8      MASS_7.3-60         FactoMineR_2.9      squash_1.0.9       
[31] Matrix_1.6-3        colourpicker_1.3.0  DT_0.28             shinybusy_0.3.2     shinyjs_2.1.0       shinyBS_0.61.1      shiny_1.7.4         htmltools_0.5.5     shinytest_1.5.3    

loaded via a namespace (and not attached):
  [1] splines_4.3.2               later_1.3.1                 bitops_1.0-7                tibble_3.2.1                preprocessCore_1.60.2       XML_3.99-0.14               lifecycle_1.0.3            
  [8] doParallel_1.0.17           processx_3.8.2              crosstalk_1.2.0             MultiAssayExperiment_1.24.0 flashClust_1.01-2           debugme_1.1.0               magrittr_2.0.3             
 [15] sass_0.4.6                  limma_3.54.2                yaml_2.3.7                  jquerylib_0.1.4             remotes_2.4.2               httpuv_1.6.11               sessioninfo_1.2.2          
 [22] pkgbuild_1.4.1              MsCoreUtils_1.11.5          RColorBrewer_1.1-3          pkgload_1.3.3               zlibbioc_1.44.0             GenomicRanges_1.50.2        purrr_1.0.1                
 [29] AnnotationFilter_1.22.0     RCurl_1.98-1.12             GenomeInfoDbData_1.2.9      IRanges_2.32.0              ggrepel_0.9.4               webdriver_1.0.6             ellipse_0.5.0              
 [36] testthat_3.2.0              rematch_1.0.1               RSpectra_0.16-1             ncdf4_1.21                  codetools_0.2-19            DelayedArray_0.24.0         Spectra_1.13.3             
 [43] tidyselect_1.2.0            base64enc_0.1-3             jsonlite_1.8.7              multtest_2.54.0             ellipsis_0.3.2              survival_3.5-5              iterators_1.0.14           
 [50] emmeans_1.8.9               foreach_1.5.2               progress_1.2.2              glue_1.6.2                  rARPACK_0.11-0              pingr_2.0.3                 MatrixGenerics_1.14.0      
 [57] usethis_2.2.0               GenomeInfoDb_1.34.9         dplyr_1.1.2                 withr_2.5.0                 BiocManager_1.30.21         fastmap_1.1.1               fansi_1.0.4                
 [64] callr_3.7.3                 digest_0.6.33               R6_2.5.1                    mime_0.12                   estimability_1.4.1          colorspace_2.1-0            gtools_3.9.5               
 [71] utf8_1.2.3                  tidyr_1.3.0                 generics_0.1.3              data.table_1.14.8           corpcor_1.6.10              robustbase_0.95-1           prettyunits_1.1.1          
 [78] httr_1.4.6                  htmlwidgets_1.6.2           scatterplot3d_0.3-44        pkgconfig_2.0.3             gtable_0.3.3                impute_1.72.3               MassSpecWavelet_1.66.0     
 [85] XVector_0.38.0              brio_1.1.3                  profvis_0.3.8               MALDIquant_1.22.1           multcompView_0.1-9          showimage_1.0.0             clue_0.3-64                
 [92] scales_1.2.1                leaps_3.1                   png_0.1-8                   MetaboCoreUtils_1.6.0       parsedate_1.3.1             rstudioapi_0.14             reshape2_1.4.4             
 [99] curl_5.0.1                  cachem_1.0.8                parallel_4.3.2              miniUI_0.1.1.1              mzID_1.36.0                 vsn_3.66.0                  pillar_1.9.0               
[106] vctrs_0.6.2                 MsFeatures_1.6.0            RANN_2.6.1                  urlchecker_1.0.1            xtable_1.8-4                cluster_2.1.6               mvtnorm_1.2-4              
[113] cli_3.6.1                   compiler_4.3.2              rlang_1.1.1                 crayon_1.5.2                QFeatures_1.8.0             ps_1.7.5                    affy_1.76.0                
[120] plyr_1.8.8                  fs_1.6.2                    stringi_1.7.12              viridisLite_0.4.2           assertthat_0.2.1            munsell_0.5.0               lazyeval_0.2.2             
[127] devtools_2.4.5              hms_1.1.3                   MsExperiment_1.1.3          SummarizedExperiment_1.28.0 fontawesome_0.5.1           igraph_1.4.3                memoise_2.0.1              
[134] bslib_0.5.0                 affyio_1.68.0               DEoptimR_1.0-14            
sneumann commented 7 months ago

Hi, while I don't have a fix for the above, running it in console R instead of rstudio worked. Additionally, I tried shinytest2 and will use that going forward. Yours, Steffen