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

Cypress hangs during cypress open and cypress run after opening browser (4.6.0) #7464

Closed
chrisbreiding opened this issue May 22, 2020 · 5 comments · Fixed by #7485
Closed
Assignees
Labels
existing workaround type: regression A bug that didn't appear until a specific Cy version release v4.6.0 🐛 Issue present since 4.6.0

Comments

@chrisbreiding
Copy link
Contributor

chrisbreiding commented May 22, 2020

Current behavior:

Running tests hangs.

With cypress run, it times out having never begun the first test.

Screen Shot 2020-05-21 at 9 44 20 PM

With cypress open, the Test Runner browser opens, but the test doesn't start running for 30+ minutes. It appears blank.

Screen Shot 2020-05-21 at 10 02 11 PM

The culprit seems to be this line. Surrounding it with console.time/timeEnd results in it taking over 30 minutes to run.

Test code to reproduce

This can be seen in the Cypress Dashboard internal tests. Still trying to narrow it down to an easily reproducible (and publicly-postable) case.

Versions

Cypress 4.6.0

Current Workaround

Downgrade to Cypress 4.5.0.

@jennifer-shehane
Copy link
Member

I have what I believe to be the same issue with a smaller repro from #7453

This takes a full 10+ seconds to load the first test during cypress run or cypress open in Cypress regardless of version (not 4.6.0 related). I'm not using any preprocessor with that run. The increased time occurs when importing the aws-amplify modules.

In 4.6.0 - when including the @cypress/webpack-preprocessor v5.4.1 (will all required peer deps) it causes the Test Runner to never load and runs up my CPU over 100% with the Cypress process.

Again, the Test Runner runs completely fine when I remove the aws-amplify import statement from the support file.

support/index.js

import { Auth } from 'aws-amplify'

spec.js

it('Loads the homepage', function () {
  cy.visit('index.html')
});

index.html

<html>
<body>
</body>
</html>

package.json

{
  "name": "my-application",
  "version": "1.2.3",
  "scripts": {},
  "dependencies": {},
  "devDependencies": {
    "@babel/core": "^7.9.6",
    "@babel/preset-env": "^7.9.6",
    "@cypress/webpack-preprocessor": "^5.4.1",
    "aws-amplify": "^3.0.12",
    "babel-loader": "^8.1.0",
    "cypress": "4.6.0",
    "webpack": "^4.43.0"
  }
}

Seems to stall at this DEBUG log:

  cypress:server:run browser launched +1s
  cypress:browserify finished bundling: /Users/jennifer/Library/Application Support/Cypress/cy/production/projects/cypress-transform-test-74d5161f4a1005f86b0d85a657ddcf07/bundles/cypress/integration/spec.js +510ms
  cypress:server:controllers:spec sending spec { filePath: '/Users/jennifer/Library/Application Support/Cypress/cy/production/projects/cypress-transform-test-74d5161f4a1005f86b0d85a657ddcf07/bundles/cypress/integration/spec.js' } +558ms

@jennifer-shehane jennifer-shehane changed the title Cypress run hangs (4.6.0) Cypress hangs during cypress open and cypress run after opening browser (4.6.0) May 26, 2020
@cypress-bot cypress-bot bot added stage: investigating Someone from Cypress is looking into this and removed stage: needs investigating Someone from Cypress needs to look at this labels May 26, 2020
@fsteinbauer
Copy link

@jennifer-shehane, thanks for investigating.

We are facing a similar startup issue when upgrading to cypress 4.6.0. However, we don't use the aws-amplify package in our project.

You added the label existing workaround. Is this workaround currently to downgrade back to cypress 4.5.0?

@flotwig
Copy link
Contributor

flotwig commented May 26, 2020

@chrisbreiding is it catastrophic backtracking from the regex? I don't think you need regexCommentStyle1 according to the spec:

image

https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: investigating Someone from Cypress is looking into this labels May 26, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels May 26, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 26, 2020

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

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 26, 2020

Released in 4.7.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
existing workaround type: regression A bug that didn't appear until a specific Cy version release v4.6.0 🐛 Issue present since 4.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants