hrbrmstr / decapitated

Headless 'Chrome' Orchestration in R
Other
65 stars 3 forks source link

chromeshot triggers error in processx #3

Closed lodderig closed 6 years ago

lodderig commented 6 years ago
decapitated::chrome_shot(
“http://www.genekeyes.com/12-DAYS/12-days-of-Christmas.html#Lyrics”,
path=file.path(rt, “lyrics.png”)
)

it triggers an error in processx (on MacOS Sierra)

Error in process_initialize(self, private, command, args, commandline, : processx error

Could it be due to args?

processx::run(command = chromebin, args = args, erroronstatus = FALSE, echocmd = FALSE, echo = FALSE)

chrome_bin resolves to the correct path Error: args is not a character vector

hrbrmstr commented 6 years ago

Can you post the output of sessionInfo() so I can see what OS I need to test on? It's working fine on macOS.

hrbrmstr commented 6 years ago

And it also just worked on UBuntu 16.04 with HEADLESS_CHROME set to (where the default installer put them):

I shld also point out that your example has smart quotes in it vs plain double quotes. That's going to cause problems if that's in your source code vs just something that occurred during the code-paste (macOS does that sometimes).

lodderig commented 6 years ago

I am using the code as downloaded from github (so no copy/paste as smart quotes on MacOS gives indeed some headaches).

get_chrome_env() [1] "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

and

`R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] forcats_0.2.0      stringr_1.2.0      dplyr_0.7.4        purrr_0.2.4        readr_1.1.1.9000   tidyr_0.7.2       
 [7] tibble_1.3.4       ggplot2_2.2.1.9000 tidyverse_1.2.1    fuzzyjoin_0.1.3    decapitated_0.2.0  magick_1.6.9000   
[13] colourlovers_0.2.2 hrbrthemes_0.4.0   V8_1.5             httr_1.3.1         rvest_0.3.2        xml2_1.1.1        
[19] stringi_1.1.6      rprojroot_1.2     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.14      lubridate_1.7.1   lattice_0.20-35   png_0.1-7         assertthat_0.2.0  digest_0.6.13    
 [7] psych_1.7.8       R6_2.2.2          cellranger_1.1.0  plyr_1.8.4        backports_1.1.2   evaluate_0.10.1  
[13] rlang_0.1.4       lazyeval_0.2.1    curl_3.1          readxl_1.0.0      rstudioapi_0.7    extrafontdb_1.0  
[19] rmarkdown_1.8     extrafont_0.17    foreign_0.8-69    munsell_0.4.3     broom_0.4.3       compiler_3.4.3   
[25] modelr_0.1.1      pkgconfig_2.0.1   mnormt_1.5-5      htmltools_0.3.6   XML_3.98-1.9      crayon_1.3.4     
[31] grid_3.4.3        nlme_3.1-131      jsonlite_1.5      Rttf2pt1_1.3.5    gtable_0.2.0      magrittr_1.5     
[37] scales_0.5.0.9000 cli_1.0.0         debugme_1.1.0     reshape2_1.4.3    bindrcpp_0.2      tools_3.4.3      
[43] glue_1.2.0        hms_0.4.0         processx_2.0.0.1  parallel_3.4.3    yaml_2.1.16       colorspace_1.3-2 
[49] knitr_1.17        bindr_0.1         haven_1.1.0     `
hrbrmstr commented 6 years ago

OK, this is strange.

I just tried this with my:

R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

box (Chrome is same path, tho I run betas) and it works fine.

Can you post the output of decapitated::chrome_version() ?

Mine is Google Chrome 64.0.3282.24 beta

lodderig commented 6 years ago

re-nstalled Chrome and now it works like a charm.