Skip to content
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

fix: Hanging indefinitely when unzip fails with an empty error #28850

Merged
merged 1 commit into from Feb 14, 2024

Conversation

CamilleDrapier
Copy link
Contributor

@CamilleDrapier CamilleDrapier commented Feb 2, 2024

It seems the promise for trying to unzip with Node extract was not always either resolved or rejected. There shouldn't be a case where this shouldn't be done once the fallback has been tried.

Additional details

Sometimes on my CI, I see the following log:

2024-02-02T05:07:52.724Z cypress:cli expected file size 183022418
2024-02-02T05:07:54.537Z cypress:cli downloading finished
2024-02-02T05:07:54.537Z cypress:cli only checking expected file size 183022418
2024-02-02T05:07:54.538Z cypress:cli downloaded file has the expected size ✅
2024-02-02T05:07:54.538Z cypress:cli verified
2024-02-02T05:07:54.538Z cypress:cli finished downloading file: /tmp/cypress-262.zip
[SUCCESS] Task without title.
[STARTED] Task without title.
2024-02-02T05:07:54.539Z cypress:cli:unzip unzipping from /tmp/cypress-262.zip
2024-02-02T05:07:54.539Z cypress:cli:unzip into /root/.cache/Cypress/13.6.2
2024-02-02T05:07:54.541Z cypress:cli:unzip zipFile entries count 21852
2024-02-02T05:07:54.541Z cypress:cli:unzip unzipping via `unzip`
2024-02-02T05:07:54.544Z cypress:cli:unzip unzip tool error: spawn unzip ENOENT
2024-02-02T05:07:54.544Z cypress:cli:unzip unzipping with node.js (slow)
2024-02-02T05:07:54.544Z cypress:cli:unzip calling Node extract tool /tmp/cypress-262.zip { dir: '/root/.cache/Cypress/13.6.2', onEntry: [Function: tick] }
2024-02-02T05:07:54.545Z cypress:cli:unzip unzip tool close with code -2
2024-02-02T05:07:54.545Z cypress:cli:unzip `unzip` failed { code: -2 }

In those cases, the CI stays stuck until a timeout is reached, but there shouldn't be any reason to not reject the unzip promise when no more recovery is possible.

Steps to test

n/a

How has the user experience changed?

n/a

PR Tasks

@CLAassistant
Copy link

CLAassistant commented Feb 2, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@CamilleDrapier CamilleDrapier changed the title Fix: Hanging indefinitely when unzip fails with an empty error fix: Hanging indefinitely when unzip fails with an empty error Feb 2, 2024
@CamilleDrapier CamilleDrapier marked this pull request as draft February 2, 2024 09:40
@CamilleDrapier CamilleDrapier marked this pull request as ready for review February 2, 2024 09:40
@jennifer-shehane
Copy link
Member

@CamilleDrapier Thank you for the contribution. We'll give this a look over when we can.

@mschile mschile self-requested a review February 13, 2024 16:38
@jennifer-shehane jennifer-shehane merged commit 7c4d941 into cypress-io:develop Feb 14, 2024
68 checks passed
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 20, 2024

Released in 13.6.5.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.5, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants