https://discord.gg/botpress logo
Chatbot not replying at all
# 🤝help
e
I am getting this error:
Copy code
error in handler TypeError: Cannot read properties of undefined (reading 'name')
    at Object.handleMessage (/var/task/customer_code.js:3500:72822)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /var/task/customer_code.js:3500:79650
    at async Rf.beforeIncomingMessage (/var/task/customer_code.js:3188:5203)
    at async Object.beforeEvent (/var/task/customer_code.js:3397:4708)
    at async /var/task/customer_code.js:3399:395
    at async /var/task/customer_code.js:172:339
    at async Object.handleEvent (/var/task/customer_code.js:3399:300)
    at async /var/task/customer_code.js:3397:4651
    at async /var/task/customer_code.js:172:339
    at async Object.onMessage (/var/task/customer_code.js:3397:4626)
    at async handler (/var/task/customer_code.js:4445:94013)
    at async /var/task/index.js:20:13738
    at async handleHTTPEvent (/var/task/index.js:20:13714)
    at async Runtime.handler (/var/task/index.js:20:13603)
And I get no replies! If anyone has seen this before could you help me?
l
error in handler TypeError: Cannot read properties of undefined (reading 'name') where are you getting this error?
e
Here is a more detail beakdown: userId: user_01JTDM9ED1RYZAJT8NG8QYT9C1 conversationId: conv_01JTDMJZSK48T804Y6C7J1QNGN type: text linesOfCode: 8 codeHash: kfhux9 channel: channel integration: webchat preview: 📍 Παραγγελίες & Παρακολούθηση messageId: 9270ac1a-d65c-4529-b53a-b271006384cf payload: { "type": "text", "text": "📍 Παραγγελίες & Παρακολούθηση", "value": "📍 Παραγγελίες & Παρακολούθηση", "metadata": { "clientMessageId": "mWztmZbcdGqvdkHNtoU2q" } } userCode: const { success } = await actions['codemazes/botdesk'].handleOutgoingMessage({ outgoingEvent, incomingEvent: event }); if (!success) { throw new Error('Failed to handle outgoing message in Botdesk.'); } stack: ROOT [Running – 39ms] └─┬ Incoming Event: webchat/channel/text [📍 Παραγγελίες & Παρακολούθηση] [Running – 39ms] └─┬ Hook: before_incoming_middleware/Botdesk_Before [Running – 38ms] └── User Code: kfhux9 (8 lines) [Running – 3ms] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ message: An error occured while running Execute Code card: Error: outgoingEvent is not defined Transpiled Code: 003 async function __ROOT__() { 004 var __defProp = Object.defineProperty; 005 var __name = (target, value) => __defProp(target, "name", { 006 value, 007 configurable: true 008 }); 009 async function __ROOT__() { 010 const { 011 success 012 } = await actions["codemazes/botdesk"].handleOutgoingMessage({ > 013 outgoingEvent, ^^^^^^^^^^ 014 incomingEvent: event 015 }); 016 if (!success) { 017 throw new Error("Failed to handle outgoing message in Botdesk."); 018 } 019 ; 020 } 021 __name(__ROOT__, "__ROOT__"); 022 ; > 023 return await __ROOT__(); ^^^^^^^^^^ 024 ; > 025 }; return await __ROOT__(); ^^^^^^^^^^
I have deleted this webhook and still get this issue
@big-exabyte-11675
l
Did you publish the code post deleting?
e
Yes
It's bugged
it thinks it's still there
l
If yes send a //state/reset on the webchat and then try
e
how do i do that?
l
Send this as a message on the webchat that you are testing on
e
send what? //state/reset?
Did it
Same issue persists
l
Republish the code and do reset again, some times the code does not get published in 1st attempt
e
I've republished alot of times at this point
l
Report this as a problem, with @cold-motherboard-82208
e
how do I do that?
just email them?
e
Thanks alot man!
This is my current webhooks
b
@early-cartoon-84199 I can see that hooks were not removed for some reason. I would try exporting your bot, then creating new bot and import what you just exported, that should help to remove those hooks permanatelly
Botdesk integration are not subscribing those hooks automatically, just what you are creating in hooks manually.
Does it make any difference to create that problem in Botpress. I've created several of them, never heard of ony update on them?
p
For it to be reviewed, I would suggest pasting the report id you get at the end, in the help thread about your issue so that I can take a look at your bot.
b
Yes I know, always doing that, pasting report id. Also today created new issue in help section about HITL integration and new HITL plugin.
p
Yeah I just replied to that. Regarding your previous problem reports, if you want to reference those threads if any have not been resolved yet, then I'll be able to go over them.
e
Leanne, what can I do to resolve this issue?
with the webhooks beinc cached?
I tried exporting the bot and adding it to a new one
But it just did not work
@prehistoric-airplane-85682 what do I need to do to make my bot funcitonal again? I have already made a ticket with the support team. Have not heard anything back. Although now I am just wasting money with my subscription and the bot slot.
Tried copying the bot to a new one had the same issue
same with exporting
p
Sorry for the delay in response time, we do get a lot of enquiries. I see your bot is not answering any user message, but I'm not sure I understand the context for your bot and its workflow. Could you send a screenshot or description of your workflow?
e
it's not an issue with the workflow
it has cached a webhook that bugged it
and even though it's deleted, it's like the webhook is cached and the problem persists
p
I've inquired to the team and it is a known issue that's in the process of being fixed. Will keep you posted when there are developments.
e
In the mean time, what can i do?
It's costing me money
and credibility to the client
p
Could you create the bot again without copy and pasting or importing in order to avoid accidentally adding the webhook that is causing issues? I'm aware this is not a pleasant solution but it is the only think I can think of at the moment
4 Views