macbre / phantomas

Headless Chromium-based web performance metrics collector and monitoring tool
https://www.npmjs.com/package/phantomas
BSD 2-Clause "Simplified" License
2.25k stars 141 forks source link

Some HTTPS doesnt work on debian #553

Closed matthiastosch closed 8 years ago

matthiastosch commented 8 years ago

HI,

i've some trouble to get phantomas running on our debian machines (wheezy an jessy). On my macos dev machines there ist noch error.

I try all nodejs versions i can get. I also try the older Ticket for https problems with -ssl-protocol=tlsv1 but it doesn't help.

phantomas https://www.babymueller.ch/de/ --ssl-protocol=tlsv1--debug=true phantomas: (254) Page loading failed

phantomas https://www.babymueller.ch/de/ --verbose 08:54:05.316 phantomas v1.11.0: /usr/lib/node_modules/phantomas/ 08:54:05.319 Options: {"version":false,"V":false,"help":false,"h":false,"verbose":true,"v":true,"disable-js":false,"no-externals":false,"scroll":false,"spy-eval":false,"stop-at-onload":false,"analyze-css":false,"colors":false,"film-strip":false,"page-source":false,"progress":false,"silent":false,"timeout":15,"reporter":"plain","R":"plain","format":"plain","url":"https://www.babymueller.ch/de/","user-agent":"phantomas/1.11.0 (PhantomJS/1.9.8; linux x64)"} 08:54:05.320 Loading: core modules... 08:54:05.320 Core module navigationTiming v1.0 initialized 08:54:05.323 Core module requestsMonitor v1.2 initialized 08:54:05.324 Core module timeToFirstByte v1.1 initialized 08:54:05.324 Loading: extensions... 08:54:05.324 Getting the list of all modules in /usr/lib/node_modules/phantomas/extensions... 08:54:05.325 Module cookies v1.0 initialized 08:54:05.326 Devices: no profile selected (available: phone, tablet) 08:54:05.326 Module devices v0.1 initialized 08:54:05.326 filmStrip: to enable screenshots of page being loaded run phantomas with --film-strip option 08:54:05.327 Module filmStrip v0.3 initialized 08:54:05.327 HAR: no path specified, use --har 08:54:05.327 Module har v0.1 initialized 08:54:05.328 Module httpAuth v1.0 initialized 08:54:05.329 To enable page-source of page being loaded run phantomas with --page-source option 08:54:05.329 Module pageSource v0.1 initialized 08:54:05.329 Module postLoadDelay v0.1 initialized 08:54:05.330 Screenshot: to enable screenshot of the fully loaded page run phantomas with --screenshot option 08:54:05.330 Module screenshot v0.2 initialized 08:54:05.330 Scroll: pass --scroll option to scroll down the page when it's loaded 08:54:05.332 Module scroll v0.1 initialized 08:54:05.332 Module waitForEvent v0.1 initialized 08:54:05.333 Module waitForSelector v0.2 initialized 08:54:05.335 Loading: modules... 08:54:05.335 Getting the list of all modules in /usr/lib/node_modules/phantomas/modules... 08:54:05.336 Module ajaxRequests v0.2 initialized 08:54:05.337 Module alerts v0.1 initialized 08:54:05.337 To enable CSS in-depth metrics please run phantomas with --analyze-css option 08:54:05.337 Module analyzeCss v0.4 initialized 08:54:05.338 Module assetsTypes v0.2 initialized 08:54:05.338 Module blockDomains v0.1 initialized 08:54:05.338 Module cacheHits v0.3 initialized 08:54:05.338 Module caching v0.2 initialized 08:54:05.339 Module console v0.2 initialized 08:54:05.340 Module cookies v0.3 initialized 08:54:05.341 Module documentHeight v0.1 initialized 08:54:05.342 Module domComplexity v1.0 initialized 08:54:05.342 Module domHiddenContent v0.1 initialized 08:54:05.343 Module domMutations v0.1 initialized 08:54:05.343 Module domQueries v1.0 initialized 08:54:05.345 Module domains v0.3 initialized 08:54:05.345 Module events v0.4 initialized 08:54:05.346 Module globalVariables v0.3 initialized 08:54:05.346 Module headers v0.1 initialized 08:54:05.347 Module jQuery v1.0 initialized 08:54:05.348 javaScriptBottlenecks: to spy calls to eval() run phantomas with --spy-eval option 08:54:05.350 Module javaScriptBottlenecks v0.2 initialized 08:54:05.351 Module jserrors v0.3 initialized 08:54:05.351 Module keepAlive v0.1 initialized 08:54:05.352 Module lazyLoadableImages v1.0 initialized 08:54:05.352 Module localStorage v1.0 initialized 08:54:05.353 Module mainRequest v0.1 initialized 08:54:05.353 Module redirects v0.1 initialized 08:54:05.354 Module repaints v0.1 initialized 08:54:05.355 Module requestsStats v0.3 initialized 08:54:05.355 Module requestsTo v1.0 initialized 08:54:05.356 Module staticAssets v0.5 initialized 08:54:05.357 Module timeToFirst v0.1 initialized 08:54:05.358 Module windowPerformance v1.0 initialized 08:54:05.358 Loading: 3rd party modules... 08:54:05.359 Opening https://www.babymueller.ch/de/... 08:54:05.359 Using phantomas/1.11.0 (PhantomJS/1.9.8; linux x64) as user agent 08:54:05.359 Viewport set to 1366 x 768 08:54:05.360 Event pageBeforeOpen emitted 08:54:05.361 Event onResourceRequested emitted 08:54:05.362 Event beforeSend emitted 08:54:05.362 req: https://www.babymueller.ch/de/ 08:54:05.363 Event send emitted 08:54:05.363 Event pageOpen emitted 08:54:05.364 Timeout set to 15 sec 08:54:05.364 Page loading started 08:54:05.364 Event loadStarted emitted 08:54:05.410 Loading progress: 10% 08:54:05.410 Event progress emitted 08:54:05.432 Event onResourceReceived emitted 08:54:05.432 Got a response with no status set: https://www.babymueller.ch/de/ ({"contentType":null,"headers":[],"id":1,"redirectURL":null,"stage":"end","status":null,"statusText":null,"time":"2015-09-11T08:54:05.432Z","url":"https://www.babymueller.ch/de/"}) 08:54:05.433 Event abort emitted 08:54:05.433 recv: "start" stage not registered for https://www.babymueller.ch/de/! 08:54:05.433 contentLength missing: {"url":"https://www.babymueller.ch/de/"} 08:54:05.433 recv: HTTP 200 https://www.babymueller.ch/de/ [undefined] 08:54:05.434 Event recv emitted 08:54:05.434 Event metric emitted 08:54:05.434 Event metric emitted 08:54:05.434 Time to first byte: set to NaN ms for #1 request to https://www.babymueller.ch/de/ (HTTP 200) 08:54:05.434 Time to last byte: set to 71 ms 08:54:05.434 Event responseEnd emitted 08:54:05.434 Block domains: assuming "www.babymueller.ch" to be the main domain 08:54:05.435 Event metric emitted 08:54:05.435 Performance timing: responseEnd = 1441961645435 08:54:05.437 Event milestone emitted 08:54:05.440 Page loading finished ("fail") 08:54:05.440 Event loadFailed emitted 08:54:05.440 Exiting with code #254 (Page loading failed)! 08:54:05.441 Event exit emitted phantomas: (254) Page loading failed 08:54:05.447 phantomas scope injected 08:54:05.448 onInit: page object initialized 08:54:05.448 Event init emitted

i hope someone can help

gmetais commented 8 years ago

Try to use the devel branch with the --engine=webkit2 option. It should fix your problem on debian (but it's not working on mac OSX yet).

matthiastosch commented 8 years ago

do you have a small howto to use phantomas with the source code? I only use the npm package at the moment - whould help a lot

macbre commented 8 years ago

npm install macbre/phantomas should install the devel version of PhantomJS.

The SSL issue is fixed by #488

matthiastosch commented 8 years ago

sure? Wenn i try npm install macbre/phantomas I got the error Engine "webkit2" not found! in the directory /lib/engines the webkit2.js is missing.

macbre commented 8 years ago

Please try

git clone git@github.com:macbre/phantomas.git
npm install

instead

matthiastosch commented 8 years ago

thanks a lot for the response. I got it with new Debian version. One of our dev server had an old version. With conflicts in c lib's