n8n - 💡(How to fix) Fix CollaborationPane unmounts collaboration store on single-user instances, causing permanent "No network connection" state

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…

Error Message

  • error: all

Root Cause

Root cause (traced via browser DevTools) (ver 2.23)

Code Example

function be() {
    typeof P.value == 'function' && (P.value(), P.value = null),
    U(),   // sends workflowClosed
    W(),   // stopHeartbeat
    K(),
    J(),
    Q(),
    R.value && Z(),
    a.clearQueue(),
    ae(),
    E.value && clearTimeout(E.value),
    $(),
    F.value = null,
    O.value = null,
    D.value = []
}

---

// CollaborationPane component
b(() => { n.initialize(i.value) })  // onBeforeMount → initialize
M(() => { n.terminate() })          // onUnmounted  → terminate

// Conditional render — only shown when collaborators.length > 1
return o.value
    ? (render pane)
    : g('', true)  // ← unmounts immediately on single-user instances

---

10:52:17.758  workflowOpened     (sent by frontend)
10:52:17.824  collaboratorsChanged  (received: 1 collaborator)
10:52:22.754  workflowClosed     (sent by frontend, ~5s later after Vue unmount)
[only heartbeats after this — frontend stays offline forever]

---

debug | Add editor-UI session        {"pushRef":"qtglq24o2h"}
debug | Pushed to frontend: collaboratorsChanged  {"pushRefs":"qtglq24o2h"}
debug | Received message from editor-UI  {"msg":{"type":"workflowClosed"}}
[no further push events to this session]
RAW_BUFFERClick to expand / collapse

Bug Description

On self-hosted instances in queue mode, the editor permanently shows "No network connection" banner even though:

  • WebSocket connection to /rest/push is established successfully (HTTP 101)
  • Heartbeat frames {"type":"heartbeat"} are received continuously
  • All REST API requests return HTTP 200
  • No errors in server logs
  • No CORS or origin errors

Root cause (traced via browser DevTools) (ver 2.23)

By intercepting WebSocket.prototype.send captured the exact sequence:

  1. Page loads → CollaborationPane mounts → onBeforeMount calls collaborationStore.initialize(workflowId) → sends workflowOpened to server
  2. Server responds with collaboratorsChanged event containing a single collaborator (the current user)
  3. CollaborationPane has a conditional render: it only renders when collaborators.length > 1
  4. Since there is only one user, the computed returns false → Vue unmounts CollaborationPane
  5. onUnmounted fires → calls collaborationStore.terminate() → sends workflowClosed to server
  6. terminate() clears all collaboration state, sets F.value = null — the frontend never recovers to "online" state

The full unmount sequence in collaboration.store (terminate / be):

function be() {
    typeof P.value == 'function' && (P.value(), P.value = null),
    U(),   // sends workflowClosed
    W(),   // stopHeartbeat
    K(),
    J(),
    Q(),
    R.value && Z(),
    a.clearQueue(),
    ae(),
    E.value && clearTimeout(E.value),
    $(),
    F.value = null,
    O.value = null,
    D.value = []
}

Confirmed in minified source of WorkflowLayout.js:

// CollaborationPane component
b(() => { n.initialize(i.value) })  // onBeforeMount → initialize
M(() => { n.terminate() })          // onUnmounted  → terminate

// Conditional render — only shown when collaborators.length > 1
return o.value
    ? (render pane)
    : g('', true)  // ← unmounts immediately on single-user instances

Timeline from WebSocket Messages log:

10:52:17.758  workflowOpened     (sent by frontend)
10:52:17.824  collaboratorsChanged  (received: 1 collaborator)
10:52:22.754  workflowClosed     (sent by frontend, ~5s later after Vue unmount)
[only heartbeats after this — frontend stays offline forever]

Server debug log confirms the store is torn down:

debug | Add editor-UI session        {"pushRef":"qtglq24o2h"}
debug | Pushed to frontend: collaboratorsChanged  {"pushRefs":"qtglq24o2h"}
debug | Received message from editor-UI  {"msg":{"type":"workflowClosed"}}
[no further push events to this session]

To Reproduce

  1. Self-hosted n8n in queue mode (EXECUTIONS_MODE=queue)
  2. Single user logged in (no other active sessions)
  3. Open any workflow in the editor
  4. Observe "No network connection" banner after ~5 seconds
  5. Check WebSocket Messages in DevTools — workflowClosed is sent ~5s after workflowOpened

Expected behavior

collaborationStore.initialize() and collaborationStore.terminate() should not be tied to the visibility of CollaborationPane. The store lifecycle should be managed independently of whether the pane UI is rendered. On 2.14.2 this worked correctly.

Debug Info

Debug info

core

  • n8nVersion: 2.23.0
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.15.0
  • nodeEnv: production
  • database: postgres
  • executionMode: scaling (single-main)
  • concurrency: 20
  • license: enterprise (production)
  • consumerId: 2ef7c6aa-bea0-46ff-b2cc-896795e7dbae

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/605.1.15 (khtml, like gecko) version/18.4 safari/605.1.15
  • isTouchDevice: false

cluster

  • instanceCount: 3
  • versions: 2.23.0
  • instances:
    • instanceKey: ab7a8490-7a88-479f-af81-acc6f93bda10, hostId: webhook-n8n-webhook-85745f49cb-v69cs, instanceType: webhook, instanceRole: unset, version: 2.23.0
    • instanceKey: bca4276a-5940-459b-a9a8-dd6446168934, hostId: worker-n8n-worker-6f9b8bd5-h9vjq, instanceType: worker, instanceRole: unset, version: 2.23.0
    • instanceKey: c1c78b54-f68a-4e7b-bdda-9dd5bdfe8445, hostId: main-n8n-main-66995f5bbf-r9blz, instanceType: main, instanceRole: leader, version: 2.23.0
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-05-28T11:41:26.504Z

Operating System

official n8nio/n8n docker image

n8n Version

Reproduced on: 2.15, 2.16, 2.19, 2.23 (works correctly on 2.14.2)

Node.js Version

v24.15.0

Database

PostgreSQL

Execution mode

queue

Hosting

self hosted

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

collaborationStore.initialize() and collaborationStore.terminate() should not be tied to the visibility of CollaborationPane. The store lifecycle should be managed independently of whether the pane UI is rendered. On 2.14.2 this worked correctly.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING