Skip to content

UnhandledPromiseRejectionWarning in IMAP handler #192

Open
@Touffy

Description

@Touffy

Hi,

I randomly get this error when the connection has been open for about one to six hours (outlook.office.com IMAP server). It does trigger client.onerror but can't be caught by a catch on the client's methods.

Running on heroku with node ^10.

Haven't been able to reproduce it at will (it just happens on its own after some time, at which point I create a new client and reconnect and it works fine until it happens again, etc).

(node:20) UnhandledPromiseRejectionWarning: Error: Unexpected char at position 18
    at ParserInstance.getElement (/app/node_modules/emailjs-imap-handler/dist/parser.js:152:17)
    at ParserInstance.getCommand (/app/node_modules/emailjs-imap-handler/dist/parser.js:112:29)
    at exports.default (/app/node_modules/emailjs-imap-handler/dist/parser.js:17:29)
    at Imap._parseIncomingCommands (/app/node_modules/emailjs-imap-client/dist/imap.js:577:51)
    at Imap._onData (/app/node_modules/emailjs-imap-client/dist/imap.js:428:10)
    at TCPSocket.socket.ondata.evt (/app/node_modules/emailjs-imap-client/dist/imap.js:160:16)
    at TCPSocket._emit (/app/node_modules/emailjs-tcp-socket/dist/node-socket.js:103:31)
    at TLSSocket.<anonymous> (/app/node_modules/emailjs-tcp-socket/dist/node-socket.js:69:23)
    at TLSSocket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)

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