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.

Tests randomly fails on timeout to find an element by attribute on v4.5.0

See original GitHub issue

Current behavior:

On running our test suite in Cypress v4.5.0, we get random fails whenever the test suite runs in our CI environment (Drone - custom Node v12 docker image - running electron headless).

Examples of two independent runs failing in different tests: image image

All tests pass when running locally either on chrome and in headless electron. Downgrading to v4.4.1 fixes the issue in our CI.

Desired behavior:

All tests pass independent of version and environment.

Versions

  • Cypress: v4.5.0
  • OS: Linux Docker - Node 12 custom image
  • Browser - Headless Electron

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

15reactions
jennifer-shehanecommented, May 24, 2021

This issue is closed as no one has provided a way to reproduce it, so there is no solution avaialable. If you can provide a way to reproduce, we’ll take a look at it.

3reactions
enyangxxxcommented, Apr 14, 2021

it’s reproducible in a way, that the tests relying on cy.route() and cy.wait() fails randomly in CI (for me the tests are running successfully locally)

Read more comments on GitHub >

github_iconTop Results From Across the Web

cypress.io: contains() not waiting for element - Stack Overflow
contains('Test item 1') is finding something, despite it not yet being visible. cypress will throw an exception and fail the test if it...
Read more >
9 Understanding timeouts - Testing Angular Applications
Understanding and avoiding the causes of timeout errors in Protractor; ... 1) the contact list should find the title - Failed: No element...
Read more >
Top 10 Selenium Exceptions and How To Handle These ...
In this case, the test will fail because the WebDriver could not find the element. In this case, StaleElementReferenceException will be thrown.
Read more >
3 Practices to Reduce Flakiness in Cypress Tests - Atomic Spin
Flaky tests can be difficult to identify and troubleshoot. Here are a few practices to reduce flakiness when using Cypress tests.
Read more >
Attributes - NUnit Docs
NUnit uses custom attributes to identify tests. All NUnit attributes are contained in the NUnit.Framework namespace. Each source file that contains tests ......
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