# Repo2docker rstudio

**URL:** <https://discourse.jupyter.org/t/repo2docker-rstudio/4004>\
**Category:** Binder\
**Created:** [April 15, 2020, 10:15pm UTC](https://discourse.jupyter.org/t/repo2docker-rstudio/4004 "2020-04-15T22:15:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameshowison](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jameshowison/32/1897_2.png) [@jameshowison](https://discourse.jupyter.org/u/jameshowison)\
**Post date:** [April 15, 2020, 10:15pm UTC](https://discourse.jupyter.org/t/repo2docker-rstudio/4004/1 "2020-04-15T22:15:04Z")

</div>

I’m seeing a successful build and the jupyter notebook browser coming up. Choosing “Rstudio” sends me to the rstudio URL. But then I see a spinning wheel for a while then an error dialog box says “Rstudio Initialization Error: Unable to connect to service”. Intriguingly the R studio logo comes up in the URL bar, but clicking “Ok” just leaves a grey screen.

This happens on each repo I’ve tried, here’s a minimal test repo that shows this behavior for me (Mac OS 10.3, python3 via homebrew, repo2docker installed from github archive.zip (`repo2docker --version` shows `0+unknown`)

> **[howisonlab/test\_repo\_r](https://github.com/howisonlab/test_repo_r)**
>
> Contribute to howisonlab/test\_repo\_r development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![betatim](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/betatim/32/10_2.png) [@betatim](https://discourse.jupyter.org/u/betatim)\
**Post date:** [April 16, 2020, 5:13am UTC](https://discourse.jupyter.org/t/repo2docker-rstudio/4004/2 "2020-04-16T05:13:27Z")

</div>

Are there any errors on the console? In particular can you retry it with the `--user-id 1000` flag? I think a problem is that the user ID is too low/too high for R Studio to start. Though I thought we had fixed/disabled that check :-/

Are you on linux, osx or windows?

We need to fix the fact that `repo2docker --version` shows a unhelpful version when installed from an archive. Unfortunately it is “a bit tricky”, see [this issue](https://github.com/jupyter/repo2docker/issues/841).

* * *

On a related note: we added the ability to use conda to install R packages a while back. This means installs are faster because the packages are binaries vs the `install.R` route where we have to compile everything from scratch. We haven’t “promoted” this way a lot but if you have a moment to experiment with/look at it [https://github.com/betatim/r-conda](https://github.com/betatim/r-conda) we’d be interested in what you think.

---

<div class="post-metadata">

**Author:** ![jameshowison](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jameshowison/32/1897_2.png) [@jameshowison](https://discourse.jupyter.org/u/jameshowison)\
**Post date:** [April 16, 2020, 1:19pm UTC](https://discourse.jupyter.org/t/repo2docker-rstudio/4004/3 "2020-04-16T13:19:23Z")

</div>

Great. First the info I forgot: Mac OS 10.3.

```auto
$uname -v

Darwin Kernel Version 17.7.0: Fri Oct 4 23:08:59 PDT 2019; root:xnu-4570.71.57~1/RELEASE_X86_64

```

There were no console messages, other than the 302 (which i think is normal).

```auto

302 GET /?token=5d0aa175b9e1f5411e589790e5710543634fcb697fc4ed03 (172.17.0.1) 1.09ms

```

Yes, adding the --user-id worked, Rstudio came up and ran fine.

```auto

repo2docker --user-id 1000 .

```

Yes, binary R packages probably a good thing, one can always fall back to source builds.

–J

---

<div class="post-metadata">

**Author:** ![betatim](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/betatim/32/10_2.png) [@betatim](https://discourse.jupyter.org/u/betatim)\
**Post date:** [April 16, 2020, 9:16pm UTC](https://discourse.jupyter.org/t/repo2docker-rstudio/4004/4 "2020-04-16T21:16:12Z")

</div>

Glad that fixed it 🙂

In case you or people from the future are wondering why we don’t set the UID to 1000 by default. `repo2docker` offers the option to mount a local directory into your container (the `--editable` flag). For this it is useful that the user inside the container and on your laptop have the same user ID. This means by default we use your local user’s ID.

---

<div class="post-metadata">

**Author:** ![kubakrukar](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/kubakrukar/32/6832_2.png) [@kubakrukar](https://discourse.jupyter.org/u/kubakrukar)\
**Post date:** [March 30, 2022, 10:49am UTC](https://discourse.jupyter.org/t/repo2docker-rstudio/4004/5 "2022-03-30T10:49:25Z")

</div>

I’m having the same issue under MacOS 12.2.1 and adding the --user-id 1000 flag does not help. Does anyone have other suggestions?
