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

jira ls failing with error related to async package #45

Open
criess opened this issue Dec 23, 2020 · 1 comment
Open

jira ls failing with error related to async package #45

criess opened this issue Dec 23, 2020 · 1 comment

Comments

@criess
Copy link

criess commented Dec 23, 2020

After I connected the cli sucessfully via config command I ran into an issue when trying to query with ls command. see output below:

$ jira ls -v
https://[…redacted…].atlassian.net/rest/api/2/search?jql=assignee=currentUser()+AND+status+in+("Open", "In Progress", "Reopened", "To Do", "In Review")+order+by+key+DESC&maxResults=500&startAt=0&maxResults=500
/usr/lib/node_modules/jira-cli/node_modules/async/dist/async.js:966
        if (fn === null) throw new Error("Callback was already called.");
                         ^

Error: Callback was already called.
    at /usr/lib/node_modules/jira-cli/node_modules/async/dist/async.js:966:32
    at next (/usr/lib/node_modules/jira-cli/node_modules/async/dist/async.js:3022:18)
    at /usr/lib/node_modules/jira-cli/lib/jira/ls.js:47:18
    at Request.callback (/usr/lib/node_modules/jira-cli/node_modules/superagent/lib/node/index.js:704:3)
    at /usr/lib/node_modules/jira-cli/node_modules/superagent/lib/node/index.js:891:18
    at Stream.<anonymous> (/usr/lib/node_modules/jira-cli/node_modules/superagent/lib/node/parsers/json.js:17:7)
    at Stream.emit (events.js:315:20)
    at Unzip.<anonymous> (/usr/lib/node_modules/jira-cli/node_modules/superagent/lib/node/unzip.js:54:12)
    at Unzip.emit (events.js:315:20)
    at endReadableNT (internal/streams/readable.js:1327:12)

It may have to do with dependendant libraries and their management (uneducated guess from me). I'll attach versions for the core components, ask me if you need more:

node --version;
npm --version;
jira -V;
v14.15.3
6.14.9
2.4.0
@danshumaker
Copy link
Owner

Quick question @criess . Look inside your config file and see if all the ticket status's that you have in your instance of Jira match those within the config file. The ticket status's that are in there are defaults. Many installations of jira have customized workflows that rename their status'. So when jira-cli gets their status' in order to list them and tries to map them to values in the config file-- if they don't map then an error (non-indicative or helpful) occurs.

This may or may not help but I have had it be the issue for at least two instances of Jira that I've used. One of these days, I'd like to make setting these status's a part of the original configuration setup.. But for now we have to adjust them manually.

Hopefully this helps you . If not, let me know and we'll debug it further.

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

2 participants