Widget failing in Shiny app


I would like to ask for help with an error I get in a Shiny app when (and only when) it is run through the Binder RStudio. The error affects a drop-down menu titled ‘Dominant modalities’, in which the three color-coded categories are replaced by quote marks. This drop-down is based on the R package shinyWidgets, which I loaded in the app script as well as in the install.R doc. Also, I’m using the latest version of R (having set it in runtime.txt). RStudio is slightly older, though, but I don’t think that could cause this error (could it?).

Below is a screenshot of what the drop-down list should look like, as it does when the app is run from a local RStudio:


If you have a moment to look at this, would you please follow these steps:

  1. Visit the repo on the Binder RStudio;

  2. From the Session tab on the top, change working directory to the ‘Shiny-app’ folder;

  3. If you wish, look at the code for the Shiny app by opening the ‘Shiny-app’ folder in the ‘Files’ box on the right, and selecting the script ‘Dutch-modality-exclusivity-norms.rmd’;

  4. Run app by calling rmarkdown::run('Dutch-modality-exclusivity-norms.rmd') on the RStudio console.

Thank you very much indeed

This is what it looks like on Binder RStudio:


I also removed one step :smiley:

  1. Visit the repo on the Binder RStudio;
    • If you wish, look at the code for the Shiny app by opening the ‘Shiny-app’ folder in the ‘Files’ box on the right, and selecting the script ‘Dutch-modality-exclusivity-norms.rmd’;
  2. Run app by calling rmarkdown::run('./Shiny-app/Dutch-modality-exclusivity-norms.rmd') on the RStudio console.

Thanks a lot

I don’t know :frowning: Just launched the app in the hopes it was a problem with loading some CSS or JS files but as far as I can tell that isn’t a problem.

Not knowing anything about R or Shiny myself I’d go with your guess of “old RStudio version”. I think we need someone who understands R/Shiny a bit better than I do (I just copy and pasted your snippet and a pop-up appeared “as if by magic”) to help here.

1 Like

Thanks a lot!

Besides the RStudio version, the issue might be related to the loading of shinyWidgets, or, perhaps more likely, to a very specific CSS or JS. #justguessingmore

One thing to try to exclude the “old RStudio version” hypothesis is to update the version used here:

which would be a welcome contribution to repo2docker independent of this problem.

1 Like

Thanks! I’ve tried by replacing the version numbers in this pull request.

1 Like


While updating my app just now in my local RStudio, I found the same error with the widget. I can’t seem to trace any difference of versions with regard to the last time I checked. This error had never happened to me on local RStudio before; only on Binder RStudio. It may have been some update of the shinyWidgets package.

I’ve managed to solve the error, on both local and Binder RStudio, by adjusting the HTML code of the labels that are displayed on the widget.

On this basis, I don’t think the error was due to Binder.