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

Corrupted ZIP, no re-download occurs #117169

Closed
oldium opened this issue Feb 21, 2021 · 3 comments
Closed

Corrupted ZIP, no re-download occurs #117169

oldium opened this issue Feb 21, 2021 · 3 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@oldium
Copy link

oldium commented Feb 21, 2021

  • VS Code Version: 1.53.2 (user setup)
  • OS Version: Windows 10 1909 build 18363.1316

Steps to Reproduce:

  1. Have HTTP proxy with authentication.
  2. Start VS Code and let auto-download try to install extension update.
  3. Observe the „Corrupt ZIP: end of central directory record signature not found“ message.
  4. Close VS Code.
  5. Authenticate the proxy in normal browser.
  6. Start VS Code and try to install the update again.
  7. Immediately you see the „Corrupt ZIP: end of central directory record signature not found“.

Does this issue occur when all extensions are disabled?: Yes

Root-cause analysis

The problem is that the invalid file got downloaded and kept in place. I found file c:\Users\<user>\AppData\Roaming\Code\CachedExtensionVSIXs\ms-python.python-2021.2.582707922 with the following content:

<html>
<body onload="document.forms[0].submit()">
<noscript>
<p>        You will be redirected to a ....
        </p>
</noscript>
<form action="..." method="post">
<input type="hidden" name="RelayState" value="..."/>
<input type="hidden" ... value="..."/>
<noscript>
<input type="submit" value="Continue"/>
</noscript>
</form>
</body>
</html>

This file was re-used while retrying to update the extension. Even after uninstalling and trying to install the extension again the problem persisted.

Invalid downloaded files could be kept after download for investigation, but they should be re-downloaded when trying to update again. Solution could be to rename the downloaded file to something else (add “corrupted” prefix/suffix) when corruption is detected for example.

@joaomoreno
Copy link
Member

@sandy081 This is a good suggestion. Invalid VSIX downloads should not be cached.

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions labels Feb 24, 2021
@sandy081 sandy081 added this to the March 2021 milestone Feb 24, 2021
@sandy081 sandy081 modified the milestones: March 2021, April 2021 Mar 25, 2021
@sandy081 sandy081 modified the milestones: April 2021, May 2021 Apr 26, 2021
@sandy081 sandy081 modified the milestones: May 2021, Backlog Jun 3, 2021
@sandy081 sandy081 modified the milestones: Backlog, September 2021 Sep 23, 2021
@sandy081 sandy081 added the author-verification-requested Issues potentially verifiable by issue author label Sep 23, 2021
@connor4312
Copy link
Member

Verified via code review

@connor4312 connor4312 added the verified Verification succeeded label Oct 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@joaomoreno @oldium @connor4312 @sandy081 and others