hubot-trello icon indicating copy to clipboard operation
hubot-trello copied to clipboard

Cannot read property of undefined (slack+heroku issue?)

Open brntbeer opened this issue 8 years ago • 5 comments

It's probably just me, but integration with slack doesn't seem to be working too clearly. I'm able to use hubot to create lists in slack, but that's about it. I cannot create cards or even list lists. I can however list lists and create cards on the command line.

The errors are always at https://github.com/hubot-scripts/hubot-trello/blob/master/src/trello.coffee#L49 and https://github.com/hubot-scripts/hubot-trello/blob/master/src/trello.coffee#L57.

Error log from heroku:

2016-05-18T09:25:55.681568+00:00 app[web.1]: [Wed May 18 2016 09:25:55 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'id' of undefined
2016-05-18T09:25:55.681580+00:00 app[web.1]:   at createCard (/app/node_modules/hubot-trello/src/trello.coffee:49:14, <js>:34:40)
2016-05-18T09:25:55.681582+00:00 app[web.1]:   at TextListener.callback (/app/node_modules/hubot-trello/src/trello.coffee:161:5, <js>:289:14)
2016-05-18T09:25:55.681582+00:00 app[web.1]:   at executeListener (/app/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
2016-05-18T09:25:55.681583+00:00 app[web.1]:   at allDone (/app/node_modules/hubot/src/middleware.coffee:44:37, <js>:34:16)
2016-05-18T09:25:55.681584+00:00 app[web.1]:   at Object.async.eachSeries (/app/node_modules/hubot/node_modules/async/lib/async.js:142:20)
2016-05-18T09:25:55.681584+00:00 app[web.1]:   at /app/node_modules/hubot/node_modules/async/lib/async.js:274:13
2016-05-18T09:25:55.681585+00:00 app[web.1]:   at Object.async.reduce (/app/node_modules/hubot/node_modules/async/lib/async.js:268:15)
2016-05-18T09:25:55.681586+00:00 app[web.1]:   at /app/node_modules/hubot/src/middleware.coffee:49:7, <js>:37:22
2016-05-18T09:25:55.681587+00:00 app[web.1]:   at process._tickCallback (node.js:458:13)

brntbeer avatar May 18 '16 09:05 brntbeer

@brntbeer Can you please verify that you have your env variable for HUBOT_TRELLO_BOARD is set and that you can access that board directly by https://trello.com/b/[variable] If that is indeed correct then we might have to look a little deeper but this is where I'm expecting the issue to be.

-Possible Duplicate of #2

syntax922 avatar May 24 '16 03:05 syntax922

I have the same issue.

[Fri Jun 10 2016 19:27:15 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'id' of undefined
  at createCard (/home/hubot/node_modules/hubot-trello/src/trello.coffee:49:14, <js>:34:40)
  at TextListener.callback (/home/hubot/node_modules/hubot-trello/src/trello.coffee:161:5, <js>:289:14)
  at executeListener (/home/hubot/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
  at allDone (/home/hubot/node_modules/hubot/src/middleware.coffee:44:37, <js>:34:16)
  at /home/hubot/node_modules/async/lib/async.js:274:13
  at Object.async.eachSeries (/home/hubot/node_modules/async/lib/async.js:142:20)
  at Object.async.reduce (/home/hubot/node_modules/async/lib/async.js:268:15)
  at /home/hubot/node_modules/hubot/src/middleware.coffee:49:7, <js>:37:22
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickCallback (internal/process/next_tick.js:98:9)

eueung avatar Jun 10 '16 19:06 eueung

@eueung Can you please verify that you have your env variable for HUBOT_TRELLO_BOARD is set and that you can access that board directly by https://trello.com/b/[variable] If that is indeed correct then we might have to look a little deeper but this is where I'm expecting the issue to be.

syntax922 avatar Jun 27 '16 21:06 syntax922

Hi @syntax922!

I can confirm that my env var is set to the correct ID.

This is my current error:

2016-12-05T15:04:24.638031+00:00 app[web.1]: [Mon Dec 05 2016 15:04:24 GMT+0000 (UTC)] ERROR TypeError: Cannot call method 'toLowerCase' of undefined 2016-12-05T15:04:24.638042+00:00 app[web.1]: at /app/node_modules/hubot-trello/src/trello.coffee:141:15, <js>:259:41 2016-12-05T15:04:24.638042+00:00 app[web.1]: at Request._callback (/app/node_modules/hubot-trello/node_modules/node-trello/lib/node-trello.coffee:60:16) 2016-12-05T15:04:24.638043+00:00 app[web.1]: at Request.self.callback (/app/node_modules/hubot-trello/node_modules/node-trello/node_modules/request/main.js:122:22) 2016-12-05T15:04:24.638044+00:00 app[web.1]: at Request.emit (events.js:98:17) 2016-12-05T15:04:24.638045+00:00 app[web.1]: at Request.<anonymous> (/app/node_modules/hubot-trello/node_modules/node-trello/node_modules/request/main.js:661:16) 2016-12-05T15:04:24.638046+00:00 app[web.1]: at Request.emit (events.js:117:20) 2016-12-05T15:04:24.638047+00:00 app[web.1]: at IncomingMessage.<anonymous> (/app/node_modules/hubot-trello/node_modules/node-trello/node_modules/request/main.js:623:14) 2016-12-05T15:04:24.638047+00:00 app[web.1]: at IncomingMessage.emit (events.js:117:20) 2016-12-05T15:04:24.638048+00:00 app[web.1]: at _stream_readable.js:944:16 2016-12-05T15:04:24.638049+00:00 app[web.1]: at process._tickCallback (node.js:458:13)

Sunsette avatar Dec 05 '16 15:12 Sunsette

I am getting the same error. Are there any updates on this issue? Thanks.

snazzybunny avatar Feb 04 '18 01:02 snazzybunny