posit-dev / r-shinylive

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

How to debug? Both from a user and from a package author perspective #86

Open daattali opened 1 month ago

daattali commented 1 month ago

I was experimenting with {shinylive} today, and and it was reminiscent of using shiny in 2014 when fatal errors gave almost no information :)

  1. From a user perspective: It took me half an hour to troubleshoot a very simple app and realize that what broke it was the fact that I had a tags$img() in it (see https://github.com/posit-dev/r-shinylive/issues/85). The logs gave 0 indication of what the issue is. Is there any way to troubleshoot shinylive?

  2. As a package author: some of my shiny packages seem to work out of the box, but some don't, and even though I've basically tried nothing, I'm already out of ideas! For example, {shinyjs} and {timevis} seem to work, but {shinyalert} silently fails, and {shinyscreenshot} loudly fails and I'm helpless in trying to find the issue. Are there any tips for package authors to help make their packages work?

gadenbuie commented 3 weeks ago
  1. Are there any tips for package authors to help make their packages work?

Unfortunately, the tech stack is full of redirections and subtle interactions. That definitely poses challenges when trying to debug issues. On the other hand, we're running R in the browser! How cool is that!?

The best I can offer in terms of overall tips for package authors is to gently encourage your users to provide reproducible examples. If you can reproduce the issue on https://shinylive.io/r/ that's even better. Feel free to cross-post issues here and we'll do our best to investigate and respond.