Inconsistent deployment to Rstudio-Connect

I'm running into issues with deploying my app to my server. Sometimes it works, and sometimes it fails. This problem began 4 days ago.

The current issue appears to be a problem with a package I am installing from GitHub. However, I am able to install the package locally, and also successfully able to install it remotely on the server that I have Posit Connect installed on.

This is the line of code that is currently causing the failure (only when publishing the app to the server through RStudio, not when installing the package locally or on the server).

devtools::install_github("melissagwolf/semPlot", ref = "packrat_errors")

Here is the log:

2023/11/07 23:54:57.552557707 Installing semPlot (1.1.5) ... 
2023/11/07 23:54:58.420587406 FAILED
2023/11/07 23:54:58.421036499 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to download package from URL:
2023/11/07 23:54:58.421073936 - ''
2023/11/07 23:54:58.421176413 
2023/11/07 23:54:58.421179689 Unable to fully restore the R packages associated with this deployment.
2023/11/07 23:54:58.421193316 Please review the preceding messages to determine which package
2023/11/07 23:54:58.421195940 encountered installation difficulty and the cause of the failure.

However, I was able to successfully publish this exact same shiny app last night, although it took approximately 15 hours to successfully load. What could the problem be? How can I resolve this?

Are you running devtools::install_github() in your application code? In general, you should make sure the application is installed from GitHub in your development environment. If you run rsconnect::writeManifest() from your development environment, the package you're trying to install from GitHub should be listed there.

Yes, I am running devtools::install_github. I install two packages before this one using it.

The only reason I am using a remote package is because the CRAN version of this package won't load. I am getting errors on the server due to one of the dependencies (OpenMx), similar to this: gcc - Installing OpenMx package in R on Ubuntu 18.04LTS - Stack Overflow.

writeManifest ran successfully:

"semPlot": {
      "Source": "github",
      "Repository": null,
      "description": {
        "Package": "semPlot",
        "Type": "Package",
        "Title": "Path Diagrams and Visual Analysis of Various SEM Packages'\nOutput",
        "Version": "1.1.5",
        "Authors@R": "c(\n  person(\"Sacha\", \"Epskamp\", email = \"\",role = c(\"aut\", \"cre\")),\n  person(\"Simon\", \"Stuber\", role = c(\"ctb\")),\n  person(\"Jason\", \"Nak\", role = c(\"ctb\")),\n  person(\"Myrthe\", \"Veenman\", role = c(\"ctb\")),\n  person(given = c(\"Terrence\",\"D.\"), family = \"Jorgensen\", role = c(\"ctb\"), comment = c(ORCID = \"0000-0001-5111-6773\"))\n  )",
        "Maintainer": "Sacha Epskamp <>",
        "Depends": "R (>= 2.15.0)",
        "Suggests": "MplusAutomation (>= 0.5-3)",
        "Imports": "qgraph (>= 1.2.4), lavaan (>= 0.5-11), sem (>= 3.1-0), plyr,\nXML, igraph (>= 0.6-3), lisrelToR, rockchalk, colorspace,\ncorpcor, methods",
        "ByteCompile": "yes",
        "Description": "Path diagrams and visual analysis of various SEM packages' output.",
        "URL": "",
        "License": "GPL-2",
        "LazyLoad": "yes",
        "RemoteType": "github",
        "RemoteHost": "",
        "RemoteRepo": "semPlot",
        "RemoteUsername": "melissagwolf",
        "RemoteRef": "packrat_errors",
        "RemoteSha": "6041366e37fc6f4509e17d09541ac69159c32238",
        "GithubRepo": "semPlot",
        "GithubUsername": "melissagwolf",
        "GithubRef": "packrat_errors",
        "GithubSHA1": "6041366e37fc6f4509e17d09541ac69159c32238",
        "NeedsCompilation": "no",
        "Packaged": "2023-11-07 10:22:03 UTC; missg",
        "Author": "Sacha Epskamp [aut, cre],\n  Simon Stuber [ctb],\n  Jason Nak [ctb],\n  Myrthe Veenman [ctb],\n  Terrence D. Jorgensen [ctb] (<>)",
        "Built": "R 4.3.0; ; 2023-11-07 10:22:04 UTC; windows"

This is another example of an error I got from the same attempted deployment: Unable to publish Shiny App on Rstudio-Connect, with lme4.

I just tried pushing the app again with the CRAN version of the package (semPlot) and it suddenly went through, although the app has been stuck loading for the last 20 minutes. I did not do anything, so I am not sure why the OpenMx error suddenly went away?

In general, everything feels very unstable and I do not understand why errors are appearing and disappearing.

Similar to my response on your other post, I think you may be helped by trying to install a binary version of the package from Posit Public Package Manager.

If you can simplify your app down to a reproducible example that you can share on GitHub, we can try to figure out where things might be going wrong.