Skip to content

Setting debugger in local develop locks up Chrome #7428

New issue

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

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

Already on GitHub? # to your account

Closed
jennifer-shehane opened this issue May 20, 2020 · 5 comments · Fixed by #7525
Closed

Setting debugger in local develop locks up Chrome #7428

jennifer-shehane opened this issue May 20, 2020 · 5 comments · Fixed by #7525
Labels
process: contributing Related to contributing to the Cypress codebase type: chore Work is required w/ no deliverable to end user v4.1.0 🐛 Issue present since 4.1.0

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 20, 2020

Current behavior:

I've had this problem for quite some time, at least a couple months.

Whenever I set a debugger when pulling down develop from the Cypress code base, run the code, then do a hard refresh, the Google Chrome Helper (Renderer) process locks up and I have to kill the Chrome process completely.

There is no way to hit Resume in the debugger. This makes it extremely difficult to work on anything you're developing in the actual product.

@bkucera also reported this previously:

yes I get that too, going to see if it's a newer chrome problem. I use shift+esc then enter, then reload the page

And Brian remarked that he had seen this behavior when pairing with @chrisbreiding.

Screen Shot 2020-05-20 at 1 00 58 PM

Desired behavior:

Test code to reproduce

  • Pull down develop
  • Run yarn
  • Run yarn start
  • Run a project that has a debugger in the code with DevTools open like the code below.
  • Hard refresh
  • Check CPU, you will see it skyrocket and it becomes impossible to resume the debugger.

index.html

<html>
<body>
  <script>
    debugger
  </script>
</body>
</html>

spec.js

it('visit', () => {
  cy.visit('index.html')
})

Versions

4.5.0
macOS Catalina
Chrome 81.0.4044.138

@jennifer-shehane jennifer-shehane added type: chore Work is required w/ no deliverable to end user process: contributing Related to contributing to the Cypress codebase labels May 20, 2020
@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label May 20, 2020
@jennifer-shehane
Copy link
Member Author

I tried passing NO_LIVERELOAD=1 to turn off live reload, but this did not change the behavior.

@jennifer-shehane
Copy link
Member Author

I've narrowed this down to a regression in 4.1.0. The 4.0.2 tag locally does not encounter this issue. The 4.1.0 tag locally does encounter this issue.

Commits within 4.1.0: v4.0.2...v4.1.0

I further narrowed down the issue to this commit, with the previous commit having no issue:

So this was introduced in #6522

@jennifer-shehane jennifer-shehane added the v4.1.0 🐛 Issue present since 4.1.0 label May 29, 2020
@jennifer-shehane
Copy link
Member Author

jennifer-shehane commented May 29, 2020

Alright, after looking through the commits in #6522, I've further narrowed down the issue to the changed made in the packages/runner.

Specifically the upgrade of react-dom from 16.8.6 to 16.12.0. If you downgrade this in the current develop of Cypress, you'll see this issue no longer occurs.

It seems this was a bug in react-dom actually introduced in 16.9.0 and not fixed in their current version of React (Although I’m inclined to think it’s likely a Chromium bug that is not playing nicely with React).

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: needs investigating Someone from Cypress needs to look at this labels May 29, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 30, 2020

The code for this is done in cypress-io/cypress#7525, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label May 30, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 8, 2020

Released in 4.8.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 8, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
process: contributing Related to contributing to the Cypress codebase type: chore Work is required w/ no deliverable to end user v4.1.0 🐛 Issue present since 4.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant