Entering edit mode
I'm seeing download errors with Bioconductor 3.12 for some packages currently, primarily some large data packages.
Here's an example error with reactome.db:
install("reactome.db")
Bioconductor version 3.12 (BiocManager 1.30.10), R 4.0.3 (2020-10-10)
Installing package(s) 'reactome.db'
installing the source package ‘reactome.db’
trying URL 'https://bioconductor.org/packages/3.12/data/annotation/src/contrib/reactome.db_1.74.0.tar.gz'
Content type 'application/x-gzip' length 430092992 bytes (410.2 MB)
================
downloaded 137.5 MB
Error in download.file(url, destfile, method, mode = "wb", ...) :
(converted from warning) downloaded length 144140511 != reported length 430092992
Calls: install ... tryCatchList -> tryCatchOne -> doTryCatch -> download.file
I'm also seeing this with some of the BSgenome packages.
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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] bb8_0.2.32
loaded via a namespace (and not attached):
[1] compiler_4.0.3 BiocManager_1.30.10 magrittr_1.5
[4] tools_4.0.3 crayon_1.3.4 remotes_2.2.0
[7] rlang_0.4.8
This 'works for me'. Usually the error
download length XXX != reported length YYY
indicates that an internet connectivity issue, and the best first line of attack is to try again, perhaps from a better connection. A second approach might be to visit the URL in, e.g., a browser https://bioconductor.org/packages/3.12/data/annotation/src/contrib/reactome.db_1.74.0.tar.gz to download the file, and then to install it locally,install.packages("reactome.db_1.74.0.tar.gz", repos = NULL, type = "source")
.Thanks Martin, I'm still seeing it this morning on my home connection. I'm guessing it's an ISP / CDN issue, but just wanted to let you guys know. I'll see if I can replicate it on an Amazon EC2 instance.
Yeah this seems to be an issue specifically with the internal
download.packages
call. I can download the package manually using curl or wget fine and install directly from the tarball. The download only fails inside of the R install command.Good catch. The method used to download packages is influenced by the global option
download.file.method
as documented on?download.file
. So it would be interesting to know whethersucceeds.
Thanks this is helpful for debugging.
libcurl seems to be the culprit on my machine.
curl works, but with some issues.
wget also works but is a little overly verbose with the HTTP headers.
A second work-around might be to change the option
"timeout"
, e.g.,options(timeout = 180L)
as described on the help page of?download.files
. It would be good to know if this also works.