Skip to content
This repository was archived by the owner on Jul 27, 2026. It is now read-only.
This repository was archived by the owner on Jul 27, 2026. It is now read-only.

Creating bot #158

Description

@JerryBerry12

Hi,
I tried creating a bot with the tutorial at: https://developer.rocket.chat/bots/creating-your-own-bot-from-scratch/develop-a-rocket.chat-sdk-bot.
The bot keeps trying to connect, and it produces this:

[connect] Connecting {
  username: 'bot',
  password: 'pass',
  ldap: false,
  host: 'localhost',
  useSsl: 'false',
  timeout: 20000,
  rooms: [],
  allPublic: false,
  dm: false,
  livechat: false,
  edited: false,
  integrationId: 'js.SDK',
  roomCacheMaxSize: 10,
  roomCacheMaxAge: 300000,
  dmCacheMaxSize: 10,
  dmCacheMaxAge: 100000
}
[connect] Timeout (20000)
/home/jerryberry12/hopebot/node_modules/@rocket.chat/sdk/dist/lib/driver.js:94
            const err = new Error('Asteroid connection timeout');
                        ^

Error: Asteroid connection timeout
    at Timeout._onTimeout (/home/jerryberry12/hopebot/node_modules/@rocket.chat/sdk/dist/lib/driver.js:94:25)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)

Node.js v19.8.1

In my server.js file, all the settings, bot info and passwords are correct. It seems like some default settings are being applied because of this:

[connect] Connecting {
  username: 'bot',
  password: 'pass',

I set these fields correctly in server.js, not bot and pass. Can some one help me?

Server info

I'm using Raspbian 10 Lite, on a raspberry pi. I installed rocketchat.sdk as shown in the tutorial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions