Error while deploying RShiny app to RStudio Connect that requires pcaMethods R library

94 Views Asked by At

When I try to publish an RShiny app to RStudio Connect instance, I get the following 'A required R package was found in the package repository, but the specified version is not available.' error. Can someone help me fix this issue?

I tried the following suggestion as well in vain: Configure the client with a package repository that is accessible via http(s) from the Connect server, such as CRAN or RStudio Package Manager. Reinstall the affected packages from the new repository and publish the content again with no luck.

[Connect] 2023/02/06 21:08:00.134251192 curl: HTTP 404 https://bioconductor.org/packages/3.16/bioc/src/contrib/Archive/pcaMethods/pcaMethods_1.88.0.tar.gz
GET /__api__/tasks/mBCmiDx3xoVyy0wY?first_status=359 9ms
[Connect] 2023/02/06 21:08:01.137834919 FAILED
[Connect] 2023/02/06 21:08:01.138457950 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for pcaMethods 1.88.0 from CRAN (internet connectivity issue?) [1.90.0 is current]
[Connect] 2023/02/06 21:08:01.138490463 
[Connect] 2023/02/06 21:08:01.138539531 Unable to fully restore the R packages associated with this deployment.
[Connect] 2023/02/06 21:08:01.138544607 Please review the preceding messages to determine which package
[Connect] 2023/02/06 21:08:01.138557619 encountered installation difficulty and the cause of the failure.
[Connect] 2023/02/06 21:08:01.141367007 Warning message:
[Connect] 2023/02/06 21:08:01.141479571 In packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) :
[Connect] 2023/02/06 21:08:01.141484660   The most recent snapshot was generated using R version 4.2.1
[Connect] 2023/02/06 21:08:01.138683504 Error code: r-package-version-not-available
[Connect] A required R package was found in the package repository, but the specified version is not available.
[Connect] Possible causes:
[Connect] * The client computer that published the content is using a different package repository from the Connect server, and the package repository that Connect is using does not have the requested version of the package.
[Connect] * The Connect server is using a CRAN mirror that is out of date.
[Connect] * The package repository moved to a new URL after the content was published, and Connect is now attempting to rebuild the environment using the old package repository URL.
[Connect] 
[Connect] Possible solutions:
[Connect] * Configure the client with a package repository that is accessible via http(s) from the Connect server, such as CRAN or RStudio Package Manager. Reinstall the affected packages from the new repository and publish the content again.
[Connect] * Update the packages on the CRAN mirror.
  - If this is a local instance of RStudio Package Manager, see the Package Manager documentation for instructions on how to update the mirrored packages.
  - If this is a public CRAN mirror, it may be experiencing technical problems. Choose a different CRAN mirror.
[Connect] 
[Connect] References:
[Connect] * https://docs.rstudio.com/rspm/admin/repositories/#sync-schedule
[Connect] * https://docs.rstudio.com/rspm/admin/appendix/airgapped-installs/#air-gapped-updates
[Connect] * https://support.rstudio.com/hc/en-us/articles/360004067074-Managing-Packages-with-RStudio           
[Connect] 
[Connect] 2023/02/06 21:08:01.138683504 Additional data:
[Connect] Repository: 'CRAN'
[Connect] AvailableVersion: '1.90.0'
[Connect] Package: 'pcaMethods'
[Connect] PackageVersion: '1.88.0'
[Connect] Found in the following log entry:
[Connect] 2023/02/06 21:08:01.138457950 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for pcaMethods 1.88.0 from CRAN (internet connectivity issue?) [1.90.0 is current]
[Connect] Build error: A required R package was found in the package repository, but the specified version is not available. (r-package-version-not-available)
0

There are 0 best solutions below