n8n - 💡(How to fix) Fix Destination node not found" error caused by ghost connection remaining in JSON after node deletion [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28458Fetched 2026-04-15 06:44:27
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×1mentioned ×1subscribed ×1

Error Message

When executing a workflow, a node failed with the error Problem in node '[Node Name]': Destination node not found. Upon inspecting the workflow's underlying JSON, the output connections for the failing node still contained a reference to a previously deleted node (in my case, a Wait node named "30sec"). The node had been deleted from the visual canvas, but the connection data was left behind in the JSON structure. Because the engine was trying to pass data to a node that no longer existed, it threw the error and triggered my error-handling route. 5. The execution fails at Node A with the "Destination node not found" error because the JSON still thinks it needs to route to Node B.

Root Cause

Upon inspecting the workflow's underlying JSON, the output connections for the failing node still contained a reference to a previously deleted node (in my case, a Wait node named "30sec"). The node had been deleted from the visual canvas, but the connection data was left behind in the JSON structure. Because the engine was trying to pass data to a node that no longer existed, it threw the error and triggered my error-handling route.

Code Example

"Jp Request NoteBook": {
  "main": [
    [
      {
        "node": "30sec", 
        "type": "main",
        "index": 0
      },
      {
        "node": "Eng Request NoteBook",
        "type": "main",
        "index": 0
      }
    ]
  ]
}
RAW_BUFFERClick to expand / collapse

Bug Description

When executing a workflow, a node failed with the error Problem in node '[Node Name]': Destination node not found.

Upon inspecting the workflow's underlying JSON, the output connections for the failing node still contained a reference to a previously deleted node (in my case, a Wait node named "30sec"). The node had been deleted from the visual canvas, but the connection data was left behind in the JSON structure. Because the engine was trying to pass data to a node that no longer existed, it threw the error and triggered my error-handling route.

The node disappears from the canvas, but the connection array in the JSON retains the deleted node, resulting in a ghost connection that crashes the execution.

To Reproduce

(Note: This seems to be an occasional UI state bug and may be hard to reproduce consistently)

  1. Have a workflow with several connected nodes (e.g., Node A -> Node B -> Node C).
  2. Delete the middle node (Node B).
  3. Connect Node A directly to Node C.
  4. Execute the workflow.
  5. The execution fails at Node A with the "Destination node not found" error because the JSON still thinks it needs to route to Node B.

Expected behavior

When a node is deleted from the canvas, all internal JSON connection references to that node should be completely and permanently removed.

Debug Info

I was able to fix the issue by deleting the visual wire connecting Node A and Node C, and manually redrawing it. This forced the canvas to update the JSON structure and successfully erased the ghost connection.

Here is a snippet of the JSON showing the ghost connection before I fixed it. "30sec" was the deleted node:

"Jp Request NoteBook": {
  "main": [
    [
      {
        "node": "30sec", 
        "type": "main",
        "index": 0
      },
      {
        "node": "Eng Request NoteBook",
        "type": "main",
        "index": 0
      }
    ]
  ]
}

Operating System

mac-os

n8n Version

2.15.0

Node.js Version

22.22.2

Database

PostgreSQL

Execution mode

main (default)

Hosting

self hosted

extent analysis

TL;DR

Manually removing and redrawing the connection between nodes can resolve the "Destination node not found" error caused by ghost connections in the workflow JSON.

Guidance

  • When deleting a node, verify that all connections to and from the node are also removed from the workflow JSON to prevent ghost connections.
  • If a ghost connection is suspected, try deleting and redrawing the affected connections to force the canvas to update the JSON structure.
  • Inspect the workflow JSON for any references to deleted nodes, such as the example provided, to identify potential ghost connections.
  • Consider implementing a validation check after node deletion to ensure all connections are properly updated in the JSON.

Example

The provided JSON snippet shows a ghost connection:

"Jp Request NoteBook": {
  "main": [
    [
      {
        "node": "30sec", 
        "type": "main",
        "index": 0
      },
      {
        "node": "Eng Request NoteBook",
        "type": "main",
        "index": 0
      }
    ]
  ]
}

This should be updated to remove the reference to the deleted node "30sec".

Notes

This issue appears to be related to a UI state bug, and the provided workaround may not always be effective. Further investigation into the root cause of the bug may be necessary to implement a more robust solution.

Recommendation

Apply the workaround of manually removing and redrawing connections to resolve the issue, as the root cause of the UI state bug is not clear and a fixed version is not implied.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a node is deleted from the canvas, all internal JSON connection references to that node should be completely and permanently removed.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING