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.

Intermittent Failures

See original GitHub issue

Hey all, We’re hitting intermittent bumps in our chromy-based backstop suite.

On a semi-regular basis we get false failures of this: compare | Chromy error: Error. See scenario – xxx xxx xxx xxx

Accompanied by a report that looks like this: screen shot 2017-11-07 at 2 39 41 pm

We’ve played with asyncCapture/compare limit, played with delay, but no dice. Sometimes it can be resolved by pkill Chrome, but generally we’re struggling to find the special sauce to solve them for good.

First question - have you encountered these intermittent failures? Second question - Is there a chromy/backstop flag we can set to investigate the error or capture some more context around this Chromy error?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:38 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
joseph-stanocommented, Nov 14, 2017

Alright, good news guys. That seemed to be our issue. We added wait(<selector>) to all of our DOM interactions and we’ve run our suite 15+ times with "asyncCaptureLimit": 20. All clear!

Here are the guts of our solution if you’re interested.

We have a helper script in which we introduced two functions for click() and type():

let chromy
exports.init = (chromyReference) => {
    chromy = chromyReference
    return this
}
exports.click = (selector) => {
    chromy.wait(selector).click(selector)
    return this
}
exports.type = (selector, text) => {
    chromy.wait(selector).type(selector, text)
    return this
}

And then in our onReadyScript:

const interactions = require('../interactions.js')
module.exports = function (chromy, scenario, vp) {
	interactions
		.init(chromy, vp)
		.click('.some-selector')
		.type('.another-selector', 'text to type')
}

A few chromy/backstop tweaks helped us debug this work:

  • backstop: index.js:65 - log uncaught errors (this is generally helpful to catch errors in onReadyScript too)
  • chromy: document.js - in reject(new WaitTimeoutError('...')) - we added the selector on which we were waiting. In a few of our scenarios we discovered we had bogus selectors that were never working in the first place, so our test was timing out.

Hope this helps others with the same issue!

1reaction
garriscommented, Nov 10, 2017

@kiran-redhat – thank you for tracking this down! I completely agree with your idea. We should add a log.error at line 319 which also includes the scenario label+viewport. This would make debugging MUCH easier for engineers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intermittent fault - Wikipedia
Intermittent failures can be a cause of no-fault-found (NFF) occurrences in electronic products and systems. NFF implies that a failure (fault) occurred or...
Read more >
Troubleshooting Tips: Isolating Intermittent Faults
From my experience, intermittent faults are most commonly hardware related either damaged product or a problem with the installation. Software or firmware are ......
Read more >
How should intermittent failures be analyzed? - EESemi.com
Intermittent failures are failures that do not manifest themselves all the time. The fact that they are sometimes there and sometimes aren't can...
Read more >
Major causes of intermittent faults in electronic circuits
Intermittent faults (IFs) in electrical interconnection are short duration transients. These faults are random, non-predictable and non-stationary in nature ...
Read more >
Intermittent problems - IBM
An intermittent problem is a problem that occurs for a short time, and then goes away. The problem may not occur again until...
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