RStudio Connect trying to fetch latest version of `foreign` from `contrib/Archive` instead of `contrib`

I am deploying an app to our RStudio Connect server from the R console using rsconnect::deployApp. As it installs the first packages, the server properly looks for latest versions athttps://cran.rstudio.com/src/contrib/, and older versions athttps://cran.rstudio.com/src/contrib/Archive. However when it comes to foreign, which is at the latest version on my local system (v0.8-82), the server runs into this problem:

[Connect] 2022/08/22 21:11:35.209578969 Installing foreign (0.8-82) ... 
[Connect] 2022/08/22 21:11:35.504115927 curl: HTTP 404 https://cran.rstudio.com/src/contrib/Archive/foreign/foreign_0.8-82.tar.gz
[Connect] 2022/08/22 21:11:35.504132429 curl: (22) The requested URL returned error: 404 Not Found

The server is trying to fetch foreign_0.8-82.tar.gz from contrib/Archive but that file is missing since it actually resides at https://cran.rstudio.com/src/contrib/foreign_0.8-82.tar.gz. Any idea on why the server is confused?

The problem was that the only R version on the server (3.6.3) was too old for version 0.8-82 of foreign, which requires at least R 4.0. The problem was resolved after installing R 4.2.1.

1 Like

This topic was automatically closed 7 days after the last reply. 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.