You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error in sd_getAllValues(self, private, input, output, export) #192
Listening on http://127.0.0.1:4701
Saved test code to /Users/shalutiwari/shiny-examples-branch/shiny-examples/107-events/tests/mytest.R
Running mytest.R setInputs(app$setInputs(end = "click")): Server did not update any output values within 3 seconds. If this is expected, use `wait_=FALSE, values_=FALSE`, or increase the value of timeout_.
Error in sd_getAllValues(self, private, input, output, export) :
Unable to fetch all values from server. Is target app running with options(shiny.testmode=TRUE?)
I can confirm, this error happens when the shiny app crashes in the background process. So debugging the shiny app fixed the "bug" in shinytest for me.
I think I found the culprit for my app. Here is how I debugged it:
library(shinytest)
app<-ShinyDriver$new("inst/app", loadTimeout=20000)
app$snapshotInit("mytest")
# this initially didn't workapp$snapshot()
# get all inputs, outputs, and exported valuesvals<-app$listWidgets()
# for me, the culprit was an output# loop through all output values, print each, and try selective snapshotfor(valinvals$output) {
print(val)
app$snapshot(items=list(output=val))
}
...
[1] "datasets-cells_plotly-plotly"Error:lexicalerror:invalidcharinjsontext.ERROR:lexicalerror:invalidc
(righthere) ------^
After identifying the culprit output, I modified its output value as described here.
Not sure why this particular plotly output caused issues as it renders fine (I have a few others in the app as well that cause no issues).
Activity
ariayi commentedon Apr 16, 2019
LukasK13 commentedon Oct 22, 2019
I can confirm, this error happens when the shiny app crashes in the background process. So debugging the shiny app fixed the "bug" in shinytest for me.
alexvpickering commentedon Oct 22, 2019
alexvpickering commentedon Nov 15, 2019
I think I found the culprit for my app. Here is how I debugged it:
After identifying the culprit output, I modified its output value as described here.
Not sure why this particular plotly output caused issues as it renders fine (I have a few others in the app as well that cause no issues).
rfaelens commentedon Jan 17, 2020
The issue arises from using
shiny::reqor any other silent error function in combination withplotly. See plotly/plotly.R#1685 for more information.hadley commentedon Aug 12, 2020
Reprex:
I think two fixes are needed in
sd_getAllValues():It should use a more robust technique to confirm that
httr::GET()has succeeded, and to bubble the error up to the userThe hint is wrong: in most cases it's not that the app hasn't been started correctly, but has stopped or is otherwise busy.
Also related to #195
hadley commentedon Aug 14, 2020
Minimal reprex:
Consistently handle HTTP failures
Consistently handle HTTP failures (#346)