-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Spying on XHR request fails on Travis, but runs on Mac fine #1201
Comments
I have similar problem on circleci, cypress 2.1.0, test 1 :
test 2 and following:
Everything works well locally, tests pass 100%, even with cli --headed, but fail 100% in circleci Screenshots: |
I have a possible related issue, where on response with a 200 status the XHR POST request shows as "aborted" and the XHR status property reads "readyState" 0. However, the request goes through as verified in the network tab AND the upper "Status:" output if you click on the call. The post response has a body of "" (nothing in there) which I THINK might be the issue? This is still a valid 200 response and should not show as failed. |
I have been able to replicate this outside of CI. I ran a test in Chrome, received an empty response body, though a response code was 201. Request came through, so problem points to Cypress. I was able to replicate this in CI too, it seems to me that on on CI this happens more often, so I’m thinking if this could be some case of race condition. |
I'm currently experiencing an issue where all of my wait for xhr's are failing on CircleCI with 3.0.1 and the chrome65-ff container. I can't reproduce locally. Is there any extra amount of logging I could configure when the test runs and capture the output into a build artifact that would be beneficial? Perhaps like a network request/response log? |
@bsmithEG do they sometimes fail or always? when did this start happening? |
So on #1716 I discovered even though I thought I was running Chrome on CircleCI, I was actually running electron, do to misusage of command line arguments. It seems like passing in invalid parameters to the cypress command line simply runs the default I'll report back after I run a few CI runs to make sure it's related to something else (Electron usage) -- edit: I spoke to soon, but I'll update again after a few runs (doesn't seem to be working with Chrome either) |
@bsmithEG What were the invalid parameters that you were sending to |
Closing as resolved. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Current behavior:
On Mac a test that sets up XHR spy (from test spec) can spy on it. On Travis it fails to get the response. See https://dashboard.cypress.io/#/projects/9fap2d/runs/20b0cf0a-828b-4992-b7cf-25dfd71625cf/screenshots
Desired behavior:
Be able to run this test on Travis
How to reproduce:
Take repo https://github.com/bahmutov/cypress-form-data-with-file-upload and look at spec.js https://github.com/bahmutov/cypress-form-data-with-file-upload/blob/777f6df8725985d2dfcb410b375f45ed59b55cd4/cypress/integration/spec.js#L38
Test code:
Additional Info (images, stack traces, etc)
Fails on Travis
Runs fine on Mac (both in Electron and in Chrome)
I did not have time to run local Docker image or try Chrome on Travis
The text was updated successfully, but these errors were encountered: