posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
151 stars 16 forks source link

Latest version of `{bslib}` with `{shinylive}` crashes due to trying to re-create the `/tmp` directory #56

Closed coatless closed 6 months ago

coatless commented 6 months ago

There seems to be an issue with the latest version of {bslib} package. Calling the page_sidebar() layout option is causing the shiny app to crash due to an attempt to re-create the /tmp directory

MWE: Shiny demo app

shinylive-r-crash-on-bslib-element

stacktrace with error text - [EEXIST] Failed to make directory '/tmp': file already exists ```r Attaching package: ‘bslib’ The following object is masked from ‘package:utils’: page Warning: Error in : [EEXIST] Failed to make directory '/tmp': file already exists 61: 60: 59: fs::dir_create 58: 57: mapply 56: write_file_attachments 55: bslib::bs_theme_dependencies 54: x 53: as.tags.shiny.tag.function 46: func 45: FUN 44: lapply 43: FUN 42: lapply 41: FUN 40: lapply 39: FUN 38: lapply 37: rewriteTags 36: tagify 35: renderTags 34: renderDocument 33: renderPage 32: appObj()$httpHandler 31: handler 30: handler 29: handler 28: handlers$invoke 12: handler 11: app$call 8: eval [#4] 7: eval 6: efun 1: ```
scrapeable commented 6 months ago

This bug has been throwing me for a loop the past couple days, thanks for figuring out the source @coatless ! I'm using bslib::page and getting the same error.

gadenbuie commented 6 months ago

Thanks for reporting @coatless! @scrapeable Do you remember when you first noticed the issue?

scrapeable commented 6 months ago

@gadenbuie I believe it started happening 6 days ago, my shinylive app which had previously been working stopped working Monday.

georgestagg commented 6 months ago

My apologies, an update to webR's binary R package repo caused this. I've just now rebuilt the R packages required for running Shinylive for R and have invalidated the AWS cache.

Things should now work again after clearing your browser cache and refreshing the page, but please let me know if you still encounter issues.

In the future, Shinylive for R will use pinned Wasm binary package assets rather than the general webR package repo, which should avoid these kinds of issues.

scrapeable commented 6 months ago

@georgestagg Thank you! Everything on my end is back to normal.

coatless commented 6 months ago

Thanks @georgestagg!