Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

list-jira-bugs.coffee Returns no data #1173

Closed
darksheer opened this issue Oct 8, 2013 · 10 comments
Closed

list-jira-bugs.coffee Returns no data #1173

darksheer opened this issue Oct 8, 2013 · 10 comments

Comments

@darksheer
Copy link

Installed and configured list-jira-bugs.coffee

Set vars:

HUBOT_JIRA_DOMAIN=ourdomain.atlassian.net
HUBOT_JIRA_PASSWORD='password@#$#@$@#$@#'
HUBOT_JIRA_USER='MEEEEEEE'

Hubot comes online and I can invode the list bugs, Hubot returns with Searching for issues.

heroku logs provides no insight as to what might be causing a failure. I did verify that all the URL / paths that the code is looking for exist and work.

Not sure what the proper troubleshooting steps are.

@darksheer
Copy link
Author

2013-10-08T00:34:49.822604+00:00 app[web.1]: TypeError: Cannot call method 'split' of undefined
2013-10-08T00:34:49.822604+00:00 app[web.1]: at TextListener.callback (/app/node_modules/hubot-scripts/src/scripts/list-jira-bugs.coffee:41:9, :22:14)
2013-10-08T00:34:49.822604+00:00 app[web.1]: at getIssues (/app/node_modules/hubot-scripts/src/scripts/list-jira-bugs.coffee:60:69, :45:70)
2013-10-08T00:34:49.822604+00:00 app[web.1]: at invokeCallback (/app/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:161:15)
2013-10-08T00:34:49.822771+00:00 app[web.1]: at process._tickCallback (node.js:415:13)
2013-10-08T00:34:49.822771+00:00 app[web.1]: at /app/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:13:16
2013-10-08T00:34:49.822604+00:00 app[web.1]: at /app/node_modules/hubot-hipchat/src/hipchat.coffee:103:11, :132:26
2013-10-08T00:34:49.822604+00:00 app[web.1]: at HipChat.Adapter.receive (/app/node_modules/hubot/src/adapter.coffee:66:5, :47:25)
2013-10-08T00:34:49.822604+00:00 app[web.1]: at Robot.robot.receive (/app/node_modules/hubot-scripts/src/scripts/conversation.coffee:43:5, :21:20)
2013-10-08T00:34:49.822771+00:00 app[web.1]:
2013-10-08T00:34:49.822771+00:00 app[web.1]: at Object. (/app/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:193:9)

@technicalpickles
Copy link
Contributor

What version of hubot-scripts are you using? Should be in package.json.

Also, what are specifically saying, expecting hubot to respond?

I seem to recall some updates to this recently.

@darksheer
Copy link
Author

"hubot-scripts": ">= 2.5.6",

There are a number of bugs in our projects, some are assigned to me others are general.

I checked the URL's manually and it returned a bunch of data, so it appears to be good on JIRA's end.

@technicalpickles
Copy link
Contributor

Also, what are specifically saying, expecting hubot to respond?

@darksheer when I say this, I mean I'm not really familiar with these particular jira scripts. I'm asking for specific text, so I can compare to the regex that's in the script to help you diagnose the error.

From what I can see here, and the initial report, you are doing like "hubot list my issues". Please correct me if I'm wrong.

2013-10-08T00:34:49.822604+00:00 app[web.1]: TypeError: Cannot call method 'split' of undefined
2013-10-08T00:34:49.822604+00:00 app[web.1]: at TextListener.callback (/app/node_modules/hubot-scripts/src/scripts/list-jira-bugs.coffee:41:9, :22:14)

The error is calling 'split' on something not defined. There's only two places split gets called:

The first is splitting out the user's email, which comes from Jira, so it's probably not that.

The second is splitting something from the environment, which could feasibly be undefined. You didn't mention the environment in question, HUBOT_JIRA_ISSUE_TYPES, so that is probably it.

Can you try setting the following please?

HUBOT_JIRA_ISSUES_TYPES="bug|task|sub task|support ticket|new feature|epic"

@darksheer
Copy link
Author

Tried setting to this:

HUBOT_JIRA_ISSUES_TYPES="bug|task|sub task|support ticket|new feature|epic"

Even tried selecting only 'bug'

Still no returned data.

@darksheer
Copy link
Author

@technicalpickles Updated the HUBOT_JIRA_ISSUE_PRIORITIES="blocker|high|medium|minor|trivial" as well just to make sure, still no data returned. I did get the other Jira script working, which shares some of the same config vars (username / password), there is something else 'missing'.

The other script does do some 'weirdness' with not returning data sets consistently:

#1174

@darksheer
Copy link
Author

Messed around all morning adjusting the VARs, still nothing.

Is there some other log file other than heroku logs I can investigate ?

@technicalpickles
Copy link
Contributor

Is there some other log file other than heroku logs I can investigate ?

No, that would be it. I would also suggest trying to run your hubot locally with the environment variables you've set, to see if you can reproduce that in the shell adapter. If you can, you can copy hubot-script's list-jira-issues into your own scripts/ directory to add more debugging and error checking

/cc @crcastle (the original contributor)

I really could use someone to take over maintaing this and the other jira scripts as external packages if anyone is interested /cc #1113

@darksheer
Copy link
Author

Played around a ton with this, still couldn't get anything working properly. Not sure what to do next outside of chopping up some of the code. Was hoping @crcastle was gonna chime in.

@technicalpickles
Copy link
Contributor

cc hubotio/hubot#644 for making sure errors get logged

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants