randy3k / radian

A 21 century R console
MIT License
2k stars 76 forks source link

`renv::install` is unable to download packages when called from a `radian` session (Windows 10). #307

Open Sean1708 opened 3 years ago

Sean1708 commented 3 years ago

Here is a reproduction of the issue from as fresh a state as I could manage:

$ radian --version
radian version: 0.5.11
r executable: C:\Program Files\R\R-4.1.1\bin\R
r version: 4.1.1
python executable: C:\Users\******\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe
python version: 3.8.10

$ radian
R version 4.1.1 (2021-08-10) -- "Kick Things"
Platform: x86_64-w64-mingw32 (64-bit)

r$> list.files(all.files = T, recursive = T)
character(0)

r$> library(renv)

Attaching package: 'renv'

The following objects are masked from 'package:stats':

    embed, update

The following objects are masked from 'package:utils':

    history, upgrade

The following objects are masked from 'package:base':

    load, remove

r$> renv::init()
* Initializing project ...
* Discovering package dependencies ... Done!
* Copying packages into the cache ... Done!
The following package(s) will be updated in the lockfile:

# CRAN ===============================
- renv   [* -> 0.14.0]

* Lockfile written to '~/Software/Test/renv.lock'.
* Project '~/Software/Test' loaded. [renv 0.14.0]
* renv activated -- please restart the R session.

r$>

$ radian
* Project '~/Software/Test' loaded. [renv 0.14.0]
R version 4.1.1 (2021-08-10) -- "Kick Things"
Platform: x86_64-w64-mingw32 (64-bit)

r$> renv::install("dplyr")
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/dplyr_1.0.7.zip' ...
Error: failed to retrieve 'https://cloud.r-project.org/bin/windows/contrib/4.1/dplyr_1.0.7.zip' [error code 23]
In addition: Warning message:
curl: (23) Failed writing body (0 != 16384)
Traceback (most recent calls last):
8: renv::install("dplyr")
7: retrieve(names(remotes))
6: handler(package, renv_retrieve_impl(package))
5: renv_retrieve_impl(package)
4: renv_retrieve_repos(record)
3: renv_retrieve_repos_impl(record)
2: renv_retrieve_package(record, url, path)
1: stop(status)

r$> renv::install("tibble")
Installing rlang [0.4.11] ...
        OK [linked cache]
Installing ellipsis [0.3.2] ...
        OK [linked cache]
Installing fansi [0.5.0] ...
        OK [linked cache]
Installing glue [1.4.2] ...
        OK [linked cache]
Installing lifecycle [1.0.0] ...
        OK [linked cache]
Installing magrittr [2.0.1] ...
        OK [linked cache]
Installing cli [3.0.1] ...
        OK [linked cache]
Installing crayon [1.4.1] ...
        OK [linked cache]
Installing utf8 [1.2.2] ...
        OK [linked cache]
Installing vctrs [0.3.8] ...
        OK [linked cache]
Installing pillar [1.6.2] ...
        OK [linked cache]
Installing pkgconfig [2.0.3] ...
        OK [linked cache]
Installing tibble [3.1.4] ...
        OK [linked cache]

r$> renv::install("ggplot2")
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/ggplot2_3.3.5.zip' ...
Error: failed to retrieve 'https://cloud.r-project.org/bin/windows/contrib/4.1/ggplot2_3.3.5.zip' [error code 23]
In addition: Warning message:
curl: (23) Failed writing body (0 != 14741)
Traceback (most recent calls last):
8: renv::install("ggplot2")
7: retrieve(names(remotes))
6: handler(package, renv_retrieve_impl(package))
5: renv_retrieve_impl(package)
4: renv_retrieve_repos(record)
3: renv_retrieve_repos_impl(record)
2: renv_retrieve_package(record, url, path)
1: stop(status)

r$>

$ R

R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

