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

Blank page & Timed out waiting for the browser to connect. Retrying... #4246

Closed
mattensor opened this issue May 19, 2019 · 11 comments
Closed

Comments

@mattensor
Copy link

mattensor commented May 19, 2019

Hey there,
I'm having a little difficulty running Cypress and am looking for some help :)

When I run npx cypress open and attempt to run the suite using electron 59 or chrome 74 I get a blank page. When I check network requests for the page the html and cypress runner loads fine but the upgrade to web socket does not respond.

When I run npx cypress run this is what I get

Timed out waiting for the browser to connect. Retrying...
Timed out waiting for the browser to connect. Retrying again...
The browser never connected. Something is wrong. The tests cannot run. Aborting...

  (Results)

  ┌─────────────────────────┐
  │ Tests:        0         │
  │ Passing:      0         │
  │ Failing:      1         │
  │ Pending:      0         │
  │ Skipped:      0         │
  │ Screenshots:  0         │
  │ Video:        true      │
  │ Duration:     0 seconds │
  │ Spec Ran:     signup.js │
  └─────────────────────────┘

I've tried reinstalling cypress a number of times and the Cypress tests run fine on other developers machines.

Node version v10.15.3
Npm version 6.4.1
Cypress Version 3.2.0
Mac OS Mojave 10.14.4

any suggestions or ideas would be great!

@bahmutov
Copy link
Contributor

bahmutov commented May 19, 2019 via email

@mattensor
Copy link
Author

I just upgraded to 3.3.0, still having the same issue

@jennifer-shehane
Copy link
Member

@mattensor Sorry to hear it's not connecting.

Can you provide a reproducible example that we can run? It likely has something to do with the url you are attempting to visit during cy.visit() (can email url to [email protected] if you do not want public).

Also a screenshot of the 'blank page' on cypress open would be helpful. Can you make sure to open the devtools on screenshot to see any errors?

During cypress open - print DEBUG logs and paste here also: https://on.cypress.io/debugging#Print-DEBUG-logs

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label May 20, 2019
@mattensor
Copy link
Author

Thanks so much for your help @jennifer-shehane .

I have some screenshots for you. It seems the websocket upgrade request is timing out, and it's not even getting to my actual cypress tests.

Screen Shot 2019-05-23 at 7 46 34 am
Screen Shot 2019-05-23 at 7 45 35 am
Screen Shot 2019-05-23 at 7 45 51 am

Any help you can give would be really appreciated :)

@tijnster
Copy link

Facing the same issue.. Electron locally works fine, when trying remote from gitlab CI it cannnot connect..

@jennifer-shehane
Copy link
Member

@tijnster I believe your issue is likely different since it is isolated to GitLab CI run. Could you open a new issue with as much information as possible?

@mattensor We've seen some similar issues in the past, which they were able to resolve through some debugging or they never provided a way to reproduce.

Can you try some of our troubleshooting techniques? Logging DEBUG logs or clearing App Data?

Are you behind a proxy? Have you configured the proxy?

@tijnster
Copy link

@jennifer-shehane Sure, will do!

@mattensor
Copy link
Author

When I run cypress with debug here is what I get

cypress:server:server Got CONNECT request from localhost:55871 +21s
  cypress:https-proxy Writing browserSocket connection headers { url: 'localhost:55871' } +21s
  cypress:server:server HTTPS request does not match URL: https://localhost:55871 with props: null +0ms
  cypress:https-proxy Making connection to localhost:55871 +1ms
  cypress:network:connect received error on connect, retrying { iteration: 0, delay: 0, err: { Error: connect ECONNREFUSED ::1:55871 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 55871 } } +894ms

I have cleared App data & the same problem still persists.

@saas2813
Copy link

I got logs similar to these. The problem was that my

/etc/hosts

file did not include a line:

127.0.0.1 localhost

@mcntsh
Copy link

mcntsh commented Sep 11, 2019

@mattensor did you ever get a solve for this? I'm facing the exact same issue.

@mattensor
Copy link
Author

I needed to include 127.0.0.1 localhost in my host file

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Jan 6, 2020
@cypress-io cypress-io locked and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants