TypeError: Cannot read property 'versions' of null

Open
#337 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
cli

Research direction

Reproduce the publish command shown in the report, then inspect _build/exec/extension/_lib/publish.js around line 406 and the validation flow reached after publishing. Trace which response is null and determine the expected behavior when validation data is unavailable; done means publishing no longer throws this TypeError and the reported workflow completes or shows a useful error.

Written by the indexing model from the issue text.

Description

Area: tfx-cli bug

Getting the above error when trying to publish an extension that I created.

Full stack trace below:

/tmp $ ./scripts/320-tfx-extension-publish.sh
TFX - Publish
TFS Cross Platform Command Line Interface v0.7.11
Copyright Microsoft Corporation
2020-01-27T08:12:30.874Z : Publishing /tmp/test-decorator.vsix
Checking if this extension is already published
2020-01-27T08:12:30.885Z : Read vsix as zip... Size (bytes): 1951
2020-01-27T08:12:30.904Z : Files in the zip: [Content_Types].xml, extension.vsomanifest, manifests/, manifests/decorator-post-job-clean.yaml, manifests/decorator-pre-job-init.yaml, extension.vsixmanifest
It isn't, create a new extension.

== Extension Validation In Progress ==
This should take only a few seconds, but in some cases may take a bit longer. You can choose to exit (Ctrl-C) if you don't want to wait. To get the validation status, you may run the command below. If you don't want TFX to wait for validation, use the --no-wait-validation parameter. This extension will be available after validation is successful.

tfx extension isvalid --publisher jenkins-test-publisher --extension-id test-decorator --version 0.0.1 --service-url https://marketplace.visualstudio.com/ --token <your PAT>
2020-01-27T08:12:45.545Z : TypeError: Cannot read property 'versions' of null
2020-01-27T08:12:45.545Z :     at /usr/lib/node_modules/tfx-cli/_build/exec/extension/_lib/publish.js:406:40
2020-01-27T08:12:45.545Z :     at processTicksAndRejections (internal/process/task_queues.js:94:5)
error: TypeError: Cannot read property 'versions' of null

I'm not sure what versions property that I did not set.
I was able to previously publish the same extension, (PS: i'm actually publishing not as version 0.0.1, i had to redact that)

I tried updating the tfx-cli using npm i --global tfx-cli still with the same result.

Dominant language
TypeScript
Stars
386
Forks
142
Avg merge
1d 22h
Merged PRs (30d)
7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/tfs-cli

All issues in microsoft/tfs-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.