Lighthouse: App getting killed too soon

Created on 17 Jul 2018  Â·  2Comments  Â·  Source: GoogleChrome/lighthouse

I have written some custom audits following examples here: https://github.com/GoogleChrome/lighthouse/tree/master/docs/recipes/custom-audit

Earlier lighthouse used to give enough time to my app such that I was able to set the custom load metrics in window object. If I remember correctly, I read somewhere that it will wait for the last API call to finish and then run the audits.

However, after having migrated to 3.0.2, it is killing my app too soon. The max-wait-for-load is also not being honored. Due to this, all my custom audits are failing. Please help!

question

Most helpful comment

Hey @sakshij thanks for filing!

If your audits require extra time you can increase the config setting for the defaultPass pauseAfterLoadMs.

Example: lighthouse --config-path=./example-config.js <url>

example-config.js

module.exports = {
  extends: 'lighthouse:default',
  // wait at least 10s after the page has loaded
  passes: [{passName: 'defaultPass', pauseAfterLoadMs: 10000}],
};

max-wait-for-load, OTOH, is for the maximum amount of time to wait, not the minimum so you can probably remove that from your setup :)

All 2 comments

Hey @sakshij thanks for filing!

If your audits require extra time you can increase the config setting for the defaultPass pauseAfterLoadMs.

Example: lighthouse --config-path=./example-config.js <url>

example-config.js

module.exports = {
  extends: 'lighthouse:default',
  // wait at least 10s after the page has loaded
  passes: [{passName: 'defaultPass', pauseAfterLoadMs: 10000}],
};

max-wait-for-load, OTOH, is for the maximum amount of time to wait, not the minimum so you can probably remove that from your setup :)

It worked perfectly! Thanks :)

Was this page helpful?
0 / 5 - 0 ratings