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.

ERROR TypeError: Cannot set property 'dm_channel_id' of undefined

See original GitHub issue
[gajus@mattermost myhubot]$ ./bin/hubot --adapter matteruser
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Logging in...
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Websocket URL: wss://messaging.anuary.com:443/api/v3/users/websocket
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Logged in as user "january" but not connected yet.
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Connecting...
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] ERROR Failed to load profiles from server.
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Error: [object Object]
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Connected to Mattermost.
[Wed Nov 23 2016 14:29:10 GMT+0000 (UTC)] INFO Starting pinger...
[Wed Nov 23 2016 14:29:11 GMT+0000 (UTC)] ERROR hubot-heroku-alive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s  | grep web-url | cut -d= -f2)`
[Wed Nov 23 2016 14:29:11 GMT+0000 (UTC)] INFO hubot-redis-brain: Using default redis on localhost:6379
[Wed Nov 23 2016 14:29:11 GMT+0000 (UTC)] INFO hubot-redis-brain: Data for hubot brain retrieved from Redis
[Wed Nov 23 2016 14:29:11 GMT+0000 (UTC)] INFO Brain loaded
+[Wed Nov 23 2016 14:29:29 GMT+0000 (UTC)] ERROR TypeError: Cannot set property 'dm_channel_id' of undefined
+  at Matteruser.message (/home/gajus/myhubot/node_modules/hubot-matteruser/src/matteruser.coffee:133:11, <js>:206:31)
+  at Client.<anonymous> (/home/gajus/myhubot/node_modules/hubot-matteruser/src/matteruser.coffee:1:1, <js>:3:61)
+  at emitOne (events.js:96:13)
+  at Client.emit (events.js:188:7)
+  at Client.onMessage (/home/gajus/myhubot/node_modules/mattermost-client/src/client.coffee:211:17, <js>:278:23)
+  at WebSocket.<anonymous> (/home/gajus/myhubot/node_modules/mattermost-client/src/client.coffee:158:13, <js>:217:22)
+  at emitTwo (events.js:106:13)
+  at WebSocket.emit (events.js:191:7)
+  at Receiver.ontext (/home/gajus/myhubot/node_modules/ws/lib/WebSocket.js:841:10)
+  at /home/gajus/myhubot/node_modules/ws/lib/Receiver.js:536:18
+  at Receiver.applyExtensions (/home/gajus/myhubot/node_modules/ws/lib/Receiver.js:371:5)
+  at /home/gajus/myhubot/node_modules/ws/lib/Receiver.js:508:14
+  at Receiver.flush (/home/gajus/myhubot/node_modules/ws/lib/Receiver.js:347:3)
+  at Receiver.finish (/home/gajus/myhubot/node_modules/ws/lib/Receiver.js:541:12)
+  at Receiver.expectHandler (/home/gajus/myhubot/node_modules/ws/lib/Receiver.js:499:31)
+  at Receiver.add (/home/gajus/myhubot/node_modules/ws/lib/Receiver.js:103:24)
+  at TLSSocket.realHandler (/home/gajus/myhubot/node_modules/ws/lib/WebSocket.js:825:20)
+  at emitOne (events.js:96:13)
+  at TLSSocket.emit (events.js:188:7)
+  at readableAddChunk (_stream_readable.js:176:18)
+  at TLSSocket.Readable.push (_stream_readable.js:134:10)
+  at TLSWrap.onread (net.js:551:20)

I have got this error after sending a private message to the bot.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
loafoecommented, Nov 27, 2016

@gajus the below error message probably explains this:

ERROR Failed to load profiles from server.

Make sure you are using Mattermost 3.5.x. Unfortunately the adapter is only compatible with the latest version as the server API is really volatile.

Also please upgrade to version 3.5.1 of hubot-matteruser which I just released. It contains some fixed which might help.

0reactions
nickolasclarkecommented, Jan 6, 2017

@loafoe nope. Also, forgot to update this. Upgrading indeed fixed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "ERROR TypeError: Cannot set property 'id' of ...
I get an error "ERROR TypeError: Cannot set property 'id' of undefined" when i try to call getHistoryData() from html.
Read more >
TypeError: Cannot set properties of Undefined in JavaScript
The TypeError: Cannot set properties of undefined occurs when setting a property on an `undefined` value. To solve the error, make sure the...
Read more >
[BUG]: TypeError: Cannot set property 'props' of undefined ...
Describe the bug When trying to integrate Builder.io, we get a strange error ERROR: TypeError: Cannot set property 'props' of undefined at ...
Read more >
TypeError: Cannot set property '$' of undefined - DataTables
why i receive this error : TypeError: Cannot set property '$' of undefined ... (in promise): TypeError: Cannot set property '$' of undefined...
Read more >
TypeError: Cannot set property 'phone' of undefined - Treehouse
I have checked several times for typos. I keep getting the following error: "TypeError: Cannot set property 'phone' of undefined at Object.< ...
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