I remote into a Windows virtual machine to do my work in R and Stan. My IT folks are trying to install CmdStan using cmdstanr::install_cmdstan() on the virtual machine and getting the following error: “Error: GitHub download of release list failed.” Here’s the code they ran (from the R GUI), along with the output:
> This is cmdstanr version 0.4.0
> - Online documentation and vignettes at mc-stan.org/cmdstanr
> - Use set_cmdstan_path() to set the path to CmdStan
> - Use install_cmdstan() to install CmdStan
install_cmdstan()
> Error:
> RTools installation found but PATH was not properly set.
> Run check_cmdstan_toolchain(fix = TRUE) to fix the issue.
check_cmdstan_toolchain(fix = TRUE)
> Installing mingw32-make and writing RTools path to ~/.Renviron ...
> The C++ toolchain required for CmdStan is setup properly!
install_cmdstan()
> The C++ toolchain required for CmdStan is setup properly!
> Error: GitHub download of release list failed.
My local computer is a Mac and I’m not that familiar with issues that come up with Windows CmdStan installations. Searching the web and this forum for the error message didn’t turn up a solution.
The Windows virtual machine normally can’t access any website outside our firewall except the RStudio CRAN mirror, but IT opens limited outside access when they need to install new or updated software. Is it possible that R can’t access some necessary files at mc-stan.org (or elsewhere)?
Here’s some info on the Windows virtual machine:
Operating system: Windows Server 2016 Standard Version 10.0.14393 Build 14393.
R version: 4.1.1.
Rtools version: 4.0.
If there’s additional information that would be helpful, please let me know and I will add it.
It looks like there are firewall issues for R connecting to github, rather than a system/R configuration issue
If your IT department isn’t able to open access for the installation, then your other option is to manually download and setup cmdstan, and then use set_cmdstan_path in cmdstanr to point to it
You can also unpack cmdstan in the ~/.cmdstan/cmdstan-version (for example cmdstan-2.28.0) folder and it will get picked up automatically, without having to use the set_cmdstan_path function.
I’m now having the same issue on my personal Mac laptop. Last week, I installed CmdStan 2.28.0 without any issues by running install_cmdstan(). When I read that version 2.28.1 had been released and that it fixed a bug in 2.28.0, I tried to install 2.28.1 and got the following:
> library(cmdstanr)
This is cmdstanr version 0.4.0
- Online documentation and vignettes at mc-stan.org/cmdstanr
- CmdStan path set to: /Users/js/.cmdstanr/cmdstan-2.28.0
- Use set_cmdstan_path() to change the path
> install_cmdstan()
The C++ toolchain required for CmdStan is setup properly!
Error: GitHub download of release list failed.
I ran this while on my home network, so there shouldn’t be any special firewall issues. Furthermore, the installation worked without error last week when I installed version 2.28.0.
Based on your suggestions above, I tried a local installation by opening Terminal and running:
git clone https://github.com/stan-dev/cmdstan.git --recursive
cd cmdstan
make build
That worked. However, I’d like to resolve the issue that’s causing the “Error: GitHub download of release list failed” error. Any ideas about what could be going on and how to fix it?
The install is failing at github_auth_token(). I had to update my Github personal access token a few days ago, but forgot to update GITHUB_PAT in my .Renviron file (facepalm). Once I updated the token, the install on my Mac proceeded without a problem. The install on the virtual Windows machine probably failed for the same reason. I will have IT set up a Github access token for the virtual machine.
Maybe it would make sense to modify the error message in latest_released_version() to be a bit more informative about what to check in order to diagnose and fix the error (e.g., information about adding a Github access token to .Renviron).
Thank you very much for debugging. Seems like an edge case we should handle yes.
I think the most common causes for this error to show up are that the user either does not have internet access, has firewall issues or restrictions, or has made too many request to Github in the last X hours (not sure what the exact limit is).
I may be wrong, but I would guess that most user dont use the GITHUB_PAT environment variable so maybe we add that suggestion only if a environment variable GITHUB_PAT is found?
Though if my assumption is wrong and please correct me anyone thinks it is, we could suggest it always.
Hi all,
I just wanted to mention that I got the same error after updating to R 4.1.2 and following the installation instructions on the CmdStan page. And updating GITHUB_PAT with a new token did solve the issue, so thanks! This is the only place where I found the solution.