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.

BackstopException causes backstop process to hang indefinitely

See original GitHub issue

If we encounter a BackstopException for any reason, the whole process just hangs after throwing the exception. Makes it difficult to set it up for CI.

Setup clean environment, backstop default scenario

Reproduction I’ve added an evaluation with an undefined variable to onReady.js

module.exports = function (chromy, scenario, vp) {
  console.log('SCENARIO > ' + scenario.label);
  require('./clickAndHoverHelper')(chromy, scenario);
  // add more ready handlers here...

    chromy.evaluate(() => {
      IAmTotallyUndefined // will cause BackstopException -> undefined variable
    });
};

Error output

COMMAND | Command `reference` ended with an error after [1.416s]
COMMAND | BackstopException: BackstopJS Homepage on undefined: Error: An error has occurred evaluating the script in the browser.ReferenceError: IAmTotallyUndefined is not defined
    at result (<anonymous>:3:7)
    at <anonymous>:4:7

afterwards hanging forever until process is exited manually

Encountering TimeoutExceptions or other Exceptions correctly exits. Any idea where to start?


edit: for now i went with a bare bones approach of calling process.exit(1) in the promise.catch block after logging the error. Seems like a bad solution though. chrome instances are not properly shutdown.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
garriscommented, Oct 13, 2017

fixed by 8e0074f8fd6366f87d4743099735e79ddcc40b1f

0reactions
garriscommented, Oct 13, 2017

Ok backstoppers! This problem is about to go away. I have a fix — need a few days to validate it. Will update soon!

Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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