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.

Use friendly error messages in "x is undefined" cases

See original GitHub issue
TypeError: Cannot read property '_timing' of undefined
  File "/usr/lib/node_modules/lighthouse/lighthouse-core/audits/time-to-first-byte.js", line 29, col 26, in Function.caclulateTTFB
    const timing = record._timing;
  File "/usr/lib/node_modules/lighthouse/lighthouse-core/audits/time-to-first-byte.js", line 47, col 33, in artifacts.requestNetworkRecords.then
    const ttfb = TTFBMetric.caclulateTTFB(finalUrlRequest);
  File "internal/process/next_tick.js", line 135, col 7, in process._tickDomainCallback

https://sentry.io/google-lighthouse/lighthouse/issues/407357986/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
patrickhulcecommented, Nov 22, 2017

Yeah basically the bug is on the error message, not the error existing. Not much we can do in that audit if we couldn’t find the request 😃

IMO we should try to minimize the debugStrings in the report that are of the form ‘blah of undefined’ and try to say what happened, like “Unable to identify the main resource” or something

0reactions
brendankennycommented, Apr 25, 2019

Well we have better network request fallbacks for timing info, so hopefully we have more intelligible error messages if anyone is still hitting this case 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling - Apollo GraphQL Docs
Throwing errors​​ For example, it throws a GRAPHQL_VALIDATION_FAILED error whenever an incoming operation isn't valid against the server's schema. Your resolvers ...
Read more >
jQuery Ajax error handling, show custom exception messages
Custom exception ModelStateException that gets thrown when validation fails on the server (model state reports validation errors when we use data ...
Read more >
A Guide to Error Handling in Express.js | Scout APM Blog
Error handling often doesn't get the attention it deserves. Mishandled errors can lead to a bad UX and negatively affect your business.
Read more >
Errors and Exceptions in Haskell - Stack Builders
In Haskell, we have error and undefined to cause such errors and terminate execution of the program.
Read more >
Fixing Compilation Errors - GAMS
Error K: Using Undefined Data​​ Note that the scalar f was declared, but there was no value assigned to it. Thus, when it...
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