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: unify cdp approach to fix devtools in electron #26573

Merged
merged 20 commits into from
Apr 27, 2023

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Apr 24, 2023

Closes #15932

Additional details

Electron has issues when you attach to win.webContents.debugger where it causes devtools to get out of sync with the DOM. This can be fixed by attaching to electron in a similar fashion to how we attach to other chromium browsers. This PR makes that transition

Steps to test

  • Ensure electron tests are passing
  • Use the DOM inspector in electron and ensure that the DOM is showing up correctly

How has the user experience changed?

n/a

PR Tasks

@cypress
Copy link

cypress bot commented Apr 24, 2023

1 flaky tests on run #45892 ↗︎

0 214 19 0 Flakiness 1

Details:

Update cli/CHANGELOG.md
Project: cypress Commit: 3fbbc9daf0
Status: Passed Duration: 10:43 💡
Started: Apr 27, 2023 7:26 PM Ended: Apr 27, 2023 7:37 PM
Flakiness  cypress/e2e/config-warning.cy.ts • 1 flaky test • launchpad-e2e

View Output Video

Test Artifacts
baseUrl > should add baseUrl warning when going from good to bad config Output Screenshots Video

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

@ryanthemanuel ryanthemanuel changed the title feat: unify cdp approach in electron chore: unify cdp approach in electron Apr 24, 2023
@ryanthemanuel ryanthemanuel changed the title chore: unify cdp approach in electron fix: unify cdp approach in electron to fix devtools in electron Apr 24, 2023
@ryanthemanuel ryanthemanuel changed the title fix: unify cdp approach in electron to fix devtools in electron fix: unify cdp approach to fix devtools in electron Apr 24, 2023
@ryanthemanuel ryanthemanuel marked this pull request as ready for review April 24, 2023 17:18
cli/CHANGELOG.md Outdated
@@ -11,6 +11,7 @@ _Released 04/25/2023 (PENDING)_

- Fixed an issue where setting `videoCompression` to `0` would cause the video output to be broken. `0` is now treated as false. Addresses [#5191](https://github.com/cypress-io/cypress/issues/5191) and [#24595](https://github.com/cypress-io/cypress/issues/24595).
- Fixed an issue on the [Debug page](https://on.cypress.io/debug-page) where the passing run status would appear even if the Cypress Cloud organization was over its monthly test result limit. Addresses [#26528](https://github.com/cypress-io/cypress/issues/26528).
- Fixed an issue in Electron where devtools gets out of sync with the DOM occasionally. Addresses [#15932](https://github.com/cypress-io/cypress/issues/15932).
Copy link
Member

Choose a reason for hiding this comment

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

lets move this up. this is more important than videoCompression

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll refactor this after the release today.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This has been refactored

@lmiller1990
Copy link
Contributor

I tested this out, it does indeed fix #15932

We could consider making the default browser electron - since it's the only one guaranteed to be on all systems. I believe this was the intention and how older Cypress versions worked, but we changed it due to this bug.

Either way, very excited to see this this is finally fixed!

cli/CHANGELOG.md Outdated Show resolved Hide resolved
@ryanthemanuel ryanthemanuel merged commit 8ed09aa into develop Apr 27, 2023
@ryanthemanuel ryanthemanuel deleted the ryanm/feat/unify-cdp-approach-in-electron branch April 27, 2023 19:40
ryanthemanuel added a commit that referenced this pull request May 1, 2023
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: astone123 <adams@cypress.io>
Co-authored-by: Mark Noonan <mark@cypress.io>
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
Co-authored-by: Mike Plummer <mikep@cypress.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Stokes Player <stokes.player@gmail.com>
Co-authored-by: Stokes Player <stokes@cypress.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Stone-Lord <adams@cypress.io>
Co-authored-by: Ben M <benm@cypress.io>
Co-authored-by: Jordan <jordan@jpdesigning.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
fix: Treat Video compression 0 as false.  (#26503)
fix: don't display run passing status if Cloud org is over run limit (#26533)
fix: unify cdp approach to fix devtools in electron (#26573)
tgriesser added a commit that referenced this pull request May 3, 2023
* feat/protocol:
  refactor: migrate from windi to tailwind (#26516)
  chore: update v8 generation vars so that from scratch depends implies updating the metafile (#26472)
  chore: Update Vite to 4.3.0 (#26553)
  fix: unify cdp approach to fix devtools in electron (#26573)
  dependency(deps): update dependency deps-ok to v1.4.1 🌟 (#26612)
  chore: update 12.11.0 release date (#26587)
  chore: 12.11.0 release (#26582)
  chore: implement experimental ESM stub/spy for Vite (#26536)
  chore: try triggering mouseleave on buttons to ensure that tooltips aren't showing (#26524)
  chore: add support for Angular 16 (#26052)
  chore: upgrade Vue to 3.2.47 (#26555)
  chore: Update v8 snapshot cache (#26537)
  chore: add missing utm parameters for cloud links to Debug page (#26556)
  chore: update stalebot to respect new labels and up process rate (#26552)
  fix: don't display run passing status if Cloud org is over run limit (#26533)
  chore: update vm2 to 3.9.17 (#26534)
  feat: display a limit warning on the run navigation component when there are 100 total runs (#26523)
  chore: Update v8 snapshot cache (#26476)
  chore: upgrade vm2 (#26495)
  fix: Treat Video compression 0 as false.  (#26503)
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 12, 2023

Released in 12.12.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.12.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chromium Devtools bug when using Electron
5 participants