Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue with missing chrome browser instance during tests #26882

Closed
wants to merge 15 commits into from
Closed

fix: issue with missing chrome browser instance during tests #26882

wants to merge 15 commits into from

Conversation

jazpearson
Copy link

Additional details

Attempts to resolve an issue with cypress that is crippling our tests runs where chrome seems to crash intermittently. This re-creates the chrome instance if it's unexpectedly null. It's a workaround, but nobody seems to know why the instance is null so trying to be pragmatic about it. Also wondering if it's worth trying an experimental feature? Either way - i wanted to see if there was a way we can get this issue fixed.

Steps to test

Really difficult to reproduce, but our cypress tests fail rouhgly 50% of the time now, even with parallelisation.

How has the user experience changed?

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@cypress
Copy link

cypress bot commented May 30, 2023

1 failed and 30 flaky tests on run #46845 ↗︎

1 27303 1308 0 Flakiness 30

Details:

fix: issue with missing chrome browser instance during tests
Project: cypress Commit: 3e4edfd573
Status: Failed Duration: 20:19 💡
Started: May 30, 2023 7:36 PM Ended: May 30, 2023 7:56 PM
Failed  cypress/e2e/runs.cy.ts • 1 failed test • app-e2e

View Output Video

Test Artifacts
App: Runs > Runs - Create Project > when a project is created, injects new projectId into the config file, and sends expected UTM params Output Screenshots Video
Flakiness  runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App: Runs > Runs - No Runs > displays a copy button and copies correct command in Component Testing Output Screenshots Video
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Output Screenshots Video
Flakiness  cypress-in-cypress-component.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress In Cypress CT > default config > redirects to the specs list with error if a spec is not found Output Screenshots Video
Flakiness  cypress-origin-communicator.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress In Cypress Origin Communicator > cy.origin passivity with app interactions > passes upon test reload mid test execution Output Screenshots Video
Flakiness  debug.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App - Debug Page > all tests passed Output Screenshots Video

The first 5 flaky specs are shown, see all 16 specs in Cypress Cloud.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jazpearson . Thank you for opening a PR. Would you be able to add a test in chrome_spec.js to help verify the expected behavior? I'll work on seeing what is going on with the builds for contributors and getting this PR to run in CI

cli/CHANGELOG.md Outdated Show resolved Hide resolved

**Bugfixes:**

- Attempts to fix an intermittent issue where chrome crashes when connecting to a new spec. Addresses [#24650](https://github.com/cypress-io/cypress/issues/24650).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know if this actually addresses the issue that you and others are running into it, or is it difficult to tell because it seems to happen sparingly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure at this point because i can't reproduce locally. It only seems to happen in our jenkins build pipeline. So it's more of a hope than a definite fix.

Co-authored-by: Bill Glesias <[email protected]>
@jazpearson
Copy link
Author

Hi @jazpearson . Thank you for opening a PR. Would you be able to add a test in chrome_spec.js to help verify the expected behavior? I'll work on seeing what is going on with the builds for contributors and getting this PR to run in CI

Sure thing. I'll do that as soon as i can.

@jazpearson
Copy link
Author

I'll try and get round to adding the test today or tomorrw...... sorry for the delay

@AtofStryker AtofStryker removed their assignment Jun 6, 2023
@jazpearson
Copy link
Author

Sorry, i'm struggling to get any proper time to look at this.

@AtofStryker
Copy link
Contributor

closing in favor of #27116 . see #24650 (comment) more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing browserCriClient in connectToNewSpec
4 participants