Closed fmmattioni closed 4 years ago
Thanks @fmmattioni!
As said on Twitter, that's because run_app() returns the App objet but doesn't actually run it.
The print S3 for shiny app object is responsible for launching the app.
Reminder to myself: talk about this profvis()
/ {golem}
interaction somewhere.
Thanks! Another potential work-around that I have found is using the profvis_ui() and profvis_server() module. There is an example of this at the bottom of this page: https://rdrr.io/github/rstudio/profvis/man/profvis_ui.html#heading-4
Given #496, it's now possible to do profvis::profvis(run_app())
by default, no need for explicitly printing anymore :)
Does anyone know if something changed with profvis
?
Doing profvis::profvis(run_app())
, I get the following:
Error in parse_rprof(prof_output, expr_source) :
No parsing data available. Maybe your function was too fast?
@fmmattioni the print arg turned to TRUE by default used to make shiny apps io and connect crash, so now you need to explicitly set the print argument to TRUE if you need to :)
Hey, @ColinFay! Do you mean profvis(run_app(print = TRUE))
? If so, I get the same error as above ☹️
Hey, @ColinFay same error occurs for me.
In case it's helpful the solution to this problem is documented here profvis(print(run_app()))
I have asked a question to @ColinFay on twitter regarding how I could run profvis in a golem app (twitter discussion may be accessed here).
The problem is that if we try to wrap
profvis::profvis()
intogolemapp::run_app()
(let's imagine here thegolemapp
is the name of our app) as in:We get the following error:
Error in parse_rprof(prof_output, expr_source) : No parsing data available. Maybe your function was too fast?
According to @ColinFay, the current workaround is to wrap
golemapp::run_app()
intoprint()
and then wrap in inprofvis::profvis()
as in:Thank you all!