sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.72k stars 597 forks source link

Get error with create custom budget file json #1512

Closed sakonachhoeurng closed 7 years ago

sakonachhoeurng commented 7 years ago

Hi I try to create file budget.json then I run with this command sitespeed.io http://www.latest.we-relaunch.wehost.asia/ --budget.file Packages/Sites/WE.SitePackage/Tests/Sitespeed/myBudget.json

Then I got error like this

[2017-03-13 11:14:28] 44 requests, 1813.67 kb, firstPaint: 419ms (±28.44ms), DOMContentLoaded: 1.25s (±64.25ms), Load: 1.75s (±21.87ms), rumSpeedIndex: 1122 (±17.83) (3 runs)
[2017-03-13 11:14:28] TypeError: Cannot read property 'browsertime.pageSummary' of undefined
    at verify (/usr/local/lib/node_modules/sitespeed.io/lib/plugins/budget/verify.js:34:16)
    at Object.processMessage (/usr/local/lib/node_modules/sitespeed.io/lib/plugins/budget/index.js:28:11)
    at queue.process (/usr/local/lib/node_modules/sitespeed.io/lib/support/queueHandler.js:157:57)
    at drainItem (/usr/local/lib/node_modules/sitespeed.io/node_modules/concurrent-queue/index.js:92:21)
    at Immediate.drain (/usr/local/lib/node_modules/sitespeed.io/node_modules/concurrent-queue/index.js:73:84)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)
[2017-03-13 11:14:28] TypeError: Cannot read property 'pagexray.pageSummary' of undefined
    at verify (/usr/local/lib/node_modules/sitespeed.io/lib/plugins/budget/verify.js:34:16)
    at Object.processMessage (/usr/local/lib/node_modules/sitespeed.io/lib/plugins/budget/index.js:28:11)
    at queue.process (/usr/local/lib/node_modules/sitespeed.io/lib/support/queueHandler.js:157:57)
    at drainItem (/usr/local/lib/node_modules/sitespeed.io/node_modules/concurrent-queue/index.js:92:21)
    at Immediate.drain (/usr/local/lib/node_modules/sitespeed.io/node_modules/concurrent-queue/index.js:73:84)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)
[2017-03-13 11:14:28] TypeError: Cannot read property 'coach.pageSummary' of undefined
    at verify (/usr/local/lib/node_modules/sitespeed.io/lib/plugins/budget/verify.js:34:16)
    at Object.processMessage (/usr/local/lib/node_modules/sitespeed.io/lib/plugins/budget/index.js:28:11)
    at queue.process (/usr/local/lib/node_modules/sitespeed.io/lib/support/queueHandler.js:157:57)
    at drainItem (/usr/local/lib/node_modules/sitespeed.io/node_modules/concurrent-queue/index.js:92:21)
    at Immediate.drain (/usr/local/lib/node_modules/sitespeed.io/node_modules/concurrent-queue/index.js:73:84)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)
[2017-03-13 11:14:28] Budget: 0 working and 0 failing tests
[2017-03-13 11:14:28] Render HTML for 1 page(s) 
[2017-03-13 11:14:30] HTML stored in local.we-relaunch.wehost.asia/sitespeed-result/www.latest.we-relaunch.wehost.asia/2017-03-13-11-14-11
[2017-03-13 11:14:30] Finished analysing http://www.latest.we-relaunch.wehost.asia/

I do not know what it cause from

soulgalore commented 7 years ago

Hey @sakonachhoeurng thanks for reporting! Did you use the example config https://github.com/sitespeedio/sitespeed.io/blob/master/test/budget.json ? I tried that now and that seems to work for me.

Could it be there are some old docs somewhere, do you remember where you seen --budget.file? The correct for 4.x is:

sitespeed.io https://www.sitespeed.io -n 1 --budget.configPath test.json

Best Peter

soulgalore commented 7 years ago

oopps that was wrong in the CLI help, fixing that for next release. Sorry!

beenanner commented 7 years ago

Closing as this was released in 4.6.1 @sakonachhoeurng feel free to reopen if you run into anything else.