n8n-io/n8n · error
Failed to create sandbox workspace directory "${path}": ${ge
Error message
Failed to create sandbox workspace directory "${path}": ${getErrorMessage(error)}; command fallback failed: ${getErrorMessage(fallbackError)} What it means
Error "Failed to create sandbox workspace directory "${path}": ${getErrorMessage(error)}; command fallback failed: ${getErrorMessage(fallbackError)}" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/instance-ai/src/workspace/sandbox-setup.ts:357
}
type WorkspaceFilesystem = NonNullable<SandboxWorkspace['filesystem']>;
async function createWorkspaceDirectory(
workspace: SandboxWorkspace,
filesystem: WorkspaceFilesystem,
path: string,
): Promise<void> {
try {
await filesystem.mkdir(path, { recursive: true });
} catch (error) {
try {
const result = await runInSandbox(workspace, `mkdir -p '${escapeSingleQuotes(path)}'`);
if (result.exitCode === 0) return;
throw new Error(result.stderr || `mkdir exited with code ${result.exitCode}`);
} catch (fallbackError) {
throw new Error(
`Failed to create sandbox workspace directory "${path}": ${getErrorMessage(error)}; command fallback failed: ${getErrorMessage(fallbackError)}`,
);
}
}
}
async function writeWorkspaceFile(
workspace: SandboxWorkspace,
filesystem: WorkspaceFilesystem,
path: string,
content: string | Buffer,
): Promise<void> {
try {
await filesystem.writeFile(path, content, { recursive: true });
} catch (error) {
try {
await writeFileViaSandbox(workspace, path, content);
} catch (fallbackError) {View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/instance-ai/src/workspace/sandbox-setup.ts:357 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/a40cdfb26ff5f84c.
Report an issue: GitHub.