FlowiseAI/Flowise · error · Error

${execution.logs.stderr.join('\n')}

Error message

${execution.logs.stderr.join('\n')}

What it means

Thrown by the Daytona sandbox branch when execution.error is empty but execution.logs.stderr has content. The sandboxed code ran but wrote to stderr — Flowise treats any stderr output as a hard failure rather than a warning.

Source

Thrown at packages/components/src/utils.ts:1716

                `module.exports = async function() {`,
                ...variableDeclarations,
                ...otherLines,
                `}()`
            ].join('\n')

            const execution = await sbx.runCode(codeWithImports, { language: 'js' })

            let output = ''

            if (execution.text) output = execution.text
            if (!execution.text && execution.logs.stdout.length) output = execution.logs.stdout.join('\n')

            if (execution.error) {
                throw new Error(`${execution.error.name}: ${execution.error.value}`)
            }

            if (execution.logs.stderr.length) {
                throw new Error(execution.logs.stderr.join('\n'))
            }

            // Stream output if streaming function provided
            if (streamOutput && output) {
                streamOutput(output)
            }

            // Clean up sandbox
            sbx.kill()

            return parseOutput(output)
        } catch (e) {
            throw new Error(`Sandbox Execution Error: ${e}`)
        }
    } else {
        const builtinDeps = process.env.TOOL_FUNCTION_BUILTIN_DEP
            ? defaultAllowBuiltInDep.concat(process.env.TOOL_FUNCTION_BUILTIN_DEP.split(','))
            : defaultAllowBuiltInDep

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Inspect the stderr lines in the message to see if they are fatal errors or merely warnings.
  2. Replace console.error with console.warn or structured logging if the messages are non-fatal diagnostics.
  3. If a dependency emits stderr warnings, suppress by setting NODE_NO_WARNINGS=1 or upgrading the dependency.
  4. Reconsider treating all stderr as fatal if your tooling legitimately logs diagnostics to stderr.

Example fix

// before — any stderr fails the run
if (execution.logs.stderr.length) {
  throw new Error(execution.logs.stderr.join('\n'))
}

// after — only fail on error-level stderr patterns; downgrade warnings
if (execution.logs.stderr.length) {
  const fatal = execution.logs.stderr.filter((l) => /Error|Exception|throw/i.test(l))
  if (fatal.length) throw new Error(fatal.join('\n'))
  console.warn('Sandbox stderr (non-fatal):', execution.logs.stderr.join('\n'))
}
Defensive patterns

Strategy: validation

Validate before calling

function classifyStderr(lines: string[]): 'fatal' | 'warning' {
  return lines.some((l) => /Error|Exception|throw|SyntaxError|ReferenceError|TypeError/i.test(l)) ? 'fatal' : 'warning'
}

Type guard

function isFatalStderr(line: string): boolean {
  return /\b(Error|Exception|throw|ReferenceError|TypeError|SyntaxError)\b/i.test(line)
}

Try / catch

if (execution.logs.stderr.length) {
  const fatal = execution.logs.stderr.filter(isFatalStderr)
  if (fatal.length) throw new Error(fatal.join('\n'))
  console.warn('Sandbox stderr (non-fatal):', execution.logs.stderr.join('\n'))
}

Prevention

When it happens

Trigger: User code uses console.error(...) for non-fatal logging; a dependency prints a deprecation warning to stderr (e.g. node:deprecation); an unhandled promise rejection warning lands on stderr; a library emits a stderr diagnostic that isn't actually fatal.

Common situations: Custom tool that uses console.error for soft validation messages; older libraries that warn about deprecated APIs to stderr; Node's ExperimentalWarning printed for features the sandboxed code uses; mixing debug logging that goes to stderr.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/1487167b40ac3a64. Report an issue: GitHub.