Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Conversation

@mxstbr
Copy link
Contributor

@mxstbr mxstbr commented Apr 12, 2018

Status

  • WIP
  • Ready for review
  • Needs testing

Todo

  • Make it work
  • Make all tests pass
  • Update testing docs

@spectrum-bot
Copy link

spectrum-bot commented Apr 13, 2018

Warnings
⚠️

These modified files do not have Flow enabled:

  • src/helpers/events.js

Generated by 🚫 dangerJS

@mxstbr
Copy link
Contributor Author

mxstbr commented Apr 13, 2018

@brian-mann Cypress crashes when trying to run the tests on this branch with this error:

{ Error: socket hang up
    at createHangUpError (_http_client.js:345:15)
    at Socket.socketCloseListener (_http_client.js:377:23)
    at emitOne (events.js:120:20)
    at Socket.emit (events.js:210:7)
    at TCP._handle.close [as _onclose] (net.js:549:12)
 code: 'ECONNRESET' }

...which is not very helpful 😉 I'm trying to run the integration tests against our server-side rendering server, instead of our development setup, and it all seems to be working fine except for Cypress immediately crashing when starting to run tests.

Any clues why that's happening?

@mxstbr mxstbr mentioned this pull request Apr 13, 2018
1 task
@brian-mann
Copy link

@mxstbr didn't see this comment until now. Is this still happening? Does it happen every time?

I see this in circle once here: https://circleci.com/gh/withspectrum/spectrum/3575?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

What else can you tell me about this? This is likely happening from the server closing the socket connection but that an error handler isn't being handled correctly in Cypress. Thus it crashes instead of either gracefully handling the error or retrying.

@brian-mann
Copy link

@mxstbr if you see that it's still failing... add the DEBUG flag so that Cypress outputs all the logs..

DEBUG=cypress:* cypress run

That'll help pin down where it is failing

@mxstbr
Copy link
Contributor Author

mxstbr commented Apr 22, 2018

@brian-mann no worries, thank you for taking a look at this! I added that in the last commit, you can see the full logs here: https://circleci.com/gh/withspectrum/spectrum/4450

Does anything stick out to you right before the crash?

@brian-mann
Copy link

It's failing inside the browser when starting to run the tests - there is what appears to be an unhandled low level (likely net.connect) error being thrown - my guess is with the websocket connection... it appears right around the CONNECT request for /websocket.

Let me see if I can clone this branch and repro in either osx or docker...

Other users have reported a similar error but we've never been able to repro because it's likely a perfect storm of situations - and it could honestly be something with your server - but regardless error handling is something that is always up to Cypress to facilitate. Even in the case when its your server, we should still gracefully handle them and provide enough error context. This isn't happening in this case.

@mxstbr
Copy link
Contributor Author

mxstbr commented Apr 22, 2018

Ohh I think I know what this is based on your description—our own app websocket connection fails when running the server-side rendered site locally, that could be it?!

If so, that should a) not crash Cypress and b) that error should be much more helpful 😉

@brian-mann
Copy link

I can reproduce locally. We can finally get this bug squashed.

I believe its the same root issue as what this PR is fixing. Need to do some work on it before merging...

cypress-io/cypress#1382

@mxstbr
Copy link
Contributor Author

mxstbr commented Apr 22, 2018

I'll try and get that bug resolved so that websockets work locally when running against the SSR'd site, but I'm not yet sure whether I can. Will dig in!

@mxstbr
Copy link
Contributor Author

mxstbr commented Apr 27, 2018

@brian-mann I see that PR was merged! 😻 Any chance we could get a new release of Cypress so we can take advantage of that?

@mxstbr
Copy link
Contributor Author

mxstbr commented May 31, 2018

Picking this up now that Cypress 3.0 is out! Let's see if I can make this work ✌️

@spectrum-bot
Copy link

spectrum-bot bot commented Jun 7, 2018

Warnings
⚠️

These modified files do not have Flow enabled:

  • config-overrides.js
  • src/components/buttons/index.js

Generated by 🚫 dangerJS

@mxstbr
Copy link
Contributor Author

mxstbr commented Jun 7, 2018

Oh my god after merging in #3248 this actually kinda works! Some test failures left but it's getting there!

@mxstbr mxstbr mentioned this pull request Jun 15, 2018
12 tasks
@mxstbr
Copy link
Contributor Author

mxstbr commented Jun 15, 2018

Replaced by #3334!

@mxstbr mxstbr closed this Jun 15, 2018
@mxstbr mxstbr deleted the integration-against-hyperion branch June 15, 2018 13:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants