Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten filesystem image error #88

Open
andrewpbray opened this issue Feb 4, 2025 · 5 comments
Open

Emscripten filesystem image error #88

andrewpbray opened this issue Feb 4, 2025 · 5 comments

Comments

@andrewpbray
Copy link

Hello!

I'm running into the following error message on this page.

bf: Error in `mount(mountpoint, data_url)`: Can't download Emscripten filesystem image metadata.

This was working several weeks ago, I believe. If it's helpful, the qmd file that creates that HTML file has this metadata:

---
title: "A Grammar of Graphics"
subtitle: "A unified framework for constructing statistical graphics."
format: live-html
engine: knitr
webr:
  packages:
    - dplyr
    - palmerpenguins
    - ggplot2
    - ggthemes
    - openintro
---

This appears to be a similar issue to #70 .

@georgestagg
Copy link
Member

georgestagg commented Feb 4, 2025

Hi Andrew,

Thank you for reporting this, and apologies for the inconvenience. Your document was caught up in an issue as we have recently been updating the WebAssembly R packages in the default webR repository to match the latest versions on CRAN.

The upgrade is now complete, and your document should now work again as normal after a hard refresh.

@andrewpbray
Copy link
Author

Hi George,

Hmm, even after a hard-refresh, the error message persists on my browser (Chrome). Are you able to get that page loading ok? I notice it's also stalled at "Downloading: evaluate" which I haven't seen before.

This gets at a more fundamental issue. This page is part of a course that otherwise renders 100% in a docker container. That's essential so that we continue using the curriculum without fear of something breaking. Is there a way to be sure a quarto-live document is fully containerized? Would compiling the R packages using WASM ourselves and putting them in the image solve it?

@georgestagg
Copy link
Member

georgestagg commented Feb 4, 2025

Yes, I can now load and use the page in Safari and Chrome. Example:

Image

Does it work in Private Browsing for you? That will ensure you're loading from an empty cache.


This gets at a more fundamental issue. [...] Is there a way to be sure a quarto-live document is fully containerized?

When using Quarto Live, non-base R packages are downloaded on the client at runtime from the default webR package repository ({evaluate} is one such package, it's loaded first because it's used internally by Quarto Live). The repository does not change often, but temporary issues can occur when we update the packages to match the latest version on CRAN.

There's a little more discussion about this in #87. I think the right thing is to provide some way to "freeze" and bundle Wasm R packages alongside a deployed Quarto Live document, similar to the scheme now possible with Shinylive. That's not possible at the moment, but it is something I'd be interested in working towards in the future, with the particular aim of reproducibility.

Possible downsides would be that the size of a deployed Quarto Live document would be much larger, not ideal for deploying to size-restricted locations -- and users will not get as much benefit from caching of R packages from r-wasm.org, so I think we'll want this to be opt-in.

Happy to discuss further either here or #87 once we get your content up and running for you again.

@andrewpbray
Copy link
Author

Yes, the private browser works! Not sure why the main Chrome window keeps pulling from the cache, but it'll keep hunting around for that.

That's helpful background on the reproducibility discussion. I'll keep turning it over in my head too, think if there's a way to make the curriculum robust in other ways.

Thanks, as always, for your work on this stuff!

@georgestagg
Copy link
Member

georgestagg commented Feb 4, 2025

You could also try forcing a cache empty and hard reload by opening Dev Tools (F12), then right clicking the refresh button:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants