Hi @MutedJam , i’m unable to do so because those workflows are critical for a few business operations, and i don’t know how to implement a workaround for IMAP triggers in n8n, without the Imap node.
Kindly share if you do know of something for that.
jan
June 3, 2022, 6:33pm
22
fyi did some googling. Looks like it gets caused by the imap node and the library we are using:
opened 04:30PM - 06 Sep 21 UTC
`[connection] Ended
[connection] Error: Error: This socket has been ended by th… e other party
events.js:287
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:452:14)
at JSStreamSocket.doWrite (internal/js_stream_socket.js:170:19)
at JSStream.onwrite (internal/js_stream_socket.js:28:57)
at TLSSocket.Socket._final (net.js:415:28)
at callFinal (_stream_writable.js:609:10)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on Connection instance at:
at TLSSocket._onError (C:\Users\admin\Desktop\node-imap\node_modules\imap\lib\Connection.js:151:10)
at TLSSocket.emit (events.js:310:20)
at TLSSocket._emitTLSError (_tls_wrap.js:873:10)
at JSStreamSocket.<anonymous> (_tls_wrap.js:805:36)
at JSStreamSocket.emit (events.js:310:20)
at Socket.<anonymous> (internal/js_stream_socket.js:58:38)
at Socket.emit (events.js:310:20)
at emitErrorNT (net.js:1340:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'EPIPE',
source: 'socket'
}`
"imap": "^0.8.19"
node: v12.16.3
opened 04:22PM - 16 Mar 22 UTC
No matter what I do, I keep losing connection to Gmail after a few hours.
I'v… e tried adding `keepalive` options, as well as trying to create a `new Imap()` when a disconnect happens.
My code is at https://github.com/dzg/matrix-googlevoice/blob/main/matrix-googlevoice-bot.js
Sometimes I'll get an error:
```
node:events:368
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (node:net:474:14)
at JSStreamSocket.doWrite (node:internal/js_stream_socket:175:19)
at JSStream.onwrite (node:internal/js_stream_socket:33:57)
at TLSSocket.Socket._final (node:net:443:28)
at callFinal (node:internal/streams/writable:695:27)
at prefinish (node:internal/streams/writable:724:7)
at finishMaybe (node:internal/streams/writable:734:5)
at TLSSocket.Writable.end (node:internal/streams/writable:632:5)
at TLSSocket.Socket.end (node:net:609:31)
at endWritableNT (node:internal/streams/readable:1369:12)
Emitted 'error' event on MailListener instance at:
at MailListener.imapError (/Users/zeev/Documents/matrix/matrix-googlevoice/matrix-googlevoice-bot.js:172:26)
at Connection.emit (node:events:390:28)
at TLSSocket._onError (/Users/zeev/node_modules/imap/lib/Connection.js:151:10)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._emitTLSError (node:_tls_wrap:900:10)
at JSStreamSocket.<anonymous> (node:_tls_wrap:819:36)
at JSStreamSocket.emit (node:events:390:28)
at Socket.<anonymous> (node:internal/js_stream_socket:63:38)
at Socket.emit (node:events:390:28)
at emitErrorNT (node:internal/streams/destroy:164:8) {
code: 'EPIPE',
source: 'socket'
}
```
Should be possible to catch this error and then do a reconnect.
1 Like
jan
June 4, 2022, 7:56am
23
Did commit a possible fix:
n8n-io:master
← n8n-io:improve-imap-error-handling
opened 07:55AM - 04 Jun 22 UTC
https://community.n8n.io/t/urgent-n8n-docker-self-hosted-instance-restarting-eve… ry-3-8-minutes/12613/21
Will be released with the next version.
3 Likes
jan
June 7, 2022, 8:24pm
24
Got released with [email protected]
Hey @shrey-42 Jan implemented a fix, could you test if it solves the issue you were having?
1 Like
cccc
June 18, 2022, 6:49am
26
I have made the changes according to this but still getting this somewhat ambiguous error.
However, other than IMAP, I am also using kafka trigger.