RocketChat / RocketChat/Rocket.Chat
Direct Reply by Email broken (3.12.0-rc.1)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Hello Devs.
Direct Reply by Email is broken in 3.12.0-rc.1. Don't know if it worked before. Just tried this feature after a long time again. Here is what the logs say:
I20210227-10:32:41.388(1) Exception in callback of async function: Error: Expected array for search criteria at Connection._search (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Connection.js:573:11) at Connection.search (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Connection.js:566:8) at IMAPIntercepter.getEmails (server/email/IMAPInterceptor.ts:99:13) at server/email/IMAPInterceptor.ts:46:11 at Connection.<anonymous> (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Connection.js:432:7) at Connection._resTagged (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Connection.js:1535:22) at Parser.<anonymous> (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Connection.js:194:10) at Parser.emit (events.js:314:20) at Parser.EventEmitter.emit (domain.js:483:12) at Parser._resTagged (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Parser.js:175:10) at Parser._parse (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Parser.js:139:16) at Parser._tryread (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Parser.js:82:15) at Socket.Parser._cbReadable (/opt/rocketchat-3.12.0-rc1/programs/server/npm/node_modules/imap/lib/Parser.js:53:12) at Socket.emit (events.js:314:20) at Socket.EventEmitter.emit (domain.js:483:12) at emitReadable_ (_stream_readable.js:557:12) at processTicksAndRejections (internal/process/task_queues.js:83:21)
Steps to reproduce:
- Enable direct Reply
- Reply to an Email
- Email gets not processed by Rocketchat
Expected behavior:
Email gets processed by Rocketchat
Actual behavior:
Rocketchat IMAP handling crashes.
Server Setup Information:
- Version of Rocket.Chat Server: 3.12.0-rc.1
- Operating System: Linux
- Deployment Method: tar
- Number of Running Instances: 1
- DB Replicaset Oplog: yes
- NodeJS Version: 12.21.0
- MongoDB Version: 4.2.11
Client Setup Information
not importent.
Additional context
nothing.
Relevant logs:
already posted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at server/email/IMAPInterceptor.ts, especially line 99 from the stack trace, and inspect the search criteria passed to the IMAP connection. Reproduce the issue by enabling Direct Reply and replying to an email on the reported setup. Done means the IMAP handler no longer crashes and the email is processed by Rocket.Chat.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100