* Project '~/Software/Test' loaded. [renv 0.14.0]
> renv::install("dplyr")
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/dplyr_1.0.7.zip' ...
        OK [downloaded 1.3 Mb in 0.3 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/generics_0.1.0.zip' ...
        OK [downloaded 70.4 Kb in 0.3 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/R6_2.5.1.zip' ...
        OK [downloaded 82.2 Kb in 0.4 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/tidyselect_1.1.1.zip' ...
        OK [downloaded 199.7 Kb in 0.4 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/purrr_0.3.4.zip' ...
        OK [downloaded 420.6 Kb in 0.4 secs]
Installing generics [0.1.0] ...
        OK [installed binary]
Moving generics [0.1.0] into the cache ...
        OK [moved to cache in 21 milliseconds]
Installing R6 [2.5.1] ...
        OK [installed binary]
Moving R6 [2.5.1] into the cache ...
        OK [moved to cache in 26 milliseconds]
Installing purrr [0.3.4] ...
        OK [installed binary]
Moving purrr [0.3.4] into the cache ...
        OK [moved to cache in 36 milliseconds]
Installing tidyselect [1.1.1] ...
        OK [installed binary]
Moving tidyselect [1.1.1] into the cache ...
        OK [moved to cache in 41 milliseconds]
Installing dplyr [1.0.7] ...
        OK [installed binary]
Moving dplyr [1.0.7] into the cache ...
        OK [moved to cache in 25 milliseconds]
> renv::install("ggplot2")
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/ggplot2_3.3.5.zip' ...
        OK [downloaded 3.9 Mb in 0.6 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/digest_0.6.27.zip' ...
        OK [downloaded 262.5 Kb in 0.5 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/gtable_0.3.0.zip' ...
        OK [downloaded 424.2 Kb in 0.5 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/isoband_0.2.5.zip' ...
        OK [downloaded 2.6 Mb in 0.8 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/scales_1.1.1.zip' ...
        OK [downloaded 545.5 Kb in 0.5 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/farver_2.1.0.zip' ...
        OK [downloaded 1.7 Mb in 0.7 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/labeling_0.4.2.zip' ...
        OK [downloaded 61.2 Kb in 0.4 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/munsell_0.5.0.zip' ...
        OK [downloaded 239.3 Kb in 0.4 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/colorspace_2.0-2.zip' ...
        OK [downloaded 2.5 Mb in 0.4 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/RColorBrewer_1.1-2.zip' ...
        OK [downloaded 54.4 Kb in 0.4 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/viridisLite_0.4.0.zip' ...
        OK [downloaded 1.2 Mb in 0.5 secs]
Retrieving 'https://cloud.r-project.org/bin/windows/contrib/4.1/withr_2.4.2.zip' ...
        OK [downloaded 208.2 Kb in 0.3 secs]
Installing digest [0.6.27] ...
        OK [installed binary]
Moving digest [0.6.27] into the cache ...
        OK [moved to cache in 23 milliseconds]
Installing gtable [0.3.0] ...
        OK [installed binary]
Moving gtable [0.3.0] into the cache ...
        OK [moved to cache in 9.3 milliseconds]
Installing isoband [0.2.5] ...
        OK [installed binary]
Moving isoband [0.2.5] into the cache ...
        OK [moved to cache in 30 milliseconds]
Installing farver [2.1.0] ...
        OK [installed binary]
Moving farver [2.1.0] into the cache ...
        OK [moved to cache in 26 milliseconds]
Installing labeling [0.4.2] ...
        OK [installed binary]
Moving labeling [0.4.2] into the cache ...
        OK [moved to cache in 21 milliseconds]
Installing colorspace [2.0-2] ...
        OK [installed binary]
Moving colorspace [2.0-2] into the cache ...
        OK [moved to cache in 24 milliseconds]
Installing munsell [0.5.0] ...
        OK [installed binary]
Moving munsell [0.5.0] into the cache ...
        OK [moved to cache in 24 milliseconds]
Installing RColorBrewer [1.1-2] ...
        OK [installed binary]
Moving RColorBrewer [1.1-2] into the cache ...
        OK [moved to cache in 28 milliseconds]
Installing viridisLite [0.4.0] ...
        OK [installed binary]
Moving viridisLite [0.4.0] into the cache ...
        OK [moved to cache in 8.2 milliseconds]
Installing scales [1.1.1] ...
        OK [installed binary]
Moving scales [1.1.1] into the cache ...
        OK [moved to cache in 29 milliseconds]
Installing withr [2.4.2] ...
        OK [installed binary]
Moving withr [2.4.2] into the cache ...
        OK [moved to cache in 22 milliseconds]
Installing ggplot2 [3.3.5] ...
        OK [installed binary]
Moving ggplot2 [3.3.5] into the cache ...
        OK [moved to cache in 23 milliseconds]

$ radian
* Project '~/Software/Test' loaded. [renv 0.14.0]
R version 4.1.1 (2021-08-10) -- "Kick Things"
Platform: x86_64-w64-mingw32 (64-bit)

r$> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

r$> library(tibble)

r$> library(ggplot2)

r$>

I'd already installed tibble when I was playing around trying to diagnose this and that installed fine in both radian and R, but when trying to install a package that has not yet been downloaded renv::install fails in radian and succeeds in R.

If there's any information that you need to debug this, let me know. I'm not particularly familiar with R, and I'm completely unfamiliar with Windows, so this was all I knew to provide initially, but if you let me know how to get any other information I can provide it for you.