question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tfx extension publish - Extension package is malformed/corrupted

See original GitHub issue

Hi All,

I am using tfx 0.8.3, I am able to create .VSIX file locally and publish it. I am doing the same thing using the Azure DevOps pipeline yaml referring to Step 6 on this link

The pipeline is able to create and publish package with the name foo.VSIX. The download task is also able to download the package with the same name foo.VSIX. However, when the pipeline runs the publish stage, it tries to run the below command. The **.gen** is getting appended from somewhere an hence I think it is throwing the malformed error. I am not appending anything of this sort in my yaml publish task

tfx extension publish --json --no-color --service-url https://marketplace.visualstudio.com/ --auth-type pat --token *** --vsix foo.gen.vsix --debug-log-stream stderr 0 [ '[command]/opt/hostedtoolcache/tfx/0.8.3/x64/bin/tfx extension publish --json --no-color --service-url

Also, the foo.VSIX size is 26,460 KB when generated,

I am not sure the issue is caused because of the .gen getting added or the VSIX size.

Yaml for publish task

              displayName: 'Publish ADO extension to marketplace'
              inputs:
                connectTo: 'VsTeam'
                connectedServiceName: 'visual-studio-marketplace'
                fileType: 'vsix'
                vsixFile: '*.vsix'
                publisherId: '$(publisherId)'
                extensionId: '$(extensionId)'
                extensionName: '$(extensionName)'
                updateTasksVersion: false
                extensionVisibility: 'private'
                extensionPricing: 'free'

Error:

2020-11-06T22:59:43.0592466Z [command]/opt/hostedtoolcache/tfx/0.8.3/x64/bin/tfx extension publish --json --no-color --service-url https://marketplace.visualstudio.com/ --auth-type pat --token *** --vsix foo.gen.vsix --debug-log-stream stderr 0 [ ‘[command]/opt/hostedtoolcache/tfx/0.8.3/x64/bin/tfx extension publish --json --no-color --service-url https://marketplace.visualstudio.com/ --auth-type pat --token *** --vsix foo.gen.vsix --debug-log-stream stderr’, 2020-11-06T22:59:43.0593723Z ‘’ ] 2020-11-06T22:59:43.0595050Z 1 [ ‘[command]/opt/hostedtoolcache/tfx/0.8.3/x64/bin/tfx extension publish --json --no-color --service-url https://marketplace.visualstudio.com/ --auth-type pat --token *** --vsix foo.gen.vsix --debug-log-stream stderr’, 2020-11-06T22:59:43.0595780Z ‘’ ] 2020-11-06T22:59:43.0597093Z (node:5146) Warning: Accessing non-existent property ‘padLevels’ of module exports inside circular dependency 0 [ ‘(node:5146) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency’, 2020-11-06T22:59:43.0598178Z ‘(Use node --trace-warnings ... to show where the warning was created)’, 2020-11-06T22:59:43.0598670Z ‘’ ] 2020-11-06T22:59:43.0599476Z (Use node --trace-warnings ... to show where the warning was created) 1 [ ‘(node:5146) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency’, 2020-11-06T22:59:43.0600300Z ‘(Use node --trace-warnings ... to show where the warning was created)’, 2020-11-06T22:59:43.0600685Z ‘’ ] 2020-11-06T22:59:43.0601266Z 2 [ ‘(node:5146) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency’, 2020-11-06T22:59:43.0601939Z ‘(Use node --trace-warnings ... to show where the warning was created)’, 2020-11-06T22:59:43.0602322Z ‘’ ] 2020-11-06T22:59:44.0196697Z error: Extension package is malformed/corrupted 0 [ ‘error: Extension package is malformed/corrupted’, ‘’ ] 2020-11-06T22:59:44.0198221Z 1 [ ‘error: Extension package is malformed/corrupted’, ‘’ ] 2020-11-06T22:59:44.0275699Z 0 [ ‘’, ‘’ ] 2020-11-06T22:59:44.0278451Z 1 [ ‘’, ‘’ ] 2020-11-06T22:59:44.0369971Z ##[error]tfx failed with error: Error: The process ‘/opt/hostedtoolcache/tfx/0.8.3/x64/bin/tfx’ failed with exit code 255 2020-11-06T22:59:44.3925406Z ##[section]Finishing: Publish ADO extension to marketplace

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
jessehouwingcommented, Nov 9, 2020

Glad you’re unblocked!

On Mon, Nov 9, 2020, 17:56 Tapas Udenia notifications@github.com wrote:

Hi Jesse,

Alright, so did a npx depcheck and I found there were couple of unused dependencies, I did remove all unused dependencies and then by using this task in my pipeline. It worked finally. I am still wondering, what caused it. But it worked.

displayName: ‘Publish ADO extension to marketplace’ inputs: connectTo: ‘VsTeam’ connectedServiceName: ‘visual-studio-marketplace’ fileType: ‘vsix’ vsixFile: ‘*.vsix’ publisherId: ‘$(publisherId)’ extensionId: ‘$(extensionId)’ extensionName: ‘$(extensionName)’ updateTasksVersion: false extensionVisibility: ‘private’ extensionPricing: ‘free’

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/tfs-cli/issues/362#issuecomment-724140088, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA724S2KQ73XGI6CG6F6SALSPANLHANCNFSM4TNIJ3BA .

0reactions
tapasudeniacommented, Nov 12, 2020

Worked by removing unused dependencies

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extension Package is malformed/corruped, when using tfx-cli
Hi, I am unable to publish the extension using tfx-cli, if I use the tfx-cli I get an error message saying the Extension...
Read more >
Publish from the command line - Azure DevOps
How to package and publish your Azure DevOps or Team Foundation Server (TFS) extension from the command line.
Read more >
Reducing a Visual Studio Extension (VSIX) File Size
When I got to publishing the extension, I encountered an error. ... error: Extension package is malformed/corrupted 0 [ 'error: Extension ...
Read more >
Reducing a Visual Studio Extension (VSIX) File Size - Morioh
error: Extension package is malformed/corrupted 0 [ 'error: Extension ... there was a file size limit in place when a VSIX was published...
Read more >
tfx extension create failed while running npm script
I had the same issue. I guess the postbuild command is wrong: "postbuild": "npm run package-extension -- --rev-version". This works:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found