Skip to content

Unable to re-render shiny interactive document  #4105

@blenback

Description

@blenback

Bug description

Hello,
I am starting a simple shiny interactive document with a simple drop-down menu selection:

---
title: "LULCC_CH_model"
format: html
server: shiny
execute:
  echo: false
---

````{r setup, include=FALSE}
# Install packages
packs <- c("data.table", "shiny")
new.packs <- packs[!(packs %in% installed.packages()[, "Package"])]
if (length(new.packs)) install.packages(new.packs)

# Load required packages
invisible(lapply(packs, require, character.only = TRUE))

# Source custom functions
invisible(sapply(list.files("Scripts/Functions", pattern = ".R", full.names = TRUE, recursive = TRUE), source))
````

````{r}
selectInput("OS", "Operating system:",
                c("Windows", "GNU/Linux"))
textOutput("result")
````

````{r}
#| context: server
   output$result <- renderText({
     paste("You chose:", input$OS)
   })
````

````{ojs}
viewof flavor = Inputs.checkbox(["Salty", "Spicy", "Sour", "Umami"], {label: "Flavor"})
````

The 1st time I hit 'run document' the file renders with no problem when using either the viewer pane or window preview settings. However if I then make changes, save and hit 'run document' again. The preview disappears and is not replaced, the render tab displays the processing wheel to indicate something is happening but it just hangs and never updates. I get no error messages to the console and the last message printed to the render tab is: "Listening on http://127.0.0.1:7876"

I ran quarto check in the terminal and everything came back ok also I do not have such problems re-rendering non-interactive .qmd documents. Nor do I have a problem when re-running a .qmd with just interactive {ojs} chunks the problem seems to be limited to the shiny features.

I have updated the shiny package and am runnnig the latest version of Quarto, Rstudio (2022.12.0 Build 353) and R (4.2.2 (2022-10-31 ucrt) on Windows 10.

Any help would be appreciated.

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrstudioshinyRelated to shiny integration for interactive documentupstreamBug is in upstream library

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions