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 can't connect to the browser when running Cypress 6.3 #14809

Closed
giacaglia opened this issue Jan 28, 2021 · 8 comments
Closed

Cypress can't connect to the browser when running Cypress 6.3 #14809

giacaglia opened this issue Jan 28, 2021 · 8 comments

Comments

@giacaglia
Copy link

giacaglia commented Jan 28, 2021

We've updated Cypress from version 6.0 to 6.3 and we are consistently getting a problem timing out in our CI machine. We are running Cypress on one of the Circle CI machines and we get the following message causing the response of the tests to fail even though they run:

Timed out waiting for the browser to connect. Retrying...
Warning: Cypress failed to connect to Chrome via stdio after 1 minute, 0 seconds. Falling back to TCP...
Connecting to Chrome via TCP was successful, continuing with tests.

This has happened when we updated Cypress from 6.1.0 to 6.3.0. This error is intermittent.

Current behavior

Seeing the following message when running cypress:

Screen Shot 2021-01-28 at 12 04 50 PM

Desired behavior

Just have cypress connect to the browser

Test code to reproduce

We run the command cypress run --headless --browser chrome on this docker image: https://circleci.com/developer/images/image/cimg/node with a simple test.

We do have the latest version of jest-junit, i.e. version 12.0.0

Versions

Last Cypress version that it was working 6.1.0. We are running on a docker container created from the docker image: https://circleci.com/developer/images/image/cimg/node

@andrewmclagan
Copy link

Also seeing this

@jennifer-shehane
Copy link
Member

This warning message about 'Timed out waiting for the browser to connect' is irrelevant to the error that is causing the test run to fail. The TCP connection was successful, so continued with your tests normally.

Then real error was encountered

TypeError: testcase.testcases[0]._attr.time.toFixed is not a function

This is throwing from mocha-junit-reporter. Are you using this reported in your tests? Can you provide a reproducible example.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Jan 29, 2021
@giacaglia
Copy link
Author

This warning message about 'Timed out waiting for the browser to connect' is irrelevant to the error that is causing the test run to fail. The TCP connection was successful, so continued with your tests normally.

Then real error was encountered

TypeError: testcase.testcases[0]._attr.time.toFixed is not a function

This is throwing from mocha-junit-reporter. Are you using this reported in your tests? Can you provide a reproducible example.

We are using the standard reporter, so that is mocha-junit-reporter. The reporter does not work when Cypress does not connect to the browser, and that causes the mocha-junit-reporter to fail. So there are 2 issues here:

  1. Cypress 6.3 is not connecting to the browser in some instances
  2. The standard reporter, mocha-junit-reporter, fails when Cypress does not connect to the browser

So what I think is happening is that Cypress 6.3 has a problem connecting to the browser in some instances and the mocha-junit-reporter can't use the results from Cypress when that happens

@giacaglia
Copy link
Author

@jennifer-shehane That is the same problem as others are seeing here: #14701

@giacaglia
Copy link
Author

Seems to be fixed on version 6.4.0: https://github.com/cypress-io/cypress/releases/tag/v6.4.0

Trying it out

@eduuuardo
Copy link

Oh no, I just upgraded to 6.4.0 on my local and now I only have this error.

@giacaglia
Copy link
Author

This fixed it for me

@giacaglia
Copy link
Author

Upgrade to 6.4.0

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Feb 2, 2021
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

No branches or pull requests

4 participants