Skip to content

Crash when the server reads a reply to an email. #503

@EdithDehoyos

Description

@EdithDehoyos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions