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

Getting extension package is malformed/corrupted when publishing new version of extension. #153

Closed
rictic opened this issue Feb 16, 2017 · 8 comments
Assignees

Comments

@rictic
Copy link

rictic commented Feb 16, 2017

$ 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'...

> polymer-ide@0.3.1 vscode:prepublish /Users/rictic/open/vscode-plugin
> tsc -p ./

Publishing polymer.polymer-ide@0.3.1...
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

@joaomoreno joaomoreno self-assigned this Feb 17, 2017
@joaomoreno
Copy link
Member

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'...

> polymer-ide@0.3.0 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 polymer-editor-service@1.2.0

@rictic
Copy link
Author

rictic commented Feb 17, 2017

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:

@rictic
Copy link
Author

rictic commented Feb 17, 2017

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.

@mkloubert
Copy link

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 mkloubert.vs-deploy@5.27.0...
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?

@joaomoreno
Copy link
Member

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

@hamenon
Copy link

hamenon commented Feb 20, 2017

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

@amitramesan
Copy link

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.

@joaomoreno
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants