-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Description
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:
- Go to 'Integrations'
- Click on 'New for creating Incoming WebHook Integration'
- 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"