falco
falco copied to clipboard
Falco does not save audit results data when Lighthouse errors on Time To Interactive calculation
Reproduction
Steps to reproduce:
- Set up a project testing the Moto G4 - Chrome - 3GFast - Dulles environment
- Run a few audits
This bug seemingly happened in only one project (that I cannot disclose unfortunately).
Expected Behavior
All audit results should be stored in Falco and made accessible to the user
Actual Behavior
All have results in WPT, but some of them will not make it to Falco with the Error while parsing the audit results from WPT error
After investigation, it looks like this is caused by the Lighthouse “interactive” audit not working if the page is not interactive for too long.
The key here is not found:
https://github.com/theodo/falco/blob/8c6727a44a521a42ae928afc69ad85ff17cc89a4/backend/audits/wpt_utils/normalizer.py#L10-L12
Instead we have the key error with the following value Your page took too long to load. Please follow the opportunities in the report to reduce your page load time, and then try re-running Lighthouse. (NO_TTI_CPU_IDLE_PERIOD)
We should handle this case like the Lighthouse viewer does: