node-red / node-red/node-red-nodes

Reading emails via pop3 or imap from localhost crashes node-red

Open
#934 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
13h 57m
Merged PRs (30d)
3

Description

Hi all,

I've got a citadel email server running on my raspberry pi along with Node-Red running Pi OS Lite.

Node-Red v3.0.0
Node.js v18.6.0
node-red-email v1.15.1

Every time I try to read email from the local Citadel server via pop3 or imap node-red hard crashes with this error:

15 Jul 21:36:25 - [error] TypeError: Cannot set property errored of #<Readable> which has only a getter
    at new MessageSplitter (/home/papershow/.node-red/node_modules/node-red-node-email/node_modules/mailsplit/lib/message-splitter.js:28:22)
    at new MailParser (/home/papershow/.node-red/node_modules/node-red-node-email/node_modules/mailparser/lib/mail-parser.js:132:25)
    at module.exports (/home/papershow/.node-red/node_modules/node-red-node-email/node_modules/mailparser/lib/simple-parser.js:29:18)
    at POP3Client.<anonymous> (/home/papershow/.node-red/node_modules/node-red-node-email/61-email.js:320:21)
    at POP3Client.emit (node:events:513:28)
    at /home/papershow/.node-red/node_modules/node-red-node-email/poplib.js:721:18
    at Socket.onData (/home/papershow/.node-red/node_modules/node-red-node-email/poplib.js:239:17)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)

This issue does not occur on node.js v14.20.0 or v16.x. This issue was resolved on the forums by downgrading my node.js version but it was suggested I post it here for futureproofing.

Thanks,
Toby

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with Node.js 18 using the node-red-node-email path shown in the trace. Start with 61-email.js and follow the POP3 flow through poplib.js, mailparser, and mailsplit/lib/message-splitter.js; compare behavior with Node.js 14 or 16. Done means reading mail from the local POP3 or IMAP server no longer crashes on Node.js 18.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.