rstudio / rstudio/packrat

Better error for "can't connect to the Internet"

Open
#306 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
409
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Currently, if a user is running on a server that's behind a proxy or otherwise disconnected from the internet, you get an error message like the following:

LOG: 
Preparing to deploy document...DONE 
Uploading bundle for document: 5...DONE 
Deploying bundle: 31 for document: 5 ... 
Deploying to R version '3.3.0' (Local version is '3.3.0') 
2016/06/20 10:35:45.383367777 Installed packrat SHA is 211179210c1d81db703973351f95d3c96dd557b7; packaged packrat SHA is 211179210c1d81db703973351f95d3c96dd557b7 
2016/06/20 10:35:45.384340179 Packrat is up-to-date. 
2016/06/20 10:35:45.384475063 R version: 3.3.0 
2016/06/20 10:35:45.384554942 packrat version: 0.4.7.9 
2016/06/20 10:35:45.448654359 Audited package hashes with local packrat installation. 
2016/06/20 10:35:45.582155457 Installing R6 (2.1.2) ... 
2016/06/20 10:35:50.702495632 FAILED 
2016/06/20 10:35:50.703325868 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePkgs, : Couldn't find source for version 2.1.2 of R6 

it makes it appear that the problem is with the particular package that you're trying to load. In reality, you can't connect to that CRAN mirror at all. Would it be possible to add a "Checking connection to CRAN mirror" step before loading the packages or to check for general connectivity if it looks like we're having trouble grabbing the necessary packages.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the deployment shown in the issue with a server that cannot reach the CRAN mirror, then trace the package-loading path that produces the misleading R6 source error. Done means users receive a distinct connectivity or CRAN-mirror error instead of an error attributing the failure to the package itself.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.