# Debugging your Binder

**URL:** <https://discourse.jupyter.org/t/debugging-your-binder/33>\
**Category:** repo help\
**Created:** [November 2, 2018, 4:27pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33 "2018-11-02T16:27:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![choldgraf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/choldgraf/32/1264_2.png) [@choldgraf](https://discourse.jupyter.org/u/choldgraf)\
**Post date:** [November 2, 2018, 4:27pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/1 "2018-11-02T16:27:27Z")

</div>

Are you having problems getting your Binder repository to work? Feel free to ask questions here!

**Note:** please don’t post in this thread any more. Instead use the [http://discourse.jupyter.org/c/questions](http://discourse.jupyter.org/c/questions) category for your questions. Thank you 🙂

---

<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:** [November 2, 2018, 5:10pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/2 "2018-11-02T17:10:14Z")

</div>

I think of “a Binder” as a repository on GitHub or GitLab that works on a site like [mybinder.org](http://mybinder.org). Is this also what you have in mind?

---

<div class="post-metadata">

**Author:** ![choldgraf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/choldgraf/32/1264_2.png) [@choldgraf](https://discourse.jupyter.org/u/choldgraf)\
**Post date:** [November 2, 2018, 5:12pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/3 "2018-11-02T17:12:35Z")

</div>

Yep - I think of “a Binder” as “a repository that’s meant to run on a BinderHub”. (edited the top comment to be a bit more clear)

---

<div class="post-metadata">

**Author:** ![diyadas](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@diyadas](https://discourse.jupyter.org/u/diyadas)\
**Post date:** [January 28, 2019, 7:01pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/4 "2019-01-28T19:01:20Z")

</div>

I’m trying to launch app.R on my repo’s shiny branch with Binder: [https://github.com/diyadas/vizresume/tree/shiny](https://github.com/diyadas/vizresume/tree/shiny)

And for some reason: [https://mybinder.org/v2/gh/diyadas/vizresume/shiny?urlpath=shiny](https://mybinder.org/v2/gh/diyadas/vizresume/shiny?urlpath=shiny)  
is failing to build.

I’m basing the URL on the binder example, though I’m not sure it’s correct.

At this point would you recommend trying a Dockerfile instead?

- I ran a dependency check on the 10 packages I’m loading using miniCRAN’s pkgDep and apparently there are 178 depends and suggests.
- Is there a way to force it only to install the 72 depends? Or is it doing that by default?
- It’s hard for me to tell because the buffer on the log (that I can see) isn’t very long. Is there a way to see the full log somewhere?

Thanks very much!

---

<div class="post-metadata">

**Author:** ![choldgraf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/choldgraf/32/1264_2.png) [@choldgraf](https://discourse.jupyter.org/u/choldgraf)\
**Post date:** [January 29, 2019, 3:02am UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/5 "2019-01-29T03:02:47Z")

</div>

Ahh so the package / dependency management thing is still really tricky IMO. I’m not sure how the R packaging world works to fix that problem :-/ could you past the full error message though?

One idea: some folks in the R community have been playing around with ways to make it easier to create Binder-ready repositories using the Rocker stack of Docker images. I believe that @karthik even threw together a little helper R library to do this:

> <https://github.com/karthik/rstudio2019/blob/6c2ff0e6400e7c3af52098bf9b09812823766ced/binder-notes.md>

Wanna follow those instructions and see if that can solve your problem?

---

<div class="post-metadata">

**Author:** ![diyadas](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@diyadas](https://discourse.jupyter.org/u/diyadas)\
**Post date:** [February 6, 2019, 6:29am UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/6 "2019-02-06T06:29:04Z")

</div>

Karthik helped me get up and running with a Dockerfile, thanks for the suggestion.

I was wondering if there’s a way to go directly to a Shiny app if I’m going the Docker route, or if my only option is [https://mybinder.org/v2/gh/diyadas/vizresume/shiny?urlpath=rstudio](https://mybinder.org/v2/gh/diyadas/vizresume/shiny?urlpath=rstudio) and then “Run app.” Extrapolating from the example repo, I think that link would be [https://mybinder.org/v2/gh/diyadas/vizresume/shiny?urlpath=shiny](https://mybinder.org/v2/gh/diyadas/vizresume/shiny?urlpath=shiny) but now instead of “failed to build” I get a 404 page.

Thanks.

---

<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:** [February 6, 2019, 11:54am UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/7 "2019-02-06T11:54:56Z")

</div>

When you use the standard R setup from repo2docker you can have a link like [http://mybinder.org/v2/gh/binder-examples/r/master?urlpath=shiny/bus-dashboard/](http://mybinder.org/v2/gh/binder-examples/r/master?urlpath=shiny/bus-dashboard/) that takes you directly to the Shiny app.

---

<div class="post-metadata">

**Author:** ![marija](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@marija](https://discourse.jupyter.org/u/marija)\
**Post date:** [April 9, 2019, 6:10am UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/8 "2019-04-09T06:10:50Z")

</div>

Hi, I’m having problems with getting my shiny app to run with the binder.  
I was using an example from binder-examples/r github, the building part seems to work, however, I’m getting a Not Found page when I want to run the app [https://mybinder.org/v2/gh/MarijaStanojcic/RDatasets/master?urlpath=shiny/APP/](https://mybinder.org/v2/gh/MarijaStanojcic/RDatasets/master?urlpath=shiny/APP/)

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/1X/0fd1d557e6cb57d9b6debb81bd68c8d0c72f3dcc.png)

Any advice?  
Thanks

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 9, 2019, 3:52pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/9 "2019-04-09T15:52:29Z")

</div>

My guess would be the way to trigger a call `runApp()` isn’t compatible with the App directory approach?  
The example has the two file method described [here](https://shiny.rstudio.com/articles/two-file.html) and [here](https://shiny.rstudio.com/articles/app-formats.html). Maybe someone else can comment if it only works with the Two-file method?

---

<div class="post-metadata">

**Author:** ![marija](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@marija](https://discourse.jupyter.org/u/marija)\
**Post date:** [April 15, 2019, 8:16am UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/10 "2019-04-15T08:16:53Z")

</div>

Thank you for the response. I tried doing this, but it is still not working. I still get Not Found page.

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 15, 2019, 3:08pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/11 "2019-04-15T15:08:31Z")

</div>

Hi Marja,  
I see that you tried to convert it to the two files system. And I see the still 503 error too.  
I was going to suggest then you try forking the example and converting it to use your data so you can see when the Shiny dashabord breaks. (Or if it doesn’t break use the code.) However…  
I see your fork of the example and the example itself failing to work right now. Albeit this is different than the error you are having. The shiny dashboard opens but it is darkened out and unable to be used.  
So you could work on getting your fork to at least work with your code and data up to that point. Since the example has the problem and it hasn’t been changed in 20 days, I think it is something in the infrastructure that is out of the typical users hands that is causing the problem. Or it is my browser. Do you see the example failing to work too?

---

<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 15, 2019, 7:56pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/12 "2019-04-15T19:56:06Z")

</div>

> [@fomightez](#):
>
> the example itself failing to work right now.

For me [the example](https://mybinder.org/v2/gh/binder-examples/r/master?urlpath=shiny/bus-dashboard/) also does exactly what @fomightez describes. From looking at the network inspector in my browser I think it is a problem with proxying the websocket.

---

<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 15, 2019, 9:03pm UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/13 "2019-04-15T21:03:23Z")

</div>

I made a Pull Request to repo2docker which I think will fix this: [https://github.com/jupyter/repo2docker/pull/646](https://github.com/jupyter/repo2docker/pull/646) if any of you have a moment to test drive this locally that would be great.

I think you’d need to run `repo2docker --uid 1000 --user jovyan https://github.com/binder-examples/r` to do so. It will take quite a while as it has to compile all of the tidyverse :-/

---

<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, 2019, 6:36am UTC](https://discourse.jupyter.org/t/debugging-your-binder/33/14 "2019-04-16T06:36:36Z")

</div>

The change has been deployed. After triggering a rebuild of the repository by hand [http://mybinder.org/v2/gh/binder-examples/r/master?urlpath=shiny/bus-dashboard/](http://mybinder.org/v2/gh/binder-examples/r/master?urlpath=shiny/bus-dashboard/) now works again for me.
