screen icon indicating copy to clipboard operation
screen copied to clipboard

Not following redirects

Open adamlytics opened this issue 7 years ago • 1 comments

Occasionally the scripts gets a URL that results in a server-side 301 or 302 redirect. When this happens, PhantomJS is not following it and I get the error:

Uncaught exception 'Screen\Exceptions\PhantomJsException' with message 'Unable to load the address!' in microweber/screen/src/Capture.php:259

I am using the following options/flags:

  • ignore-ssl-errors = "true"
  • ssl-protocol = "any"
  • web-security = "true"

It works fine when the URL does not redirect. Any help would be appreciated.

adamlytics avatar Oct 27 '17 00:10 adamlytics

$screenCapture = new Capture($url);

$screenCapture->setOptions([ 'ignore-ssl-errors' => 'yes', 'ssl-protocol' => "any", 'web-security' => "true" ]); Also working for me

abdulqadoos9090 avatar Jan 22 '20 07:01 abdulqadoos9090