Runtime error encountered: wastedBytes provided value was not a number
See original GitHub issueProvide the steps to reproduce
- Run
lighthouse https://www.lendo.se
What is the current behavior?
Lighthouse throws the following error:
Runtime error encountered: ICU Message "Potential savings of {wastedBytes, number, bytes} KB" contains a numeric reference ("wastedBytes") but provided value was not a number
Error: ICU Message "Potential savings of {wastedBytes, number, bytes} KB" contains a numeric reference ("wastedBytes") but provided value was not a number
What is the expected behavior?
A successful test
Environment Information
- Affected Channels: All
- Lighthouse version: 5.3.0 (works in 5.2.0)
- Node.js version: 11.6.0
- Operating System: Mac OSX, Linux
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
RuntimeError: HHblits failed #97 - deepmind/alphafold - GitHub
The solution was to increase available RAM memory, from 64 GB to 256 GB in my case, after which no such error occurred....
Read more >Run-Time Error 91: Object Variable or With Block Variable Not ...
Symptoms. "Runtime error 91: Object variable or with block variable not set" This error occurs when trying to load AS/400 data after setting...
Read more >Debugging errors - dbt Developer Hub
Not a dbt project. Running with dbt=0.17.1. Encountered an error: Runtime Error fatal: Not a dbt project (or any of the parent directories) ......
Read more >LD - Documentation
ld combines a number of object and archive files, relocates their data and ties ... Many linkers abandon execution immediately upon encountering an...
Read more >front_end/third_party/lighthouse/locales/en-GB.json - Google Git
"message": "`[accesskey]` values are not unique" ... "lighthouse-core/audits/accessibility/aria-valid-attr-value.js | description": {.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#9687 makes it not a fatal error to have
Infinity
as a numeric ICU replacement value.For the underlying issue in
unused-css-rules
("Potential savings of ∞ KB"
), there are two things going on:a
networkRecord.resourceSize
ofundefined
is guarded against but0
isn’t, so you get acompressionRatio
ofwhatever / 0
===Infinity
. https://github.com/GoogleChrome/lighthouse/blob/30a5e0516fbbf388419cfa610b29b6df581714ea/lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js#L95-L98we could (and maybe should) have it fall back to a ratio of 1 in that case, but why is there a
resourceSize
of 0 for this example in the first place?It turns out there are two requests for the main page in the example
https://www.lendo.se
for whatever reason, and if you load the page in DevTools you can see the second load has aresourceSize
of 0 there too (so we aren’t doing anything different). That’s a little weird because it’s supposedly not loaded from disk/memory cache or a sw, so where was the resource loaded from?Regardless, our problem is that we have an intermediate map of url to stylesheet-or-thing-containing-a-stylesheet, and when constructing that map the last instance of a url wins, so we pick the networkRecord with
resourceSize
0.We’ll need a more deliberate step picking a canonical networkRecord when multiple ones exist for a single url. First one wins? First one with a non-zero
resourceSize
?https://github.com/GoogleChrome/lighthouse/blob/30a5e0516fbbf388419cfa610b29b6df581714ea/lighthouse-core/audits/byte-efficiency/unused-css-rules.js#L49-L53
We should fix the css infinite savings bug (but we can move to a new issue if someone else wants to)