question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some XHRs loop infinitely since 3.3.1

See original GitHub issue

Current behavior:

I noticed the some of our API, mainly XHR requests were continuously getting looped indefinitely when i upgraded Cypress from 3.2.0 to 3.3.0. So we rolled it back. Now we hit some other bugs, for which we wanted to upgrade to Cypress 3.3.1, once again i am getting a similar issue.

  1. For some of the tests some XHR requests are loading indefinitely.
  2. The Timer is not incrementing
  3. The Test Runner is not responding
cypress_1 cypress_2 cypress_3
------------ Configuration -------
{
animationDistanceThreshold: 5,
baseUrl: null,
blacklistHosts: null,
chromeWebSecurity: true,
defaultCommandTimeout: 20000,
env: {
CLIENT: 'demoaccount',
failOnSnapshotDiff: false},
execTimeout: 60000,
fileServerFolder: '',
fixturesFolder: 'cypress/fixtures',
hosts: null,
integrationFolder: 'cypress/integration',
modifyObstructiveCode: true,
numTestsKeptInMemory: 1,
pageLoadTimeout: 60000,
pluginsFile: 'cypress/plugins',
port: null,
reporter: 'spec',
reporterOptions: null,
requestTimeout: 5000,
responseTimeout: 30000,
screenshotsFolder: 'cypress/screenshots',
supportFile: 'cypress/support',
taskTimeout: 60000,
testFiles: '**/*.{spec.js,feature}',
trashAssetsBeforeRuns: true,
userAgent: null,
video: true,
videoCompression: 32,
videoUploadOnPasses: true,
videosFolder: 'cypress/videos',
viewportHeight: 660,
viewportWidth: 1000,
waitForAnimations: true,
watchForFileChanges: true}
-----------

Scenario failing- Validating the time/date picker yields a correct date in the calendar while scheduling email message (we are using cucumber library)

Desired behavior:

Things are fine in 3.2.0, except some known issues like forwarding of socket failures related error in HTTP api level, which causes some parse error (Internal Error 500) in cypress.

Steps to reproduce: (app code and test code)

I am sharing some snippet of the login code, which we use to login.

Cypress.Commands.add(
	'login',
	{
		prevSubject: 'true'
	},
	(client, user) => {
		cy.logout();
		return cy.visit(`${BASE_URL}`).then(() => {
			return cy.getCookie('csrftoken').then(({ value }) => {
				return cy
					.request({
						url: `${client.url}/accounts/login`,
						form: true,
						method: 'POST',
						body: {
							username: client.users[user].email,
							password: client.users[user].password,
							csrfmiddlewaretoken: value
						}
					})
					.then(() => client);
			});
		});
	}
);

Versions

cypress - 3.3.1 electron - 61 OS - Mac OS Mojave 10.14.5

Attachments

cy_3.3.0_debug.log cy_3.3.1_debug.log


During my re-testing with version 3.3.2 i can see the same issue is occurring again and i confirm that this occurs only in electron.

One of the calls that (XHR) that kept looping was mark_as/ . I am attaching a HAR dump file for the network requests during the test. I hope that would be useful.

cypress.har.txt

p.s. Please rename cypress.har.txt to cypress.har if your HAR analyser needs that.

_Originally posted by @joydeep100 in https://github.com/cypress-io/cypress/issues/4411#issuecomment-507124618_

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joydeep100commented, Jul 30, 2019

@flotwig @jennifer-shehane This issue got fixed in 3.4.1. I have tested it and works properly. Please close this.

0reactions
rangrasjaycommented, Jul 31, 2019

Facing the same issue in 3.4.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

XMLHttpRequest() infinite loop - javascript - Stack Overflow
It is working accept that the script continues to run after the result of "6". You need to move the re-calling of the...
Read more >
Changelog - Cypress Documentation
Applications using custom elements will no longer trigger infinite XHR request loops. Fixes #1068. When snapshotting the DOM, Cypress no longer causes ...
Read more >
Firmware release notes 3.x - SpinetiX Support Wiki
Some players could fail to update firmware from SpinetiX repository ... Infinite loop (causing HMP to crash) could be triggered if a wrong ......
Read more >
Changelog - Graylog
Fix close button on some modal UI components. graylog2-server#12479 ... Fix infinite redirect loop when accessing non-permitted resources/entities.
Read more >
Changelog | Meteor API Docs
If we receive reports from breaking changes we are going to list them here but so far we are not aware of any....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found