Open aml11 opened 7 years ago
I had a similar experience for 3xx, 4xx and DNS errors. Basically anytime the response code is non-200
I'm defending against it using this for now ...
var request = require('request');
request(targetURL, function (error, response, body) {
if (error || (response && response.statusCode!=200)) {
console.log("Could not resolve targetURL")
process.exit(-1)
}
});
I found a URL where chromeless just never comes back (an exception would have been nice)
You can even reproduce it with the [demo](https://chromeless.netlify.com/#src=const%20chromeless%20=%20new%20Chromeless(%7B%20remote:%20true%20%7D)%0A%0Aconst%20screenshot%20=%20await%20chromeless%0A%20%20.goto('https://www.google.com/gen_204')%0A%20%20.scrollTo(0,%202000)%0A%20%20.screenshot()%0A%0Aconsole.log(screenshot)%0A%0Aawait%20chromeless.end())
The url is https://www.google.com/gen_204
Using curl I can see it responds with HTTP code 204