Skip to content

Incoming webhook payload is empty due to script compilation failure #37800

@mkd2380

Description

@mkd2380

When storing JavaScript scripts for the bot in the Rocket.Chat, the bot was sending empty payloads.
Upon inspection, the database-stored script had a syntax error and the compiled field was empty.
Manually compiling the script in the database resolved the issue, and the bot started processing webhooks correctly

Description:

Steps to reproduce:

  1. Go to 'Integrations'
  2. Click on 'New for creating Incoming WebHook Integration'
  3. write your scripts and save

Expected behavior:

Scripts stored in the database should compile automatically and execute correctly, so that webhook payloads are processed as expected.

Actual behavior:

The bot fails to process webhooks because the stored script does not compile. The compiled field in the database is empty until manually compiled

Server Setup Information:

  • Version of Rocket.Chat Server: 7.13.1
  • Number of Users: 20
  • Operating System:
  • Deployment Method:
  • Number of Running Instances: 1
  • NodeJS Version: v22.16.0
  • MongoDB Version: 7.0.15 / wiredTiger (oplog Enabled)

Additional context

This issue highlights that database-stored scripts may fail to compile automatically if there is a syntax error or missing Babel plugin. Manually compiling the script in the database resolves the issue.

Error [BABEL] unknown file: Cannot find module '@babel/plugin-syntax-nullish-coalescing-operator'
While processing: "base$0$0"

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