Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Stuck - Timeout Argument Ignored #24

Closed
robc72 opened this issue Mar 1, 2018 · 4 comments
Closed

Getting Stuck - Timeout Argument Ignored #24

robc72 opened this issue Mar 1, 2018 · 4 comments

Comments

@robc72
Copy link

robc72 commented Mar 1, 2018

The url specified gets stuck and won't timeout. Did I do something wrong?
Thanks,
Rob

// THIS IS THE PROBLEM URL
$url = "https://www.shutterstock.com/en/editor/template/6036521";

$chrome = new Chrome($url, "/usr/bin/google-chrome");
$chrome->setArguments([
'--timeout' => 6000
]);
$chrome->setWindowSize($width=1280,$height=800);
$chrome->getScreenShot("/home/screenshots/sample.jpg");

// CODE NEVER GETS HERE

echo "I made it here";

@daudmalik06
Copy link
Owner

hey @robc72
did you try any example mentioned e.g ,

$chrome=new Chrome(null,'/usr/bin/google-chrome');
$chrome->useHtml("<h2>I am test html</h2>");
print "Pdf successfully generated :".$chrome->getPdf("/tmp/mypdf.pdf").PHP_EOL;
print "screenShot successfully generated :".$chrome->getScreenShot("/tmp/hello/test.jpg").PHP_EOL;

and did you verify the installation of chrome if that works from bash ??
please provided little environment details , so that i can debug that
thanks

@robc72
Copy link
Author

robc72 commented Mar 1, 2018

The test works fine when I use a different save path. When using the /tmp/ is hangs just like with that once bad url.

https://www.shutterstock.com/en/editor/template/6036521
Just so you know the rest of the urls I've tried are working fine.

The PDF generated has some bad fonts/garbled text which is another entirely different issue for me so if you have some insight there as well I would really appreciate it. The areas with the bad font are the date at the top and the url and page at the bottom.

I'm hosting on Centos 7 and NGINX. Please let me know if there's any other information you need.

@robc72
Copy link
Author

robc72 commented Mar 1, 2018

It appears that --ipc-connection-timeout does the trick for the timeout but that doesn't explain the problem of the page not loading for that specific url.

Well the page is loading correctly now after adding that so this may not be an issue anymore.

@daudmalik06
Copy link
Owner

awesome ,
i am happy your issue is resolved ,
happy coding :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants