Open rmountjoy92 opened 4 years ago
I am having the same issue after upgrade to Rocketchat server 3.8.0. The dockerfile in the master also doesn't compile:
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js
/usr/local/bin/yo-complete -> /usr/local/lib/node_modules/yo/lib/completion/index.js
npm info install yo@3.1.1
npm info postinstall yo@3.1.1
> yo@3.1.1 postinstall /usr/local/lib/node_modules/yo
> yodoctor
/usr/local/lib/node_modules/yo/node_modules/yeoman-doctor/lib/index.js:12
(async () => {
^
SyntaxError: Unexpected token (
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/yeoman-doctor/lib/cli.js:3:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
npm info yo@3.1.1 Failed to exec postinstall script
npm ERR! Linux 4.9.0-9-amd64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "coffee-script" "yo" "generator-hubot"
npm ERR! node v4.8.3
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! yo@3.1.1 postinstall: `yodoctor`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yo@3.1.1 postinstall script 'yodoctor'.
npm ERR! This is most likely a problem with the yo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! yodoctor
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs yo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls yo
npm ERR! There is likely additional logging output above.
npm info preuninstall yo@3.1.1
npm info uninstall yo@3.1.1
npm info postuninstall yo@3.1.1
npm ERR! Please include the following file with any support request:
npm ERR! /npm-debug.log
The command '/bin/sh -c npm install -g coffee-script yo generator-hubot && useradd hubot -m' returned a non-zero code: 1
Reporting the same issue here with Rocket.Chat 3.8.1
and docker image rocketchat/hubot-rocketchat:v1.0.11
[Mon Nov 23 2020 18:39:39 GMT+0000 (UTC)] INFO Message received with ID id
[Mon Nov 23 2020 18:39:39 GMT+0000 (UTC)] ERROR TypeError: Cannot read property '_id' of undefined
at /home/hubot/node_modules/hubot-rocketchat/src/rocketchat.js:193:27
at [object Object].<anonymous> (/home/hubot/node_modules/hubot-rocketchat/src/rocketchat_driver.js:231:22)
at /home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (native)
at [object Object].Asteroid.utils.EventEmitter._emit (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:169:22)
at [object Object].<anonymous> (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:749:8)
at /home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (native)
at [object Object].Asteroid.utils.EventEmitter._emit (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:169:22)
at [object Object].Set.put (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:965:7)
at [object Object].<anonymous> (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:1020:8)
at /home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (native)
at [object Object].Asteroid.utils.EventEmitter._emit (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:169:22)
at [object Object].Set.put (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:965:7)
at [object Object].Collection._remoteToLocalUpdate (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:695:12)
at [object Object].Asteroid._onChanged (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:453:36)
at [object Object].<anonymous> (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/dist/asteroid.node.js:392:8)
at /home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/ddp.js/src/ddp.js:125:12
at Array.forEach (native)
at [object Object].DDP._emit (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/ddp.js/src/ddp.js:124:22)
at [object Object].DDP._on_changed (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/ddp.js/src/ddp.js:248:8)
at [object Object].DDP._on_socket_message (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/ddp.js/src/ddp.js:326:26)
at [object Object].EventTarget.dispatchEvent (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js:22:30)
at [object Object].instance._receiveMessage (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/lib/faye/websocket/api.js:150:10)
at [object Object].<anonymous> (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/lib/faye/websocket/api.js:34:49)
at emitOne (events.js:82:20)
at [object Object].emit (events.js:169:7)
at [object Object].<anonymous> (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:451:14)
at pipe (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:37:40)
at [object Object].Pipeline._loop (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:44:3)
at [object Object].Pipeline.processIncomingMessage (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:13:8)
at [object Object].instance.processIncomingMessage (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/websocket_extensions.js:133:20)
at [object Object].instance._emitMessage (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:442:22)
at [object Object].instance._emitFrame (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:405:19)
at [object Object].instance.parse (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:141:18)
at [object Object].instance.parse (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/client.js:62:58)
at [object Object].IO.write (/home/hubot/node_modules/hubot-rocketchat/node_modules/asteroid/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/streams.js:80:16)
at TLSSocket.ondata (_stream_readable.js:542:20)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at TLSSocket.Readable.push (_stream_readable.js:111:10)
at TLSWrap.onread (net.js:540:20)
So it appears that the variable newmsg
-> https://github.com/RocketChat/hubot-rocketchat/blob/v1.0.11/src/rocketchat.coffee#L137 is now an array.
Replacing all occurrences of newmsg.
with newmsg[0].
did the trick but I'm not sure what the root cause of this so I'll let someone more familiar with Rocket.Chat and hubot do the modifications 😉
This fork https://github.com/DeviaVir/hubot-rocketchat uses a patched version of @rocket.chat/sdk
that fixes the _id
issue. To use it I use the following Dockerfile.
FROM node:14.15.1
MAINTAINER Rocket.Chat Team <buildmaster@rocket.chat>
RUN npm install -g coffeescript -g yo generator-hubot && \
useradd hubot -m
USER hubot
WORKDIR /home/hubot
ENV BOT_NAME "rocketbot"
ENV BOT_OWNER "No owner specified"
ENV BOT_DESC "Hubot with rocketbot adapter"
#ENV EXTERNAL_SCRIPTS=
RUN cd /home/hubot
RUN yo hubot --owner="$BOT_OWNER" --name="$BOT_NAME" --description="$BOT_DESC" --defaults && \
sed -i /heroku/d ./external-scripts.json && \
sed -i /redis-brain/d ./external-scripts.json && \
npm install hubot-scripts && npm install git+https://github.com/DeviaVir/hubot-rocketchat.git
COPY bots /home/hubot/scripts # copy bots into docker image, alternativly mount them into the conainer
CMD bin/hubot -n $BOT_NAME -a rocketchat
Having same issue with Rocket.Chat 3.8.1
after following this tutorial
[Thu Nov 26 2020 17:50:19 GMT+0700 (Western Indonesia Time)] INFO [connect] Connected
[Thu Nov 26 2020 17:50:19 GMT+0700 (Western Indonesia Time)] INFO [login] Logging in halobot
[Thu Nov 26 2020 17:50:19 GMT+0700 (Western Indonesia Time)] INFO [subscribe] Preparing subscription: stream-room-messages: __my_messages__
[Thu Nov 26 2020 17:50:19 GMT+0700 (Western Indonesia Time)] INFO [subscribe] Stream ready: 2
[Thu Nov 26 2020 17:50:19 GMT+0700 (Western Indonesia Time)] INFO [reactive] Listening for change events in collection stream-room-messages
[Thu Nov 26 2020 17:50:41 GMT+0700 (Western Indonesia Time)] INFO [received] Message in room undefined
(node:26077) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_id' of undefined
at Object.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:357:23)
at Generator.next (<anonymous>:null:null)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:7:71
at new Promise (<anonymous>:null:null)
at __awaiter (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:3:12)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:351:45
at ReactiveQuery.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:314:17)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (<anonymous>:null:null)
at ReactiveQuery._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:169:22)
at Set.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:749:8)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (<anonymous>:null:null)
at Set._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:169:22)
at Set.put (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:965:7)
at Set.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:1020:8)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (<anonymous>:null:null)
at Set._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:169:22)
at Set.put (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:965:7)
at Collection._remoteToLocalUpdate (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:695:12)
at Asteroid._onChanged (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:453:36)
at DDP.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:392:8)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:125:12
at Array.forEach (<anonymous>:null:null)
at DDP._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:124:22)
at DDP._on_changed (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:248:8)
at DDP._on_socket_message (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:326:26)
at Client.dispatchEvent (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js:24:30)
at Client._receiveMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/faye-websocket/lib/faye/websocket/api.js:152:10)
at Client.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/faye-websocket/lib/faye/websocket/api.js:36:49)
at Client.emit (events.js:333:22)
at Client.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:460:14)
at pipe (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/pipeline/index.js:37:40)
at Pipeline._loop (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/pipeline/index.js:44:3)
at Pipeline.processIncomingMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/pipeline/index.js:13:8)
at Extensions.processIncomingMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/websocket_extensions.js:133:20)
at Client._emitMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:451:22)
at Client._emitFrame (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:411:19)
at Client.parse (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:137:18)
at Client.parse (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/client.js:63:58)
at IO.write (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/streams.js:80:16)
at TLSSocket.ondata (_stream_readable.js:708:22)
at TLSSocket.emit (events.js:321:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at TLSSocket.Readable.push (_stream_readable.js:214:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
(node:26077) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:26077) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Thu Nov 26 2020 17:50:41 GMT+0700 (Western Indonesia Time)] INFO [received] Message in room undefined
(node:26077) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_id' of undefined
at Object.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:357:23)
at Generator.next (<anonymous>:null:null)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:7:71
at new Promise (<anonymous>:null:null)
at __awaiter (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:3:12)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:351:45
at ReactiveQuery.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:314:17)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (<anonymous>:null:null)
at ReactiveQuery._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:169:22)
at Set.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:749:8)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (<anonymous>:null:null)
at Set._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:169:22)
at Set.put (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:965:7)
at Set.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:1020:8)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:170:12
at Array.forEach (<anonymous>:null:null)
at Set._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:169:22)
at Set.put (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:965:7)
at Collection._remoteToLocalUpdate (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:695:12)
at Asteroid._onChanged (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:453:36)
at DDP.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/asteroid/dist/asteroid.node.js:392:8)
at /var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:125:12
at Array.forEach (<anonymous>:null:null)
at DDP._emit (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:124:22)
at DDP._on_changed (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:248:8)
at DDP._on_socket_message (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/ddp.js/src/ddp.js:326:26)
at Client.dispatchEvent (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js:24:30)
at Client._receiveMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/faye-websocket/lib/faye/websocket/api.js:152:10)
at Client.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/faye-websocket/lib/faye/websocket/api.js:36:49)
at Client.emit (events.js:333:22)
at Client.<anonymous> (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:460:14)
at pipe (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/pipeline/index.js:37:40)
at Pipeline._loop (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/pipeline/index.js:44:3)
at Pipeline.processIncomingMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/pipeline/index.js:13:8)
at Extensions.processIncomingMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-extensions/lib/websocket_extensions.js:133:20)
at Client._emitMessage (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:451:22)
at Client._emitFrame (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:411:19)
at Client.parse (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/hybi.js:137:18)
at Client.parse (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/driver/client.js:63:58)
at IO.write (/var/www/halo.stis.ac.id/bots/hubot-rocketchat-boilerplate/node_modules/websocket-driver/lib/websocket/streams.js:80:16)
at TLSSocket.ondata (_stream_readable.js:708:22)
at TLSSocket.emit (events.js:321:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at TLSSocket.Readable.push (_stream_readable.js:214:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
(node:26077) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
@imperativa28 as said above in thread, message is now an array.. :-( Don t know why either.
In driver.js, respondToMessage function in node_modules/@rocket.chat/sdk/dist/lib/driver.js around line 357 you just have to add, before error line
message = message[0]
Hello,
In my case, i had to map in docker-compose the file "/home/hubot/node_modules/hubot-rocketchat/src/rocketchat.js". In the file, i search "._id" and just before the found line, i write "newmsg = newmsg.slice(0,1).shift();"
Hello, I recently updated to rocket chat version 3.8 and hubot has stopped working. Here is my logs: