fail to build in GitLab CI with `Error in strsplit(cnd$stderr, "\r?\n") : non-character argument`

The site is correctly built locally but when we send it to the CI it fails for some vignettes with this error:

Error in strsplit(cnd$stderr, "\r?\n") : non-character argument

I suspect this has something to do with line-ending character between Windows and Linux. However, everyone verified they have set it to LF in RStudio global options.
At first, changing the Docker container helped solved the error once or twice, but now it keeps coming back for some files, even with empty vignettes. Also, when I develop inside the Docker container, it compiles correctly.

I am not able to provide a reproducible example, but I can share the repository and the Ci log file :
Also, if you look at the history of the CI, you can follow when I started to fail :
I know that without the reprex, it can be difficult to spot the problem, but I am looking for new directions to look for.
Thank you

I opened an issue on {pkgdown} but it is probably better to discuss it here as I don't really know if it is a {pkgdown} bug (

On a Linux machine, I changed all line-endings and modified each vignette to write them with UTF8 encoding using the following code. This seems to solve the problem. But I still do not understand when this happened.

# Change all line-endings
# sudo apt-get install dos2unix
# find propre.rpls -type f -print0 | xargs -0 dos2unix --
# Add a space in all vignettes
for (file in list.files("vignettes", pattern = "Rmd$", full.names = TRUE)) {
  lines <- c(readLines(con = file), "")
  writeLines(enc2utf8(lines), file, useBytes = TRUE)
1 Like

This topic was automatically closed after 45 days. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.