Skip to content

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

Merged
jennifer-shehane merged 1 commit into
cypress-io:developfrom
CamilleDrapier:develop
Feb 14, 2024
Merged

jennifer-shehane merged 1 commit into
cypress-io:developfrom
CamilleDrapier:develop

Conversation

@CamilleDrapier

@CamilleDrapier CamilleDrapier commented Feb 2, 2024 •

Copy link
Copy Markdown
Contributor

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

CLAassistant commented Feb 2, 2024 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot

Copy link
Copy Markdown
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 force-pushed the develop branch 4 times, most recently from 6e90546 to a61aca2 Compare February 2, 2024 09:09
@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
Copy Markdown
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
@cypress-bot

cypress-bot Bot commented Feb 20, 2024

Copy link
Copy Markdown
Contributor

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.

6 participants