ERROR - Messenger Integration - Single Choice - Pa...
# 🤝help
g
Report ID: c4b59338-3c9a-46e3-af21-abd7df776eb7 I am running a bot in Facebook Messenger (development environment) and encountering an error. No error occurs when running in the Botpress Studio Environment. When the dialog reaches a 'Single Choice' on Messenger, the dialog ends an error is logged: Error sending outgoing message { integration: 'messenger', messageType: 'choice', payload: '{"type":"choice","text":"","options":[{"label":"Instant property valuation","value":"Instant property valuation"},{"label":"Properties for Sale","value":"Properties for Sale"},{"label":"Properties to Let","value":"Properties to Let"}]}', error: Bt [Error]: data/text must NOT have fewer than 1 characters at Mr (/var/task/customer_code.js:8:27989) at Ot (/var/task/customer_code.js:8:27769) at w (/var/task/customer_code.js:8:67156) at /var/task/customer_code.js:8:62056 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.flushSendMessages (/var/task/customer_code.js:297:4944) at async runDialogEngine (/var/task/customer_code.js:318:3660) at async startEventProcessing (/var/task/customer_code.js:318:3247) at async Object.onEvent (/var/task/customer_code.js:318:8013) at async Object.onMessage (/var/task/customer_code.js:318:7655) { isApiError: true, code: 400, description: "The provided data doesn't respect the provided JSON schema.", type: 'InvalidDataFormat', error: undefined } } The error seems to be stemming from the empty 'text' element. This same bot was working yesterday and I don't believe that any changes were made since to the 'Single Choice' card which is throwing the error. Thanks.
g
Hey @gray-fall-43147, looks like you have an empty field in your single choice ("text must NOT have fewer than 1 characters"), can you check in your studio that everything is filled? If it is, could you send me a screenshot of that specific single choice where it gets stuck? 🙂
g
Hi Louis, here is the single choice in question

https://cdn.discordapp.com/attachments/1138811752004468786/1138830503701663795/image.png

and the code in the first card

https://cdn.discordapp.com/attachments/1138811752004468786/1138830784103469167/image.png

I have also tried adding a failure transition but this did not help :/
g
Hmm I see. And you've published your bot after the changes right? For the sake of testing, could you add text rather than a variable in the question and publish your bot again?
g
OK so strangely this is now partially working when I change the variable out for text
I have entered 'Hello'

https://cdn.discordapp.com/attachments/1138811752004468786/1138842158099611738/image.png

And I am getting 'Hell' 😅

https://cdn.discordapp.com/attachments/1138811752004468786/1138842305827176518/image.png

35 Views