Skip to content

Cypress getting into an infinite XHR request loop #1068

Closed
@jackfranklin

Description

@jackfranklin

Current behavior:

When visiting a page on our site through Cypress we're seeing it never complete loading because something causes the XHR requests being made to be made infinitely.

If we look at the Cypress CLI output when running the test we see:

GET /xhr/item/alternate-colours/1606925 200 236.222 ms - -
GET /xhr/item/alternate-colours/1606925 200 456.960 ms - -
GET /xhr/item/alternate-colours/1606925 200 288.704 ms - -
GET /xhr/item/alternate-colours/1606925 200 260.936 ms - -

This request is only made by our application once; if I got to the page in a browser and watch the network tab I can see that the request is made once. Watching the test through the Cypress UI, I can see that the browser just hangs and becomes unresponsive as all these requests are firing.

I'm not sure what, but something is causing these requests to run again and again and again.

Interestingly, this only happens via cypress open and then running the test through the UI. If I do cypress run and watch the video, the test does complete and the XHR requests complete as expected.

I'm not sure what extra info is useful here but let me know what I can provide to help with this.

  • Operating System: Mac OS X Sierra
  • Cypress Version: 1.1.4
  • Browser Version: Chrome 63

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions