I have a shiny
app the I've been publishing to a Posit Connect
server hosted by the HPC at my institution. The app is from my RStudio
on my laptop . The Cluster has configured Posit Connect
to use Package Manager
to host and vet packages for security and stability. Up until recently, one of the apps I was making changes to stopped publishing normally, reverting the code does nothing. The error log is as follows:
Preparing to deploy application...DONE
Uploading bundle for application: 194...Warning:
* May be unable to deploy package dependency 'Biobase'; could not
determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'BiocGenerics'; could not
determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'ComplexHeatmap'; could
not determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'DelayedArray'; could not
determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'GenomeInfoDb'; could not
determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'GenomeInfoDbData'; could
not determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'GenomicRanges'; could not
determine a repository URL for the source 'Bioconductor'.
* May be unable to deploy package dependency 'IRanges'; could not
deter [... truncated]
DONE
Deploying bundle: 2412 for application: 194 ...
[Connect] Building Shiny application...
[Connect] Bundle created with R version 4.3.1 is compatible with environment Local with R version 4.2.1 from /opt/R/4.2.1/bin/R
[Connect] Bundle requested R version 4.3.1; using /opt/R/4.2.1/bin/R which has version 4.2.1
[Connect] 2023/06/28 00:36:47.438607069 [rsc-session] Content GUID: 3b5a96d1-ff2b-43c1-a358-31ab157ed34e
[Connect] 2023/06/28 00:36:47.440151493 [rsc-session] Content ID: 194
[Connect] 2023/06/28 00:36:47.440182650 [rsc-session] Bundle ID: 2412
[Connect] 2023/06/28 00:36:48.472774418 Running on host: ccb-rstudio-frontend02.rc.hms.harvard.edu
[Connect] 2023/06/28 00:36:48.488884749 Linux distribution: CentOS Linux release 7.9.2009 (Core)
[Connect] 2023/06/28 00:36:48.497343573 Running as user: uid=1204(rstudio-connect) gid=1204(rstudio-connect) groups=1204(rstudio-connect)
[Connect] 2023/06/28 00:36:48.497355956 Connect version: 2023.03.0
[Connect] 2023/06/28 00:36:48.497412673 LANG: en_US.UTF-8
[Connect] 2023/06/28 00:36:48.497414316 Working directory: /opt/rstudio-connect/mnt/app
[Connect] 2023/06/28 00:36:48.498098051 Using R 4.2.1
[Connect] 2023/06/28 00:36:48.498116873 R.home(): /opt/R/4.2.1/lib/R
[Connect] 2023/06/28 00:36:48.499915918 Using user agent string: 'RStudio R (4.2.1 x86_64-pc-linux-gnu x86_64 linux-gnu)'
[Connect] 2023/06/28 00:36:48.500576402 # Validating R library read / write permissions --------------------------------
[Connect] 2023/06/28 00:36:48.504334334 Using R library for packrat bootstrap: /opt/rstudio-connect/mnt/R/4.2.1
[Connect] 2023/06/28 00:36:48.504583023 # Validating managed packrat installation --------------------------------------
[Connect] 2023/06/28 00:36:48.505160063 Vendored packrat archive: /opt/rstudio-connect/ext/R/packrat_0.9.1_91ea7f537fb69ce5706114dd8f949fa5b0820efc.tar.gz
[Connect] 2023/06/28 00:36:48.528306549 Vendored packrat SHA: 91ea7f537fb69ce5706114dd8f949fa5b0820efc
[Connect] 2023/06/28 00:36:48.533583454 Managed packrat SHA: 91ea7f537fb69ce5706114dd8f949fa5b0820efc
[Connect] 2023/06/28 00:36:48.536242218 Managed packrat version: 0.9.1
[Connect] 2023/06/28 00:36:48.536667803 Managed packrat is up-to-date.
[Connect] 2023/06/28 00:36:48.537034021 # Validating packrat cache read / write permissions ----------------------------
[Connect] 2023/06/28 00:36:48.635833532 Using packrat cache directory: /opt/rstudio-connect/mnt/packrat/4.2.1
[Connect] 2023/06/28 00:36:49.219188276 Audited package hashes with local packrat installation.
[Connect] 2023/06/28 00:36:49.328694414 # Installing required R packages with `packrat::restore()` ---------------------
[Connect] 2023/06/28 00:36:50.271434139 Installing BH (1.81.0-1) ...
[Connect] 2023/06/28 00:36:50.298759034 Using cached BH.
[Connect] 2023/06/28 00:36:50.299953779 OK (symlinked cache)
[Connect] 2023/06/28 00:36:50.300100268 Installing BiocGenerics (0.46.0) ...
[Connect] 2023/06/28 00:36:50.527819921 curl: HTTP 200 https://cran.rstudio.com/src/contrib/PACKAGES.rds
[Connect] 2023/06/28 00:36:51.173521703 curl: HTTP 200 https://rspm.connect.hms.harvard.edu/prod-cran/latest/src/contrib/PACKAGES.rds
[Connect] 2023/06/28 00:37:17.983907982 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:17.983947885 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:19.171784524 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:19.171795205 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:20.407475180 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:20.407486316 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:21.640974163 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:21.640990590 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:22.824404103 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:22.824414553 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:24.218334948 curl: HTTP 404 https://rspm.connect.hms.harvard.edu/prod-cran/latest/src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:24.218345466 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:25.615125315 curl: HTTP 404 https://rspm.connect.hms.harvard.edu/prod-cran/latest/src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:25.615139854 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:27.011911186 curl: HTTP 404 https://rspm.connect.hms.harvard.edu/prod-cran/latest/src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:27.011924177 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:28.417026399 curl: HTTP 404 https://rspm.connect.hms.harvard.edu/prod-cran/latest/src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:28.417045254 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:29.811606476 curl: HTTP 404 https://rspm.connect.hms.harvard.edu/prod-cran/latest/src/contrib/Archive/BiocGenerics/BiocGenerics_0.46.0.tar.gz
[Connect] 2023/06/28 00:37:29.811619482 curl: (22) The requested URL returned error: 404 Not Found
[Connect] 2023/06/28 00:37:30.814883774 FAILED
[Connect] 2023/06/28 00:37:30.816503361 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for BiocGenerics 0.46.0 from CRAN (internet connectivity issue?)
[Connect] 2023/06/28 00:37:30.816546249
[Connect] 2023/06/28 00:37:30.816548415 Unable to fully restore the R packages associated with this deployment.
[Connect] 2023/06/28 00:37:30.816571194 Please review the preceding messages to determine which package
[Connect] 2023/06/28 00:37:30.816572328 encountered installation difficulty and the cause of the failure.
[Connect] 2023/06/28 00:37:30.828662048 Warning message:
[Connect] 2023/06/28 00:37:30.828781362 In packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) :
[Connect] 2023/06/28 00:37:30.828787682 The most recent snapshot was generated using R version 4.3.1
[Connect] An error occurred while building your content.
[Connect] This link offers advice for this kind of error:
[Connect] https://docs.posit.co/connect/user/troubleshooting/#r-package-not-available
[Connect] Build error: An error occurred while building your content. (Error code: r-package-not-available)
Application deployment failed with error: An error occurred while building your content. (Error code: r-package-not-available)
My .Rprofile file :
options(repos = c(CRAN = "https://rspm.connect.hms.harvard.edu/prod-cran/latest"))
options(BioC_mirror = "https://rspm.connect.hms.harvard.edu/bioconductor")
options(repos = BiocManager::repositories())
One of the packages shows up like this in the manifest.json
"Biobase": {
"Source": "RSPM",
"Repository": null,
"description": {
"Package": "Biobase",
"Title": "Biobase: Base functions for Bioconductor",
"Description": "Functions that are needed by many other packages or which\n replace R functions.",
"biocViews": "Infrastructure",
"URL": "https://bioconductor.org/packages/Biobase",
"BugReports": "https://github.com/Bioconductor/Biobase/issues",
"Version": "2.60.0",
"License": "Artistic-2.0",
"Authors@R": "c(\n person(\"R.\", \"Gentleman\", role=\"aut\"),\n person(\"V.\", \"Carey\", role = \"aut\"),\n person(\"M.\", \"Morgan\", role=\"aut\"),\n person(\"S.\", \"Falcon\", role=\"aut\"),\n person(\"Haleema\", \"Khan\",\n role = \"ctb\",\n comment = \"'esApply' and 'BiobaseDevelopment' vignette translation from Sweave to Rmarkdown / HTML\"\n ),\n person(\"Bioconductor Package Maintainer\",\n role = \"cre\",\n email = \"maintainer@bioconductor.org\"\n ))",
"Suggests": "tools, tkWidgets, ALL, RUnit, golubEsets, BiocStyle, knitr",
"Depends": "R (>= 2.10), BiocGenerics (>= 0.27.1), utils",
"Imports": "methods",
"VignetteBuilder": "knitr",
"LazyLoad": "yes",
"Collate": "tools.R strings.R environment.R vignettes.R packages.R\nAllGenerics.R VersionsClass.R VersionedClasses.R\nmethods-VersionsNull.R methods-VersionedClass.R DataClasses.R\nmethods-aggregator.R methods-container.R methods-MIAxE.R\nmethods-MIAME.R methods-AssayData.R\nmethods-AnnotatedDataFrame.R methods-eSet.R\nmethods-ExpressionSet.R methods-MultiSet.R methods-SnpSet.R\nmethods-NChannelSet.R anyMissing.R rowOp-methods.R\nupdateObjectTo.R methods-ScalarObject.R zzz.R",
"git_url": "https://git.bioconductor.org/packages/Biobase",
"git_branch": "RELEASE_3_17",
"git_last_commit": "8dc10d2",
"git_last_commit_date": "2023-04-25",
"Date/Publication": "2023-04-25",
"NeedsCompilation": "yes",
"Packaged": "2023-04-25 20:18:46 UTC; biocbuild",
"Author": "R. Gentleman [aut],\n V. Carey [aut],\n M. Morgan [aut],\n S. Falcon [aut],\n Haleema Khan [ctb] ('esApply' and 'BiobaseDevelopment' vignette\n translation from Sweave to Rmarkdown / HTML),\n Bioconductor Package Maintainer [cre]",
"Maintainer": "Bioconductor Package Maintainer <maintainer@bioconductor.org>",
"Repository": "RSPM",
"Encoding": "UTF-8",
"Built": "R 4.3.1; x86_64-w64-mingw32; 2023-06-27 21:30:42 UTC; windows",
"Archs": "x64"
}
Which I thought should have taken care of the bioconductor
packages. Why is the manifest trying to pull from CRAN instead of bioconductor? Is it supposed to have the repo listed as RSPM or as bioconductor? I've also tried clearing the library, doing a fresh reinstall of R and all the packages using the public mirrors, but still encounter this error. Was able to also replicate this error on another machine. Is there something I should ask the admins of Package Manager
and Posit Connect
to troubleshoot?