Vscode-vsce: Getting `extension package is malformed/corrupted` when publishing new version of extension.

Created on 16 Feb 2017  Â·  8Comments  Â·  Source: microsoft/vscode-vsce

$ node --version
v7.5.0

$ npm --version
4.1.2

$ vsce --version
1.18.0

$ vsce publish 0.3.1
Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish /Users/rictic/open/vscode-plugin
> tsc -p ./

Publishing [email protected]...
Error: Failed Request: Bad Request(400) - Extension package is malformed/corrupted

Things I've tried:

  • vsce package then installing the .vsix file, confirming that it has the new functionality in v0.3.1, as well as the updated changelog and other metadata.
  • vsce logout polymer then vsce login polymer
  • Tried with node v4 and node v7.

I'm trying to publish this project at master (90046d2): https://github.com/Polymer/vscode-plugin

Most helpful comment

Hi @rictic @mkloubert , we analyzed this and found that the vsix packages being uploaded were inadvertently greater than 20 MB (which is the current limit for packages ) ; however, due to a bug, they were being reported as a different error. This also explains the behavior with the clean repo.

We will get the error-reporting fixed. Thanks for reporting, and sorry for the inconvenience.

All 8 comments

I couldn't build your project. Here's what I got after npm install:

vscode-plugin master → vsce package
Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish /Users/joao/Desktop/vscode-plugin
> tsc -p ./ || echo ''

Error: Command failed: npm list --production --parseable --depth=99999
npm ERR! missing: @types/node@^4.0.30, required by [email protected]

Huh, that's strange. What version of node and npm are you using? Here's a full log of cloning, installing, and packaging the polymer plugin using the configuration mentioned above (node v7.5.0 etc): https://gist.github.com/rictic/3b617e71d4bb434eed0f8fa3cf14cdbe

Regarding that specific error, the dependencies seem to be correctly specified in package.json files:

Huh. However, when I ran vsce publish patch from the fresh clone it succeeded! So, that solves the problem from my end, though I'm not really sure why it failed before or succeeded now. I'll leave it to you to close this issue or keep it open.

I had the same problem:

I wanted to publish a new version of my extension vs-deploy by executing

vsce publish

I got a similar message:

Publishing [email protected]...
Error: Failed Request: Bad Request(400) - Extension package is malformed/corrupted

After I did a fresh clone of my repository (and executed the same "publish command") it works now.

Is there a way to get more information of why publishing of an extension fails?

@hamenon @modigrv Did something change in the server-side that might increase these errors' occurrences?

@joaomoreno Not sure but we do see a spike in those failures lately. We're investigating, will get back to you soon.

Hi @rictic @mkloubert , we analyzed this and found that the vsix packages being uploaded were inadvertently greater than 20 MB (which is the current limit for packages ) ; however, due to a bug, they were being reported as a different error. This also explains the behavior with the clean repo.

We will get the error-reporting fixed. Thanks for reporting, and sorry for the inconvenience.

Thanks @amitramesan

@rictic @mkloubert There is an open item to support larger extensions Microsoft/vscode#18146 but it's still ongoing. Meanwhile you'll have to find a way to trim down those dependencies to get your VSIX under 20MB.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mlewand picture mlewand  Â·  3Comments

joaomoreno picture joaomoreno  Â·  4Comments

Jakobud picture Jakobud  Â·  4Comments

equinusocio picture equinusocio  Â·  4Comments

vfonic picture vfonic  Â·  6Comments