n8n-io/n8n · warning · ConflictError

409

409

Error message

Cannot ${action} workflow - you have this workflow open in another tab

What it means

validateWriteLock throws ConflictError (409) when the write lock is held by the same userId but a different clientId — i.e. the same user has the workflow open in another browser tab and the action would conflict with that tab.

Source

Thrown at packages/cli/src/collaboration/collaboration.service.ts:397

		action: string,
	): Promise<void> {
		if (!clientId) {
			return;
		}

		const lock = await this.state.getWriteLock(workflowId);

		if (!lock) {
			return;
		}

		if (lock.clientId === clientId) {
			return;
		}

		if (lock.userId === userId) {
			// Same user, different tab
			throw new ConflictError(
				`Cannot ${action} workflow - you have this workflow open in another tab`,
			);
		} else {
			// Different user
			throw new LockedError(`Cannot ${action} workflow - another user currently has write access`);
		}
	}
}

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Close the other editor tab(s) for that workflow and retry.
  2. Refresh the conflicting tab so it re-acquires/releases the lock correctly.
  3. Avoid editing the same workflow in multiple tabs simultaneously.

Example fix

n/a
Defensive patterns

Strategy: try-catch

Validate before calling

n/a (lock holder state is server-side and changes asynchronously)

Type guard

function isConflictError(error: unknown): boolean {
  return error instanceof Error && /open in another tab/.test(error.message);
}

Try / catch

try {
  await collaborationService.validateWriteLock(userId, clientId, workflowId, action);
} catch (e) {
  if (isConflictError(e)) { /* 409: tell user to close the other tab */ }
  else throw e;
}

Prevention

When it happens

Trigger: Request supplies userId+clientId, getWriteLock returns a lock with same lock.userId but different lock.clientId; the action parameter is interpolated into the message (e.g. 'save', 'activate').

Common situations: User has n8n open in two tabs and edits/saves in one while the other holds the lock; stale tab after a refresh; multiple windows of the same browser session.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/2600f1fd81354aec. Report an issue: GitHub.