chadxz / imap-simple

Wrapper over node-imap, providing a simpler api for common use cases
MIT License
245 stars 79 forks source link

Error: Client network socket disconnected before secure TLS connection was established #99

Closed ayoubrabeh closed 3 years ago

ayoubrabeh commented 3 years ago

Hello, i was using imap-simple until today when i got this error everytime i try to retrieve emails and crash my app " you can find the console error below " Anyone have the same error ?

events.js:174 throw er; // Unhandled 'error' event ^

Error: Client network socket disconnected before secure TLS connection was established at TLSSocket.onConnectEnd (_tls_wrap.js:1125:19) at Object.onceWrapper (events.js:286:20) at TLSSocket.emit (events.js:203:15) at TLSSocket.EventEmitter.emit (domain.js:448:20) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) Emitted 'error' event at: at TLSSocket._onError (/usr/src/app/node_modules/imap/lib/Connection.js:151:10) at TLSSocket.emit (events.js:198:13) at TLSSocket.EventEmitter.emit (domain.js:448:20) at emitErrorNT (internal/streams/destroy.js:91:8) at process._tickCallback (internal/process/next_tick.js:63:19)

Leetcore commented 3 years ago

What port are you using? Did you use the TSL port and is tls set to true on your config object?