As of the April 4th CRAN update to devtools v2.0.2, Travis CI is encountering an error with devtools during its setup phrase when building R packages (the error occurs prior to Travis testing any of the user's R code). I've encountered this issue with two different R packages today that previously passed Travis' tests - neither package's code was changed before running on Travis, I just created new branches from previously passing branches to initiate new builds. I am attaching a screenshot of the error message from Travis' job log - hope it helps!

My package is a biocoductor dependent package (R: bioc-devel). it just failed to pass the build few hours ago given the error mentioned above.
Error in match.arg(upgrade, c("ask", "always", "never")) :
'arg' must be of length 1
see job log.
Any suggestions would be greatly appreciated.
Same here on all three of the r-release, r-devel and macOS builds.
I triggered an older build that passed, after which it failed with the error as shown above.
Good luck fixing it :+1:
I am aware of it and will likely have a fix today. In the interim you can install the development version of remotes using r_github_packages to fix the issue
r_github_packages: r-lib/remotes
Sorry, you actually need to install dev remotes prior to the install step, so this should work.
before_install: R -e 'source("https://install-github.me/r-lib/remotes")'
From this Travis log, workaround works under Linux (r-relase and r-devel), but not on macOS Travis machines. The glass is two-thirds full :+1:
The issue on macOS is just that the devtools binary hasn't been built for the new release, so it is still using the older devtools, so you actually need the CRAN release of remotes on macOS.
update: I recently pushed a change to devel remotes so that it will work with either version of devtools.
Same here. Probably I did sth wrong trying to fix it:
https://travis-ci.org/nachti/rwebhdfs/jobs/517778449
before_install: R -e 'source("https://install-github.me/r-lib/remotes")'
results in
source("https://install-github.me/r-lib/remotes")
Error in utils::download.file(url, path, method = download_method(), quiet = quiet, :
cannot open URL 'https://api.github.com/repos/r-lib/remotes/contents/DESCRIPTION?ref=master'
Calls: source ... remote_package_name.github_remote -> github_DESCRIPTION -> download -> base_download
Execution halted
The command "R -e 'source("https://install-github.me/r-lib/remotes")'" failed and exited with 1 during .
@nachti I got the same error https://travis-ci.org/jdblischak/workflowr/jobs/517831999#L944
just to clarify this, if my build is not time critical, is
before_install: R -e 'source("https://install-github.me/r-lib/remotes")'
going to be required for all Travis-CI builds in the future or will there be a fix in the next days and I can just wait this out ;) ?
@kkmann A fix is underway and you can just wait it out.
before_install: R -e 'source("https://install-github.me/r-lib/remotes")'
does not work for me (log). I guess I will wait it out.
Thank you.
remotes 2.0.3 is now on CRAN, which will fix this, no workaround should now be necessary.
You may have to delete your travis package cache to ensure the new remotes version is used.
I don't think this thread is related to #316. I don't see the same errors in the log.
@fabnavarro The error in your second log is because travis merged a commit from @jimhester faster than expected and I believe your job tried to grab R 3.5.3 before a build of it had arrived in the proper location. That should be sorted now. I'm only answering for him since I suspect he's done for the day.
@jennybc the build is passing now, thank you very much for your answer.
I still get this error: https://travis-ci.com/Exp-Micro-Ecol-Hub/emeScheme/builds/107620556
I still get this error: https://travis-ci.com/Exp-Micro-Ecol-Hub/emeScheme/builds/107620556
@rkrug : This is fixed now by https://github.com/r-lib/remotes/pull/340.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
Most helpful comment
remotes 2.0.3 is now on CRAN, which will fix this, no workaround should now be necessary.
You may have to delete your travis package cache to ensure the new remotes version is used.