UnhandledPromiseRejectionWarning in IMAP handler
See original GitHub issueHi,
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)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Nodejs imap-simple UnhandledPromiseRejectionWarning issue
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not...
Read more >Developers - UnhandledPromiseRejectionWarning in IMAP handler -
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...
Read more >I am getting this error . UnhandledPromiseRejectionWarning
After adding try catch block getting "Error: No refresh token or refresh handler callback is set." this error. Any way to make it...
Read more >How to Resolve Certificate Errors in a NodeJS App with SSL ...
These errors originate from the SSL handshake process. When a client begins to establish a connection to the server, a TLS handshake happens....
Read more >Unhandled Promise Rejections in Node.js - The Code Barbarian
Note that if you attach a listener to 'unhandledRejection', the default warning to the console (the UnhandledPromiseRejectionWarning from ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See #195 … I think it is the problem.
Also seeing the UnhandledPromiseRejectionWarning: Error: Unexpected char at position 18 error. It’s definitely occuring while the IMAP client is simply idling (not retrieving a message). The host I’m connected to is imap-mail.outlook.com: