# Trouble running Shiny application from MyBinder

**URL:** <https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138>\
**Category:** repo help\
**Created:** [February 27, 2021, 9:21pm UTC](https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138 "2021-02-27T21:21:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![moldach](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/moldach/32/3780_2.png) [@moldach](https://discourse.jupyter.org/u/moldach)\
**Post date:** [February 27, 2021, 9:21pm UTC](https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138/1 "2021-02-27T21:21:02Z")

</div>

Following instructions for [using binder with R](https://github.com/binder-examples/r)

I’ve created a repository with a simple Shiny application]([GitHub - moldach/scss-shiny: An Binder example of integrating SCSS (and HTML) from CodePen into a Shiny Application](https://github.com/moldach/scss-shiny))

I enter the link on the binder website and it gives me the following link to share: `https://mybinder.org/v2/gh/moldach/scss-shiny/HEAD`

But adding the `?urlpath=rstudio` to the end doesn’t work

```auto
https://mybinder.org/v2/gh/moldach/scss-shiny/HEAD?urlpath=rstudio

```

---

<div class="post-metadata">

**Author:** ![sgibson91](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/sgibson91/32/487_2.png) [@sgibson91](https://discourse.jupyter.org/u/sgibson91)\
**Post date:** [February 28, 2021, 7:47am UTC](https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138/2 "2021-02-28T07:47:19Z")

</div>

Hi!

If you check out the different URLs in this example: [GitHub - binder-examples/r: Using R with Jupyter / RStudio on Binder](https://github.com/binder-examples/r) - I think your `urlpath` should be `shiny/<path to your app's dashboard>`, not `rstudio`.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![moldach](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/moldach/32/3780_2.png) [@moldach](https://discourse.jupyter.org/u/moldach)\
**Post date:** [March 9, 2021, 12:35am UTC](https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138/3 "2021-03-09T00:35:01Z")

</div>

Hi @sgibson91

```auto
https://mybinder.org/v2/gh/moldach/scss-shiny/HEAD?urlpath=shiny

```

Gives me an error.

Here’s the full information, I’d appreciate if you could provide the working `shiny` link for the following:

1. Github repo containing the Shiny application I want to run in Binder: `https://github.com/moldach/scss-shiny`

\_note: FWIW the Shiny app is the `app.R` file - it has not been **deployed** on a server - not sure if that matters?

1. Turn Git repo into Binder link:

```auto
Build and launch a repository
GitHub repository name or URL
Git ref (branch, tag, or commit)
Path to a notebook file (optional)
Copy the URL below and share your Binder with others:

https://mybinder.org/v2/gh/moldach/scss-shiny/HEAD

Copy to clipboard
Copy the text below, then paste into your README to show a binder badge:

```

1. append a bit of text to the URL of our Binder repository, which we can find out at [mybinder.org](https://mybinder.org/) when we enter the URL of our original repository from GitHub. For the Shiny app environment, we must add the following at the end of the URL: `?urlpath=shiny`.

\_note: in the example provided they also appended `?urlpath=shiny/bus-dashboard/` because the Shiny application lives with a subdirectory in the repo. Mine does not so I should not have to append anything after `?urlpath=shiny`.

---

<div class="post-metadata">

**Author:** ![sgibson91](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/sgibson91/32/487_2.png) [@sgibson91](https://discourse.jupyter.org/u/sgibson91)\
**Post date:** [March 9, 2021, 7:57am UTC](https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138/4 "2021-03-09T07:57:53Z")

</div>

Sorry, I don’t really know much about R or Shiny apps. But if you’re confident in your link, maybe there’s something up with the app? I don’t think it needs to be deployed anywhere for Binder to run it because it should install and run everything for you. Does it work locally, or using repo2docker? [https://repo2docker.readthedocs.io](https://repo2docker.readthedocs.io)

---

<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:** [March 9, 2021, 6:38pm UTC](https://discourse.jupyter.org/t/trouble-running-shiny-application-from-mybinder/8138/5 "2021-03-09T18:38:18Z")

</div>

> [@moldach](#):
>
> Following instructions for [using binder with R](https://github.com/binder-examples/r)

Despite saying that, I see numerous ways in which you didn’t follow the guide repo.

Once users are more familiar with how MyBinder works and the requirements for various abilities, they can start with a blank repository and convert it to be Binder-ready. As a Binder initiate, the way to go about using the example repositories is to use them, in your case it would be [the example R repo that had Jupyter + R, RStudio and RShiny](https://github.com/binder-examples/r), to make a new repo using the `Use this template` button, and then gradually convert it to their custom code and see when things break. For example, your repo doesn’t even launch RStudio properly right now. Indeed, when you click on `New` under the Jupyter Dashboard, you should see `R` as a kernel choice below `Python 3`. (Compare what happens when you [launch from the example](http://mybinder.org/v2/gh/binder-examples/r/master?filepath=index.ipynb) and then click on the Jupyter logo in the upper left to go to the Jupyter Dashboard. The `New` drop-down menu will be over on the left above the list of files.) You aren’t using the two file approach for your Shiny app, see [here](https://discourse.jupyter.org/t/help-spinning-up-a-shiny-app/2025/5) and the discussion linked from there. The list of detailed discrepancies goes on and contributes to the symptoms you are seeing.

`R` not being listed on the `New` drop-down menu in the Jupyter dashboard from lanches from your repo is **a big red-flag**. If R isn’t available, you cannot expect much else R-based to work, and so that is a good place to start.  
It would probably also help if you searched the terms `rstudio` and, separately `shiny`, on this forum and looked at what was discussed and examine repos linked.
