Cast to ObjectId failed for value "" (type string) at path "_id" for model "tickettypes"
Closed this issue · 1 comments
Is this a BUG REPORT or FEATURE REQUEST?:
- BUG
- FEATURE
What happened:
12-07-2023 16:04:17 [212] warn: Cast to ObjectId failed for value "" (type string) at path "_id" for model "tickettypes" - CastError: Cast to ObjectId failed for value "" (type string) at path "_id" for model "tickettypes"
at model.Query.exec (/usr/src/trudesk/node_modules/mongoose/lib/query.js:4777:21)
at Function.ticketTypeSchema.statics.getType (/usr/src/trudesk/src/models/tickettype.js:80:12)
at handleTicketType (/usr/src/trudesk/src/mailer/mailCheck.js:322:32)
at runTask (/usr/src/trudesk/node_modules/async/dist/async.js:1155:17)
at /usr/src/trudesk/node_modules/async/dist/async.js:1091:35
at processQueue (/usr/src/trudesk/node_modules/async/dist/async.js:1101:17)
at Object.auto (/usr/src/trudesk/node_modules/async/dist/async.js:1088:9)
at /usr/src/trudesk/src/mailer/mailCheck.js:249:13
at Array.forEach ()
at handleMessages (/usr/src/trudesk/src/mailer/mailCheck.js:240:12)
at /usr/src/trudesk/src/mailer/mailCheck.js:206:23
at Connection. (/usr/src/trudesk/node_modules/imap/lib/Connection.js:453:7)
at Connection._resTagged (/usr/src/trudesk/node_modules/imap/lib/Connection.js:1535:22)
at Parser. (/usr/src/trudesk/node_modules/imap/lib/Connection.js:194:10)
at Parser.emit (node:events:526:28)
at Parser._resTagged (/usr/src/trudesk/node_modules/imap/lib/Parser.js:175:10)
at Parser._parse (/usr/src/trudesk/node_modules/imap/lib/Parser.js:139:16)
at Parser._tryread (/usr/src/trudesk/node_modules/imap/lib/Parser.js:82:15)
at TLSSocket.Parser.cbReadable (/usr/src/trudesk/node_modules/imap/lib/Parser.js:53:12)
at TLSSocket.emit (node:events:526:28)
at emitReadable (node:internal/streams/readable:578:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
What did you expect to happen:
mail is processed
How to reproduce it (as minimally and precisely as possible):
configure imap account
send email to this account
wait for processing
Anything else we need to know?:
Environment:
- Trudesk Version: 1.2.10
- OS (e.g. from /etc/os-release): docker-compose deployment from master branch
- Node.JS Version:
- MongoDB Version:
- Is this hosted on cloud.trudesk.io: no
problem was in missing mailer settings
settings->mailer->mailer check->default ticket type