Support Article
Phantom js failed when trying to use prScreenShot
SA-37706
Summary
To support screenshot capture, prScreenShot is deployed to a local Tomcat installation.
Initially there were some SSL/certificate errors, which were subsequently resolved, but the errors below are still occurring.
These errors happen independently of what protocol is used: http or https.
Error Messages
Errors in tomcat log:
10-Apr-2017 11:53:09.058 SEVERE [pool-10-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:12.670 SEVERE [pool-11-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:16.296 SEVERE [pool-12-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:19.866 SEVERE [pool-13-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:23.597 SEVERE [pool-14-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:27.247 SEVERE [pool-15-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:30.935 SEVERE [pool-16-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:34.800 SEVERE [pool-17-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:38.530 SEVERE [pool-18-thread-1] screenshot.CaptureScreenShotPhantomJS$1.run Phantom js process failed capturing the screenshot
10-Apr-2017 11:53:38.770 INFO [http-nio-8080-exec-5] screenshot.CaptureScreenShotPhantomJS.captureScreenShot Time to capture screen shot(s) is 33085 miliseconds.
Steps to Reproduce
Setup prScreenCapture by following the Pega OOTB installation instructions.
Root Cause
For reasons that are not clear, the interactive mode is not working for this instance.
For that reason the callback function is never getting called, and the page is not rendered. This is likely a phantomjs defect or an environmental anomoly.
Resolution
To solve this issue, Pega GCS redeployed the prscreenshot.war with a local change that always calls page.render (in CaptureImage.js file, which is included in the war) even if phantomjs does not return the 'success' status.
Published June 1, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.