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.

runTimeError exists when there are NO_ERRORs

See original GitHub issue

Ran into this working on a web server that returns LH results. It’s unexpected that runTimeErrors exists in the LHR if there were no errors! It also requires users to check for a “NO_ERROR” string code which overcomplicates matters.

    if (lhr.runtimeError && lhr.runtimeError.code !== 'NO_ERROR') {
      throw new Error(`${lhr.runtimeError.code} ${lhr.runtimeError.message}`);
    }
screen shot 2018-10-17 at 10 55 55 pm

Environment Information

  • Affected Channels: all
  • Lighthouse version: 3.2.1
  • Node.js version: 10+

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Feb 15, 2019

I’m not really satisfied with the node outcome right now. Eliminating the "runtimeError": {"code": "NO_ERROR"} was the original point of the issue I believe, so seeing that through in all environments seems reasonable.

I think I still stand by my opinions/suggestions in https://github.com/GoogleChrome/lighthouse/issues/6336#issuecomment-443876702, so good to see a few months hasn’t changed me too much 😃

1reaction
exterkampcommented, Dec 6, 2018

So @patrickhulce response made me look more into the LR errors, and I finally found the root cause (#6739)! So I am going to table more advanced error handling (#6671) for later. But I definitely think that PSI error handling needs to be re-evaluated next, but I’m going to leave LH CLI, node and others for later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happens when there is a javascript runtime error?
An uncaught runtime error only stops the current execution, which may be. the execution of a script; the call of an event handler....
Read more >
How to Solve the Most Common Runtime Errors in Java | Rollbar
A runtime error occurs when a program is syntactically correct but contains an issue that is only detected during program execution.
Read more >
What is a Runtime Error? — Definition by Techslang
A runtime error occurs when a program you're using or writing crashes or produces a wrong output. There are several types of runtime...
Read more >
Runtime Errors - GeeksforGeeks
Runtime Errors: A runtime error in a program is an error that occurs while the program is running after being successfully compiled.
Read more >
1E: Errors | Computer Science Circles - University of Waterloo
A syntax error happens when Python can't understand what you are saying. A run-time error happens when Python understands what you are saying,...
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