astral-sh / ruff-vscode

A Visual Studio Code extension with support for the Ruff linter.
Other
946 stars 45 forks source link

CorruptZip Windows x64 Code Extension Installation #421

Open plattenschieber opened 4 months ago

plattenschieber commented 4 months ago

Hey all,

I'm struggling to install the current version(s) of Ruffs vscode extension. I downloaded the vsix file over corporate proxy and directly and always resulted in a file size of 8836068 bytes, which differs from the reported uploaded size in your release CI. I've seen that this not something to bother with

Note: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads 

but how can we then ensure that the uploaded file is still installable correctly? For me this currently results always in the following error (regardless whether I install over the UI or CLI):

code --install-extension ~/Downloads/charliermarsh.ruff-2024.14.0\@win32-x64.vsix 
Installing extensions...
(node:24912) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use `Code --trace-deprecation ...` to show where the warning was created)
CorruptZip: end of central directory record signature not found
    at u.download (C:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\cliProcessMain.js:38:192)
    at async H.x (C:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\cliProcessMain.js:56:79094)
    at async H.h (C:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\cliProcessMain.js:56:76819) {
  code: 'CorruptZip'
}
Failed Installing Extensions: file:///c%3A/Users/xxx/Downloads/charliermarsh.ruff-2024.14.0%40win32-x64.vsix

I'm not sure whether it's within my reach of possibilities to fix this, but I haven't found the underlying issue yet. Here is my VSCode version. The ruff extension version is 2024.14.0

code --version
1.87.0
019f4d1419fbc8219a181fab7892ebccf7ee29a2
x64

Any help would be greatly appreciated.