Skip to content

Unable to reproduce on MacOS: Mounting filesystem images #508

Open
@dusadrian

Description

@dusadrian

Hi, I followed the instructions from the r-wasm 0.2.0 website.
I used a Docker image to build the Wasm R packages, closely following the instructions.

I managed to build several packages and used the add_pkg() command, and finally wanted to test (as per the above page) using a static server.

I used exactly the command suggested:

> httpuv::runStaticServer(
+   dir = ".",
+   port = 9090,
+   browse = FALSE,
+   headers = list("Access-Control-Allow-Origin" =  "*")
+ )
Serving: '.'
View at: http://127.0.0.1:9090
Press Esc or Ctrl + C to stop the server

and upon opening a webR session in the browser, I was unable to mount:

> webr::mount("/my-library", "http://127.0.0.1:9090/vfs/library.data")
Error in webr::mount("/my-library", "http://127.0.0.1:9090/vfs/library.data") : 
  Can't download Emscripten filesystem image metadata.

Then I started the static server in a different R session outside Docker, changing the "dir" argument to the output directory from Docker. Still no luck, neither mounting that image nor installing a package:

> webr::install("cli", repos = "http://127.0.0.1:9090/repo")
Warning: unable to access index for repository http://127.0.0.1:9090/repo/bin/emscripten/contrib/4.4:
  download from 'http://127.0.0.1:9090/repo/bin/emscripten/contrib/4.4/PACKAGES' failed
Warning message:
In webr::install("cli", repos = "http://127.0.0.1:9090/repo") :
  Requested package cli not found in webR binary repo.

This should work, but I just cannot get it done. I am on MacOS if that makes a difference, although I imagine it shouldn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions