"Cannot open URL" when downloading GitHub dependency on R 3.4.1
grst opened this issue · 3 comments
On R 3.4.1 the download of Github dependencies fails in appveyor. More recent R versions (tested 3.5.1 and release) work without problems.
C:\Users\appveyor\AppData\Local\Temp\1\RtmpieB5b0\downloaded_packages
+ return
+ Rscript -e 'if (!("remotes" %in% rownames(installed.packages()))) q(status=1)'
+ Rscript -e 'options(repos=c(CRAN="https://cran.rstudio.com")); remotes::install_deps(dependencies = TRUE, type="both")'
Error in utils::download.file(url, path, method = download_method(), quiet = quiet, :
cannot open URL 'https://api.github.com/repos/r-lib/conflicted/contents/DESCRIPTION?ref=master&access_token=*****'
Calls: <Anonymous> ... remote_package_name.github_remote -> github_DESCRIPTION -> download -> base_download
Execution halted
Command exited with code 1
I could reproduce the issue in a minimal example repo:
- https://github.com/grst/test-r-appveyor
- CI result: https://ci.appveyor.com/project/grst/test-r-appveyor/builds/25189012
The problem seems to be related to the download.file.method
. This has already been discussed in r-lib/remotes#130, but the issue has not been fixed there.
When I patch r-appveyor
and force the download method to wininet
, everything works fine. (Neither curl
, libcurl
, wget
worked...).
- Patch diff: master...grst:master
- Patched test repo: https://github.com/grst/test-r-appveyor/compare/patch
- CI result: https://ci.appveyor.com/project/grst/test-r-appveyor/builds/25189015
Maybe it makes sense to use wininet
as default method in r-appveyor
? After all, it's intended for windows only.
Thanks. Perhaps we can expose this through an environment variable first? Would you like to submit a PR?
I'm seeing this too now for R 3.2. Thanks for confirming the minimum version.