before update to Chrome 73, everything was running fine. Since update Cypress fails, timeout, does not connect to Chrome it seems
just update Chrome and relaunch.
Cypress 3.1.5
Chrome 73
Linux, Mac OS X
Hey @streamnsight, could you provide an example of the test code you are running when you experience this?
Last time we had an issue, it was Cypress not connecting to Chrome at all.
This time, it seems linked to our upload command.
The code goes like this to simulate a browser event:
cy.get(selector).then(subject =>
cy
.fixture(fileName, 'base64')
.then(Cypress.Blob.base64StringToBlob)
.then(blob => {
const el = subject[0];
const testFile = new File([blob], fileName, {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
const dataTransfer = new DataTransfer();
dataTransfer.items.add(testFile);
el.files = dataTransfer.files;
})
);
it then waits for the POST api call to happen (registered as an alias) and now it just waits, but the POST never happens, so this code doesn't work anymore.
cy.get(selector).then(subject =>
cy
.fixture(fileName, 'base64')
.then(Cypress.Blob.base64StringToBlob)
.then(blob => {
const el = subject[0];
const testFile = new File([blob], fileName, {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
const dataTransfer = new DataTransfer();
dataTransfer.items.add(testFile);
el.files = dataTransfer.files;
el.dispatchEvent(new Event('change', { bubbles: true }));
// ^^^ adding this line seems to fix it.
})
);
thanks @streamnsight that solution worked well to me, I was having the issue running cypress tests in docker, so you saved me
Most helpful comment