peppermint icon indicating copy to clipboard operation
peppermint copied to clipboard

Crash when the server reads a reply to an email.

Open EdithDehoyos opened this issue 2 months ago • 1 comments

When the client receives an email about a comment made to their ticket, should they reply, the container crashes when it reads the client's reply.

The logs below gives clue as to why:

peppermint | /apps/api/dist/lib/services/imap.service.js:63 peppermint | throw new Error(Ticket not found: ${ticketId}); peppermint | ^ peppermint | Error: Ticket not found: 99284276 peppermint | at ImapService.processEmail (/apps/api/dist/lib/services/imap.service.js:63:23) peppermint | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) peppermint | at async /apps/api/dist/lib/services/imap.service.js:136:45 peppermint | Node.js v22.11.0 peppermint | 2025-11-09T07:02:10: PM2 log: App [api:1] exited with code [1] via signal [SIGINT] peppermint | 2025-11-09T07:02:13: PM2 log: App [api:1] starting in -fork mode- peppermint | 2025-11-09T07:02:13: PM2 log: App [api:1] online

If you pay attention, you'll see the variable ticketId gets loaded with a value of 99284276. I noticed that the reference number included in the email from Peppermint begins with 99284276, but then it continues into what appears to be a UUID of sorts. It would appear as if the code that parses replies to an email is not reading the full reference number.

The container is running on a Debian VM hosted on my Proxmox server.

EdithDehoyos avatar Nov 09 '25 07:11 EdithDehoyos

peppermint | /apps/api/dist/lib/services/imap.service.js:63 peppermint | throw new Error(Ticket not found: ${ticketId}); peppermint | ^ peppermint | Error: Ticket not found: 351 peppermint | at ImapService.processEmail (/apps/api/dist/lib/services/imap.service.js:63:23) peppermint | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) peppermint | at async /apps/api/dist/lib/services/imap.service.js:136:45 peppermint | Node.js v22.11.0 peppermint | 2025-11-09T19:38:46: PM2 log: App [api:1] exited with code [1] via signal [SIGINT] peppermint | 2025-11-09T19:38:49: PM2 log: App [api:1] starting in -fork mode- peppermint | 2025-11-09T19:38:49: PM2 log: App [api:1] online

Updating with another crash trace. This time it only read the first 3 digits on the reference number. The 4th digit is "B". It would appear as if the code stops when it reads a non-decimal value.

EdithDehoyos avatar Nov 09 '25 20:11 EdithDehoyos