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

How to know what went wrong when you see Robj construction for this JS object is not yet supported #54

Open
durraniu opened this issue Feb 16, 2024 · 10 comments

Comments

@durraniu
Copy link

For some apps I see this after doing httpuv::runStaticServer("site"):

image

How do I know what went wrong?

@georgestagg
Copy link
Collaborator

This is a general error from webR that could be caused by a number of different issues. If you are able to share a minimal reproducible version of your Shiny app code that leads to this error, I might be able to take a closer look and see what exactly is causing the problem.

Improving this error message to instead show details about the R code leading to the problem is something I'll be working on for the next release of webR.

@seanbirchall
Copy link

@durraniu do you have a plots directory in your app? I find when I use base or ggplot a plots dir is created and anytime I re-export my app without deleting it I always get this. Though as George said it is a general error... but maybe this is it? I imagine this will be a common one for a bit.

@durraniu
Copy link
Author

@seanbirchall I don't have any plots in the app. But I do have a html canvas and a few Javascript functions. May be they are not liked by webR. @georgestagg I'll try creating a reprex and update later.

@Hertzspr
Copy link

Hertzspr commented Mar 5, 2024

Greetings, I experienced this problem as well.

In my case, my code is structured into:

  • ui.R,
  • server.R,
  • global.R, and
  • uiHelpers.R.

In my global.R it reads dataframes from 2 RDS files, and several png files for leaflet map icons.
The app itself is a simple dashboard with bslib, that has two navpages, and two sidebars in which one is conditional.
The library I used are :

  • library(shiny)
  • library(bslib)
  • library(leaflet)
  • library(scales)
  • library(ggiraph)
  • library(htmltools)
  • library(glue)
  • library(shinyjs)
  • library(tidyverse)

@JoaoGarcezAurelio
Copy link

JoaoGarcezAurelio commented May 20, 2024

Hi everyone, just wanted to share that I have come across the same problem. If I understand correctly, it seems it may be related to the curl dependency being unavailable for webr across multiple packages (e.g., plotly, DT, tidyverse). Do you happen to know if there is a way around this? Thank you for working on these issues.

@jfunction
Copy link

Also hit this issue - my first time trying shinylive. In my case it occurs whenever I have a binary file in my project. Somehow those files just can't get unpacked from app.json with my setup (though this did work when I used the website).
I actually wrote a blog post about my experience with shinylive and mentioned this alongside some other issues. Thanks for the work on shinylive, I'm keen to see where it goes!

@gadenbuie
Copy link
Contributor

@jfunction nice blog post! Would you mind opening a new issue with a small reprex of the binary-file problem you encountered? It'd be helpful to also include the output of devtools::session_info() to we can reproduce your environment.

@parmsam-pfizer
Copy link

parmsam-pfizer commented Jul 8, 2024

Had a similar experience today when I was trying to publish @ryjohnson09's Shiny app which loads an XPT file using Shinylive: https://github.com/ryjohnson09/adam_analysis/tree/master/adsl_shiny

The presence of that binary file (XPT) triggered that error for me. Seems to run without error in Shinylive.io editor when I recreated it but not via a shinylive R package export.

@gadenbuie
Copy link
Contributor

The presence of that binary file (XPT) triggered that error for me.

The binary file issues should be fixed when r-shinylive updates to use the latest shinylive web assets by default. We're planning a CRAN release soon, in the mean time you can try the instructions here to use the dev version of shinylive with more recent assets.

As we're planning a release shortly, I'd love to hear if that works for you. If it doesn't, it'd be extra helpful if you could reply in the linked issue (#106) with a reprex or details so I can follow up pre-release.

@seanbirchall
Copy link

updating assets fixed a lot of issues I've been experiencing #88

dumping my browser cache, cleaning up unneeded folders / files, checking https://repo.r-wasm.org/ to make sure a package should work... though I will say some packages that shouldn't work do work (listviewer), and sticking to basic file types (.R, .csv, .js) to be exported with app (though looks like soon I can include just about any file type). Any file type I'm unsure of I host it on a cdn and fetch it remotely using script / link / or download.file.

The above has made this error not show up for me in weeks, where previously it was almost daily while developing.

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

8 participants