Stirling-Tools/Stirling-PDF · error · Error
No automation configuration provided
Error message
No automation configuration provided
What it means
Thrown by the automate tool's customProcessor when `params.automationConfig` is falsy. The automate tool is a multi-step pipeline driver; it requires a structured automationConfig (the ordered step list) to call `executeAutomationSequence`. Without it there is nothing to execute, so it refuses rather than running zero steps silently.
Source
Thrown at frontend/editor/src/core/hooks/tools/automate/useAutomateOperation.ts:22
} from "@app/hooks/tools/shared/useToolOperation";
import { useCallback } from "react";
import { executeAutomationSequence } from "@app/utils/automationExecutor";
import { useToolRegistry } from "@app/contexts/ToolRegistryContext";
import { AutomateParameters } from "@app/types/automation";
export function useAutomateOperation() {
const { allTools } = useToolRegistry();
const toolRegistry = allTools;
const customProcessor = useCallback(
async (params: AutomateParameters, files: File[]) => {
console.log("🚀 Starting automation execution via customProcessor", {
params,
files,
});
if (!params.automationConfig) {
throw new Error("No automation configuration provided");
}
// Execute the automation sequence and return the final results
const finalResults = await executeAutomationSequence(
params.automationConfig!,
files,
toolRegistry,
(stepIndex: number, operationName: string) => {
console.log(`Step ${stepIndex + 1} started: ${operationName}`);
params.onStepStart?.(stepIndex, operationName);
},
(stepIndex: number, resultFiles: File[]) => {
console.log(
`Step ${stepIndex + 1} completed with ${resultFiles.length} files`,
);
params.onStepComplete?.(stepIndex, resultFiles);
},
(stepIndex: number, error: string) => {View on GitHub (pinned to 9ef20dcab8)
Solutions
- Disable the 'Run automation' button until automationConfig is non-null and has at least one step.
- Construct the automationConfig in the caller and assert its shape before invoking the operation.
- Guard with an earlier validation in the parameter schema (validateParams) so the error surfaces at validation time with a field-level message.
Example fix
// before
if (!params.automationConfig) {
throw new Error("No automation configuration provided");
}
// after — validate at the schema boundary with a human message
const cfg = params.automationConfig;
if (!cfg || cfg.steps.length === 0) {
throw new Error("No automation configuration provided: add at least one step before running.");
} Defensive patterns
Strategy: validation
Validate before calling
// Ensure automationConfig exists and has steps before invoking
const cfg = params.automationConfig;
if (!cfg || !Array.isArray(cfg.steps) || cfg.steps.length === 0) {
// do not run; show 'add at least one step' UI
} Type guard
function isValidAutomationConfig(c: unknown): c is { steps: unknown[] } {
return !!c && typeof c === "object" && Array.isArray((c as { steps?: unknown[] }).steps) && (c as { steps: unknown[] }).steps.length > 0;
} Prevention
- Disable the 'Run automation' button until automationConfig is present with at least one step.
- Validate automationConfig shape in the tool's validateParams so missing config surfaces as a field error.
- Construct automationConfig in one place and assert its shape before passing it to the operation.
When it happens
Trigger: The automate operation was invoked (e.g. via a saved automation, a deep link, or programmatic dispatch) without an automationConfig attached to params; a UI race where the user clicked 'Run' before the automation builder produced a config; a deserialization gap that dropped automationConfig from params.
Common situations: Automation builder UI submitted with zero steps; deep-linked automation whose config failed to load; automation triggered from code/tests without constructing the config object.
Related errors
- Automation step ${stepIndex + 1} failed: ${error}
- Invalid folder scanning config: expected JSON object
- Invalid folder scanning config: missing 'pipeline' array
- Invalid folder scanning config: pipeline[${index}] is not an
- Invalid folder scanning config: pipeline[${index}].operation
AI-assisted analysis of Stirling-Tools/Stirling-PDF@9ef20dcab8 (2026-08-13).
Data as JSON: /api/errors/97aee544a2b58b4c.
Report an issue: GitHub.