question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Runtime error encountered: wastedBytes provided value was not a number

See original GitHub issue

Provide the steps to reproduce

  1. 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brendankennycommented, Sep 17, 2019

#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 of undefined is guarded against but 0 isn’t, so you get a compressionRatio of whatever / 0 === Infinity. https://github.com/GoogleChrome/lighthouse/blob/30a5e0516fbbf388419cfa610b29b6df581714ea/lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js#L95-L98

    we 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 a resourceSize 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

0reactions
brendankennycommented, Sep 19, 2019

We should fix the css infinite savings bug (but we can move to a new issue if someone else wants to)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found