Email Trigger (IMAP) hanging when manually executing workflow

Describe the problem/error/question

Did a recent 0.x upgrade to version 1.25.1
Now, when trying to start stop a workflow with the Email Trigger (IMAP), it either executes first when being stopped or not at all. When not at all, it throughs an error.

What is the error message (if any)?

When manually triggering the Email Trigger (IMAP) for Exchange server access, it hangs until I manually stops it. While being stopped, it will kick of the single node and spit out the email (UNREAD). This is for a single node test. In a more complex workflow, it mostly fails to stop the workflow and it throws an error:

## Problem stopping execution
*Only running or waiting executions can be stopped and 2003 is currently failed.*

The Email Trigger (IMAP) works fine in active workflows but the current issue makes it difficult to debug development or troubleshooting workflows.

Please share your workflow

{
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “92f6d5f723cb2bb0d6439d2fe2b50504c0ed2416455f51e8086b1fcd8df95e23”
},
“nodes”: [
{
“parameters”: {
“postProcessAction”: “nothing”,
“format”: “resolved”,
“options”: {
“customEmailConfig”: “["UNSEEN"]”
}
},
“id”: “047a552d-3b4b-4a8f-ac02-464b4b24a0d3”,
“name”: “Email Trigger (IMAP)”,
“type”: “n8n-nodes-base.emailReadImap”,
“typeVersion”: 2,
“position”: [
860,
360
],
“credentials”: {
“imap”: {
“id”: “1”,
“name”: “IMAP account”
}
}
}
],
“connections”: {},
“pinData”: {}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
    1.25.1
  • Database (default: SQLite):
    SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
    docker
  • Operating system:

Hey @DkYSwe,

How do you have n8n installed? There were some big changes going into v1 like websockets being the default option and if your reverse proxy is not configured for that you will see some issues similar to this.

1 Like

Hi Jon,

Quick reply as always.
Actually, we are proxying it over an nginx instance on the host running the n8n container, so seems like a match. :slight_smile:

EDIT:
Found solution, add

proxy_set_header Connection "Upgrade";
proxy_set_header Upgrade $http_upgrade;

to the nginx config file

Info found here: 1.0.1: Invalid or unexpected token · Issue #6641 · n8n-io/n8n · GitHub

Thanks for getting me in the right direction.

//Daniel

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.