rstudio / shinytest

Automated testing for shiny apps
https://rstudio.github.io/shinytest/
Other
225 stars 55 forks source link

Strange httr_get(url) error in shinytest 1.5.0 #387

Open PhilippPro opened 3 years ago

PhilippPro commented 3 years ago

shinytest was running without problems with version 1.4.0, now in 1.5.0 I get following message (on a R/RStudio on a server). What is the reason for this? image

sessionInfo() Output:

image

PhilippPro commented 3 years ago

We solved the problem. From our office server the URL that are tried to connect to are not accessible because of the Proxy. We solved the problem by setting the checkonline argument to FALSE in pingr::is_up(...) in the function httr_get:

  if (!pingr::is_up(pieces$hostname, pieces$port, check_online = FALSE)) {
    stop("Shiny app is no longer running")
  }

It would be nice if you could add a generic option for setting this checkonline = FALSE, so that we do not have to build our own shinytest package.

Best regards, Philipp

rbcavanaugh commented 2 years ago

+1. I reproduced this error when I was working with my in laws spotty WiFi connection. The error disappeared as soon as I had a reliable internet connection again (hotspot). Based on this, it seems as though shinytest requires an internet connection currently to run, even if the app is being run and tested locally. An option to set check online to false would be greatly appreciated (Or at least documentation of the limitation).