Closed jitendra-kr closed 5 years ago
Hello @jitendra-kr I'm glad you resolved the issue, but could you be so kind and share the solution?
Solved If you can connect to rocketchat in browser and hubot can not - check websocket protocol.
Hello, I'm having the same issue here. Any thoughts on how to solve this?
Hi,
I am getting the same error (see below). @p-hash I couldn't be able to solve even though i disconnected from rockchat in browser.
audited 349 packages in 1.794s
found 1 low severity vulnerability
run npm audit fix
to fix them, or npm audit
for details
body-parser deprecated undefined extended: provide extended option ..\node_modules\hubot\src\robot.js:445:21
[Mon Feb 04 2019 15:58:53 GMT+0530 (India Standard Time)] INFO [startup] Rocket.Chat adapter in use
[Mon Feb 04 2019 15:58:53 GMT+0530 (India Standard Time)] INFO [startup] Respond to name: Hubot
[Mon Feb 04 2019 15:58:53 GMT+0530 (India Standard Time)] INFO [startup] Respond to alias: chat.bot
[Mon Feb 04 2019 15:58:53 GMT+0530 (India Standard Time)] INFO [connect] Connecting { username: '----------',
password: '-------',
ldap: false,
host: '---------',
useSsl: true,
timeout: 20000,
rooms: [ 'general' ],
allPublic: false,
dm: false,
livechat: false,
edited: false,
integrationId: 'js.SDK',
roomCacheMaxSize: 10,
roomCacheMaxAge: 300000,
dmCacheMaxSize: 10,
dmCacheMaxAge: 100000 }
[Mon Feb 04 2019 15:59:13 GMT+0530 (India Standard Time)] INFO [connect] Timeout (20000)
[Mon Feb 04 2019 15:59:13 GMT+0530 (India Standard Time)] ERROR Unable to connect: {}
[Mon Feb 04 2019 15:59:13 GMT+0530 (India Standard Time)] ERROR undefined
[Mon Feb 04 2019 15:59:13 GMT+0530 (India Standard Time)] ERROR Unable to login: {}
[Mon Feb 04 2019 15:59:13 GMT+0530 (India Standard Time)] ERROR undefined
[Mon Feb 04 2019 15:59:13 GMT+0530 (India Standard Time)] ERROR Unable to subscribe {}
(node:3224) UnhandledPromiseRejectionWarning: Error: Asteroid connection timeout
at Timeout._onTimeout (C:\Users\user\hubot-rocketchat-boilerplate\node_modules\@rocket.chat\sdk\dist\lib\d
river.js:94:25)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
(node:3224) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing insi de of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:3224) [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.
PLEASE PROVIDE THE SOLUTION ASAP.
@p-hash thanks for the reply.
I have installed bot in my local host(running hubot.cmd from here using bat file (instead of .env) as mine is windows os) and i would be able to connect to that through browser and postman and getting responses but not from CLI when running hubot.cmd command
How to check this -->[ make sure websocket protocol is not blocked by any kind of proxy.]
I am facing similar issue. Please share the resolution
same issue here in .env :: export ROCKETCHAT_USESSL=true in log :: useSsl: False ... so :: export ROCKETCHAT_URL="https://mydomain.com" ( rather than :: export ROCKETCHAT_URL=mydomain.com ) and ... voilà
Not sure if this is really the best solution but for me it was good enough to allow also self signed certificates with another environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 after setting that variable the connection worked just fine
@rdgx Solution works.
@rdgx I don't have SSL enabled, so in .env it is set to false and in in log it is coming the same, so what could be the reason?
@rdgx I don't have SSL enabled, so in .env it is set to false and in in log it is coming the same, so what could be the reason?
Did u solve that?
can some explain why throwing this error
hubot@staging-rocket:~/hubot-rocketchat-boilerplate$ bin/hubot audited 345 packages in 2.343s found 1 low severity vulnerability run
npm audit fix
to fix them, ornpm audit
for details body-parser deprecated undefined extended: provide extended option node_modules/hubot/src/robot.js:445:21 [Thu Sep 27 2018 12:41:09 GMT+0000 (UTC)] INFO [startup] Rocket.Chat adapter in use [Thu Sep 27 2018 12:41:09 GMT+0000 (UTC)] INFO [startup] Respond to name: Hubot [Thu Sep 27 2018 12:41:09 GMT+0000 (UTC)] INFO [startup] Respond to alias: mybotuser [Thu Sep 27 2018 12:41:09 GMT+0000 (UTC)] INFO [connect] Connecting { username: 'mybotuser', password: 'mypassword', ldap: false, host: 'chatqa.imobisoft.co.uk', useSsl: true, timeout: 20000, rooms: [ 'general' ], allPublic: false, dm: false, livechat: false, edited: false, integrationId: 'js.SDK', roomCacheMaxSize: 10, roomCacheMaxAge: 300000, dmCacheMaxSize: 10, dmCacheMaxAge: 100000 } [Thu Sep 27 2018 12:41:29 GMT+0000 (UTC)] INFO [connect] Timeout (20000) [Thu Sep 27 2018 12:41:29 GMT+0000 (UTC)] ERROR Unable to connect: {} [Thu Sep 27 2018 12:41:29 GMT+0000 (UTC)] ERROR undefined [Thu Sep 27 2018 12:41:29 GMT+0000 (UTC)] ERROR Unable to login: {} [Thu Sep 27 2018 12:41:29 GMT+0000 (UTC)] ERROR undefined [Thu Sep 27 2018 12:41:29 GMT+0000 (UTC)] ERROR Unable to subscribe {} (node:1667) UnhandledPromiseRejectionWarning: Error: Asteroid connection timeout at Timeout._onTimeout (/home/hubot/hubot-rocketchat-boilerplate/node_modules/@rocket.chat/sdk/dist/lib/driver.js:94:25) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5)(node:1667) 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(). (rejection id: 1) (node:1667) [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.