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.

Possible infinite loop while running in Jenkins with retries

See original GitHub issue

Current behavior

While running Cypress with a docker image inside Jenkins, we are currently encountering an infinite loop (or what appears to be one). Seems related to this issue: https://github.com/cypress-io/cypress/issues/9040, but I am still encountering the problem with versions 6.3.0 and 6.4.0 of cypress.

With DEBUG=cypress:* set, I get these two messages repeatedly until I either abort the Jenkins build or lerna crashes.

cypress:server:browsers:electron debugger: sending Page.screencastFrameAck with params { sessionId: 1 }
cypress:server:browsers:electron debugger: received response to Page.screencastFrameAck: {}

Appears to be related to retries, as it can successfully run occasionally, and I’ve seen that when it does pass all tests, the tests ran quickly with no retry attempts.

Desired behavior

Test code to reproduce

Unfortunately, I can’t share my code, but can try and provide any more information you need.

Versions

Issue exists in 6.2.1, 6.3.0, and 6.4.0 at minimum. Haven’t heard of or seen this issue from previous versions.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
KeKs0rcommented, Apr 7, 2021

I have already commented on a similar issue thatp proposed some changes: https://github.com/cypress-io/cypress/issues/8206

We are experiencing this stall in 70% or more. This means, rerunning CI several times for every change to go through. I am not sure how to debug or address this issue further.

Our Setup

  • Cypress 6.8.0
  • React & Node with Typescript
  • We don’t have retries enabled
  • we are using nx.dev for our monorepo.
  • “only” 9 test files, which usually complete in 3 minutes.
  • Authentication via OAuth

Things we have tried so far

  1. Run garbage collection between tests: https://github.com/cypress-io/cypress/issues/8525
  2. Increase the CI container by 4x (to 16gb ram) - it used to even run with 4gb of ram in ci
  3. Switch from electron to chrome
  4. Set “numTestsKeptInMemory”: 0
  5. Disable video recording
  6. Updating to Cypress 7
  7. Running every test file individually

None of which seems to help.

0reactions
sr95818commented, Apr 6, 2021

same issue: cypress 6.8.0, no retries set (no retries setting defined which means 0), sometimes cypress hangs when running on dev.azure (we’re never experiencing the same behavior locally)

the log always ends with these repeating lines:

cypress:server:browsers:electron debugger: received response to Page.screencastFrameAck: {}
cypress:server:browsers:electron debugger: sending Page.screencastFrameAck with params { sessionId: 1 }
...
cypress:server:browsers:electron debugger: received response to Page.screencastFrameAck: {}
cypress:server:browsers:electron debugger: sending Page.screencastFrameAck with params { sessionId: 1 }

until CI cancels the job due to timeout

I just want to chime in and say that we too are experiencing the same issue, however, we’re experiencing it in all environments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[JENKINS-30296] Infinite loop (pooling changes continuously ...
1) Pipeline being continuously triggered on every polling window. I edited the pipeline being run to remove the import of the library, and...
Read more >
Repeat build n times in Jenkins - Stack Overflow
It is possible to create a repeated loop (not infinite) of a Jenkins job, by adding a conditional step that evaluates a $JOB_COUNTER...
Read more >
Infinite loop in DB load balancer retry logic - GitLab.org
Two possible corrective actions: Have a loop breaker to prevent infinite loops; Log when the primary host calls offline!
Read more >
[JIRA] (JENKINS-49707) Auto retry for elastic agents after ...
He suggested setting a timeout block which would retry the test run if the work does not complete within a given period. We...
Read more >
Ansible Retry Examples - Retry a task until condition met
you can write your task with any module and make it retry until a certain condition is met. Here I have used Shell...
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