shinylive in Quarto document with reactive data source

,

I want to load a data file for a shinylive-r without user input. My demo code works fine in a Shiny app, but not in shinylive-r.

Here is my Shiny app code:

library(shiny)

ui <- fluidPage(
    tableOutput("data"),
)

server <- function(input, output, session) {

    fileData <- reactiveFileReader(
        intervalMillis = 1000, NULL,
        filePath = 'https://github.com/petzi53/learning-shiny/raw/refs/heads/master/data/products.tsv',
        readFunc = vroom::vroom, show_col_types = FALSE
       )

    output$data <- renderTable({
        head(fileData())
    })
}

shinyApp(ui, server)
#> 
#> Listening on http://127.0.0.1:6881

Created on 2025-07-04 with reprex v2.1.1

I used a file URL because I believe that it is not possible to reference local files with shinylive.

And here is my shinylive-r code chunk:

---
title: "Test shinylive reactiveFileReader "
format: html
filters: 
    - shinylive
---


```{shinylive-r}
#| standalone: true
#| viewerHeight: 550
#| components: [editor, viewer]


## file apps.R
{{< include test-shinylive-reactive-file/app.R >}}

```

The result is a blank screen with the error message:

Error: cannot open the connection to 'https://github.com/petzi53/learning-shiny/raw/refs/heads/master/data/products.tsv'. See the Javascript console for further information

Any idea what is wrong? Help is very much appreciated.

Firstly, this isn't specific to Quarto as it doesn't run in the shinylive editor either. I suspect it's related to how {vroom} opens URLs - it has a dependency on {curl} which isn't available in webR and it might well rely on that to download files via a URL. I can open a file fine using the same method but read.table() instead of vroom::vroom() (which I think uses download.file() instead of {curl}), so if you can convert your data to a file format that read.table() can handle, it should work. I'm a bit confused why you need reactiveFileReader() in the first place though - it's normally used when a file is being frequently updated.