Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RStudio hangs during RMarkdown check without internet access #2288

Closed
coatless opened this issue Feb 27, 2018 · 4 comments
Closed

RStudio hangs during RMarkdown check without internet access #2288

coatless opened this issue Feb 27, 2018 · 4 comments
Labels

Comments

@coatless
Copy link

System details

RStudio Edition : Desktop
RStudio Version :  1.2.140
OS Version      :  CentOS 7
R Version       : 3.4.3

Steps to reproduce the problem

  1. Disconnect from the internet for over a two weeks after installing RStudio and rmarkdown.
  2. Try creating a new RMarkdown document using File => New File => R Markdown
  3. Watch it hang.

img_1544

Describe the problem in detail

The client crashes when trying to open a new RMarkdown notebook when offline for a prolonged amount of time.

Describe the behavior you expected

If RStudio is not able to connect to the internet, this check should not be run or it should not time out causing the client to crash.

@kevinushey
Copy link
Contributor

I'm guessing you can trigger the same behavior with something like:

available.packages()

as that can hang when there is no internet connectivity. I'm not sure if there's a good way for us to handle this (or check if the system has internet connectivity altogether)

@coatless
Copy link
Author

@kevinushey we're running into this issue in our computer-based testing facility (CBTF). The facility blocks outbound connections unless they fall in certain use cases. I'll test this out tomorrow and get back to you.

@dfalty dfalty added the bug label Feb 28, 2018
@coatless
Copy link
Author

coatless commented Mar 1, 2018

So, it seems like the available.packages() code bugs out on first run. The subsequent run in the same session returns an error as expected.

img_8354

If I use a different document type initially and then switch it to a .Rmd, e.g. .R to .Rmd, the inline code engine works. However, pressing Knit returns the hang issue.

After a prolonged time, I slowly start to get prompts from RStudio about mirror issues:

img_2057

With this being said, it looks like some request managed to get through at some point because a prompt is being issued that packages are out-of-date?

img_9215

@jmcphers
Copy link
Member

jmcphers commented Dec 6, 2019

So, it seems like the available.packages() code bugs out on first run. The subsequent run in the same session returns an error as expected.

This is somewhat expected because of the way available.packages() works (it caches its results since it's such an expensive call). In the years since this issue was opened we've implemented caching on a lot of the parts of the IDE that handle this list, so hopefully most spots are better, but ultimately if your environment causes available.packages() to hang there's probably going to be a hang in spots in RStudio too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants