Closed RobertoE91 closed 2 years ago
Thanks Roberto for reporting this , I'm pretty sure this is already being fixed by the extraction of messaging in a dedicated process.
@samuelmasse @laurentlp let's double check that.
This should fix it on master botpress/botpress#5248
Describe the bug Channel-Twilio uses
bp.experimental.conversations.forBot
to handle theconversationId
wich expects to be of typeuuid
, in the other side, the hitl-next module relies in the channel-web to create a new conversation when the handoff is escalated and this conversation is being create with aconversatioId
of typeInt
Launcher Unhandled Rejection [Error, insert into `messages` (`authorId`, `conversationId`, `eventId`, `id`, `incomingEventId`, `payload`, `sentOn`) values (NULL, '14', '364954670003600037', '0dfb3930-8970-414b-9e89-b23d826724a3', NULL, '{"type":"typing","value":10}', '2021-07-27T20:48:12.893Z') - SQLITE_CONSTRAINT: FOREIGN KEY constraint failed] STACK TRACE Error: SQLITE_CONSTRAINT: FOREIGN KEY constraint failed Cluster [web] Restarting process...
as you can see, is trying to insert in the table "messages" a new typing event/message with
14
as theconversationId
causing the entire platform to crash.To Reproduce Steps to reproduce the behavior:
Expected behavior prevent the platform to crash and not compromise other bots
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context This issue also happends using postgresql