Closed aamenabhurawala closed 3 years ago
Hello @aamenabhurawala,
You can try to run the same webscreenshot
command with the -vv
option ?
Some raw phantomjs
commands will then be printed : could try to execute them directly without going through webscreenshot
?
Finally, can you try another renderer for the failed URL ?
Cheers.
Hello @aamenabhurawala,
You can try to run the same
webscreenshot
command with the-vv
option ?Some raw
phantomjs
commands will then be printed : could try to execute them directly without going throughwebscreenshot
?Finally, can you try another renderer for the failed URL ?
Cheers.
Hi, Thanks for the quick response, I tried running it with the raw phantomjs command, but it throws
2020-10-20T10:32:43 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(RemoteHostClosedError) ( "Connection closed" ) URL: "https://www.gpw.pl/session-details"
Please see full debug result of the command. I am trying to run it headless so not using any renderer.
your help is much appreciated.
[root@XXX ~]# phantomjs --debug=true --ignore-ssl-errors=true --ssl-protocol=any --ssl-ciphers=ALL "/usr/lib/python2.7/site-packages/webscreenshot/webscreenshot.js" url_capture=https://www.gpw.pl:443/session-details output_file="/home/aamkar/screenshots/images/test.png" width=1200 height=800 format=pdf quality=75 ajaxtimeout=1400 maxtimeout=1800 2020-10-20T10:32:39 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=
' to enable persistent cookie storage) 2020-10-20T10:32:39 [DEBUG] Set "http" proxy to: "" : 1080 2020-10-20T10:32:39 [DEBUG] Phantom - execute: Configuration 2020-10-20T10:32:39 [DEBUG] 0 objectName : "" 2020-10-20T10:32:39 [DEBUG] 1 cookiesFile : "" 2020-10-20T10:32:39 [DEBUG] 2 diskCacheEnabled : "false" 2020-10-20T10:32:39 [DEBUG] 3 maxDiskCacheSize : "-1" 2020-10-20T10:32:39 [DEBUG] 4 diskCachePath : "" 2020-10-20T10:32:39 [DEBUG] 5 ignoreSslErrors : "true" 2020-10-20T10:32:39 [DEBUG] 6 localUrlAccessEnabled : "true" 2020-10-20T10:32:39 [DEBUG] 7 localToRemoteUrlAccessEnabled : "false" 2020-10-20T10:32:39 [DEBUG] 8 outputEncoding : "UTF-8" 2020-10-20T10:32:39 [DEBUG] 9 proxyType : "http" 2020-10-20T10:32:39 [DEBUG] 10 proxy : ":1080" 2020-10-20T10:32:39 [DEBUG] 11 proxyAuth : ":" 2020-10-20T10:32:39 [DEBUG] 12 scriptEncoding : "UTF-8" 2020-10-20T10:32:39 [DEBUG] 13 webSecurityEnabled : "true" 2020-10-20T10:32:39 [DEBUG] 14 offlineStoragePath : "" 2020-10-20T10:32:39 [DEBUG] 15 localStoragePath : "" 2020-10-20T10:32:39 [DEBUG] 16 localStorageDefaultQuota : "-1" 2020-10-20T10:32:39 [DEBUG] 17 offlineStorageDefaultQuota : "-1" 2020-10-20T10:32:39 [DEBUG] 18 printDebugMessages : "true" 2020-10-20T10:32:39 [DEBUG] 19 javascriptCanOpenWindows : "true" 2020-10-20T10:32:39 [DEBUG] 20 javascriptCanCloseWindows : "true" 2020-10-20T10:32:39 [DEBUG] 21 sslProtocol : "any" 2020-10-20T10:32:39 [DEBUG] 22 sslCiphers : "ALL" 2020-10-20T10:32:39 [DEBUG] 23 sslCertificatesPath : "" 2020-10-20T10:32:39 [DEBUG] 24 sslClientCertificateFile : "" 2020-10-20T10:32:39 [DEBUG] 25 sslClientKeyFile : "" 2020-10-20T10:32:39 [DEBUG] 26 sslClientKeyPassphrase : "" 2020-10-20T10:32:39 [DEBUG] 27 webdriver : ":" 2020-10-20T10:32:39 [DEBUG] 28 webdriverLogFile : "" 2020-10-20T10:32:39 [DEBUG] 29 webdriverLogLevel : "INFO" 2020-10-20T10:32:39 [DEBUG] 30 webdriverSeleniumGridHub : "" 2020-10-20T10:32:39 [DEBUG] Phantom - execute: Script & Arguments 2020-10-20T10:32:39 [DEBUG] script: "/usr/lib/python2.7/site-packages/webscreenshot/webscreenshot.js" 2020-10-20T10:32:39 [DEBUG] 0 arg: "url_capture=https://www.gpw.pl:443/session-details" 2020-10-20T10:32:39 [DEBUG] 1 arg: "output_file=/home/aamkar/screenshots/images/test.png" 2020-10-20T10:32:39 [DEBUG] 2 arg: "width=1200" 2020-10-20T10:32:39 [DEBUG] 3 arg: "height=800" 2020-10-20T10:32:39 [DEBUG] 4 arg: "format=pdf" 2020-10-20T10:32:39 [DEBUG] 5 arg: "quality=75" 2020-10-20T10:32:39 [DEBUG] 6 arg: "ajaxtimeout=1400" 2020-10-20T10:32:39 [DEBUG] 7 arg: "maxtimeout=1800" 2020-10-20T10:32:39 [DEBUG] Phantom - execute: Starting normal mode 2020-10-20T10:32:39 [DEBUG] WebPage - setupFrame "" 2020-10-20T10:32:39 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:39 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:39 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:39 [DEBUG] WebpageCallbacks - getJsConfirmCallback 2020-10-20T10:32:39 [DEBUG] WebpageCallbacks - getJsConfirmCallback 2020-10-20T10:32:39 [DEBUG] WebPage - updateLoadingProgress: 10 2020-10-20T10:32:43 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(RemoteHostClosedError) ( "Connection closed" ) URL: "https://www.gpw.pl/session-details" 2020-10-20T10:32:43 [DEBUG] WebPage - updateLoadingProgress: 100 2020-10-20T10:32:43 [DEBUG] WebPage - updateLoadingProgress: 10 2020-10-20T10:32:43 [DEBUG] WebPage - updateLoadingProgress: 100 2020-10-20T10:32:43 [DEBUG] WebPage - setupFrame "" 2020-10-20T10:32:43 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:43 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:43 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:43 [DEBUG] WebPage - updateLoadingProgress: 10 2020-10-20T10:32:43 [DEBUG] WebPage - setupFrame "" 2020-10-20T10:32:43 [DEBUG] FileSystem - _open: ":/modules/fs.j s" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:43 [DEBUG] FileSystem - _open: ":/modules/syst em.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:43 [DEBUG] FileSystem - _open: ":/modules/webp age.js" QMap(("mode", QVariant(QString, "r"))) 2020-10-20T10:32:43 [DEBUG] WebPage - updateLoadingProgress: 10 0 2020-10-20T10:32:43 [DEBUG] WebPage - setupFrame "" 2020-10-20T10:32:43 [DEBUG] WebPage - setupFrame "" [root@au03smbcqa18 ~]#
Thanks Aamena
Thanks, I don't see any obvious error there.
I am trying to run it headless so not using any renderer.
phantomjs
is the default renderer, you can choose another one with the -r
and --renderer-binary
options (but before, install the chosen renderer on your system).
Well technically there is an network error in your log:
2020-10-20T10:32:43 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(RemoteHostClosedError) ( "Connection closed" ) URL: "https://www.gpw.pl/session-details"
Are you sure the remote host could then be joined from your client ?
[ERROR][https://www.gpw.pl:443/session-details] Shell command PID 5346 returned an abnormal error code: '1' [ERROR][https://www.gpw.pl:443/session-details] Screenshot somehow failed This seems to be working for few URL's but for most of the others it does not seems to be working.
Checked that Phantomjs is latest
[root@XXX ~]# phantomjs --version 2.1.1
Getting this error whenever i run the script can't seems to find a solution ...