As show in the below image, eventhough the script field is correct it is showing error in red color and not working the integration.

sadly after updating my 2 very armaturely written scripts they have stopped working as well, guess i have to invest some time to get them fixed...
I had the very simple script for and incoming message set as:
return {
content: {username:content.message.from.first_name,
text:content.message.text,
}
};
and outgoing message set as:
var modName = request.data.user_name;
var modMessage = request.data.text;
var MsGG = '<' + modName + '>' + ' : ' + modMessage;
if (modName == 'rocket.cat') {
var attachment = { url:'https://api.telegram.org/bot[BOTTOKEN]/sendMessage?', };
} //avoid infinite loop due to rocket.cat posting messages just send to empty webhook
else {
var attachment = {url:'https://api.telegram.org/bot[BOTTOKEN]/sendMessage?chat_id=-#####&text='+MsGG,};
}
return attachment;
This allowed me easy crossplatform comunication with the telegram chat
another problem that i encounterd is that newly created incoming webhooks wont work
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
[email protected]
Domain zyapps.com has exceeded the max emails per hour (455/400 (113%)) allowed. Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from github-smtp2-ext1.iad.github.net ([192.30.252.192]:55783 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
by serveur.ex2-p10.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.86_1)
(envelope-from [email protected])
id 1afmdj-000ePK-P0
for yann.[email protected]; Tue, 15 Mar 2016 11:55:59 +0100
Date: Tue, 15 Mar 2016 03:55:10 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1458039310;
bh=hkambq9Y/Hb4asvAq22fQVaINlLd7t5dAyJMBuY9qbI=;
h=From:Reply-To:To:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=zdoAEsGvHWXJVgolEDKG+VfakcUS0dlf9sDI3CEhZ3NB/d13pyxZ5iGqZ1zTIy6JW
zW52lWeKJV2n+TphMa8fKSPB2iTQhB552XhoLI+LeUUTdZCdy5Df3ZxtQW1EsZFJGL
B7yjfCwuItUuSvLZaOmzwmfeqWVjqbQqIOlqCSsQ=
From: Kai [email protected]
Reply-To: "RocketChat/Rocket.Chat" [email protected]
To: "RocketChat/Rocket.Chat" Rocket.[email protected]
Message-ID:
In-Reply-To:
References:
Subject: Re: [Rocket.Chat] Script field is always error in integrations
(#2504)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_56e7ea0e6e46a_659e3f7ef4bad29c11793c5";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: bott0r
X-GitHub-Recipient: yanndupuy
List-ID: RocketChat/Rocket.Chat
List-Archive: https://github.com/RocketChat/Rocket.Chat
List-Post: mailto:[email protected]
List-Unsubscribe: mailto:unsub+000df0dc023376ffd956fe5ecdff38fa2cc27b25d87a190a92cf0000000112ffac0e92a169ce08659195@reply.github.com,
https://github.com/notifications/unsubscribe/AA3w3BcNdTj6MmGbQS9PerHjM6R17Chxks5ptpAOgaJpZM4Hwtgn
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: yann.[email protected]
X-Spam-Status: No, score=-3.5
X-Spam-Score: -34
X-Spam-Bar: ---
X-Ham-Report: Spam detection software, running on the system "serveur.ex2-p10.com",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
root\@localhost for details.
Content preview: sadly after updating my 2 very easily written scripts stopped
working as well, guess i have to invest some time to get them fixed... ---
You are receiving this because you are subscribed to this thread. Reply to
this email directly or view it on GitHub: https://github.com/RocketChat/Rocket.Chat/issues/2504#issuecomment-196764347
[...]
Content analysis details: (-3.5 points, 5.0 required)
pts rule name description
-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high
trust
[192.30.252.192 listed in list.dnswl.org]
-0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2)
[192.30.252.192 listed in wl.mailspike.net]
-0.0 SPF_PASS SPF: sender matches SPF record
1.6 HTML_IMAGE_ONLY_12 BODY: HTML: images with 800-1200 bytes of words
0.0 HTML_MESSAGE BODY: HTML included in message
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Spam-Flag: NO
----==_mimepart_56e7ea0e6e46a_659e3f7ef4bad29c11793c5
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
sadly after updating my 2 very easily written scripts stopped working as well, guess i have to invest some time to get them fixed...
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RocketChat/Rocket.Chat/issues/2504#issuecomment-196764347
----==_mimepart_56e7ea0e6e46a_659e3f7ef4bad29c11793c5
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
sadly after updating my 2 very easily written scripts stopped working as well, guess i have to invest some time to get them fixed...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RocketChat/Rocket.Chat/issues/2504#issuecomment-196764347![]()
----==_mimepart_56e7ea0e6e46a_659e3f7ef4bad29c11793c5--
the same for me.
i updated from 0.21 to 0.22, and then i saw the error. Its always error even if i create a new web hook.
I didn't understand the @yanndupuy 's message.
I think it means, they have plenty of support tickets open.
I'm getting this error too. I would like to know how to debug this to provide more info, because this error appears but no errors was show on logs.
@pavankumarkatakam I can't reproduce your error, can you paste your code here?
@fabiomontefuscolo can you paste your code and a print screen here?
Hi @rodrigok,
I'm using Rocket.Chat on Docker at version 0.22. Also, I used the script for github from Wiki[1]

[1] - https://github.com/RocketChat/Rocket.Chat/wiki/WebHook-Scripting---GitHub
@fabiomontefuscolo can you update your docker to latest develop image? This problem was solved.
If you can't, please add a new ENV var to your docker HOME=/tmp
This is still a problem for me for Outgoing Webhooks (I haven't tried Incoming) using a manually installed instance on CentOS with v0.39.0. I've tried with my own script and with the example GitHub integration script from the Wiki and I always have a blank error underneath the script field.
I've attached some screenshots if they're any use. Interestingly I was testing my integration scripts with the same version of RC installed locally on an Ubuntu VM and didn't have the problem at all.
Any suggestions?


Most helpful comment
@fabiomontefuscolo can you update your docker to latest develop image? This problem was solved.
If you can't, please add a new ENV var to your docker
HOME=/tmp