{"record":{"id":"2cbeb303b978790b","repo":"remotion-dev/remotion","slug":"output-paths-must-be-strings","errorCode":null,"errorMessage":"Output paths must be strings.","messagePattern":"Output paths must be strings\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":741,"sourceCode":"\t\t\t\t\t\t\tthrow new Error('videoBitrate is invalid.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst src = staticFile(assetPath);\n\t\t\t\t\t\tconst displayName = assetPath.split('/').at(-1) ?? assetPath;\n\t\t\t\t\t\tconst baseName = getDefaultOutputBaseName(\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\tdisplayName,\n\t\t\t\t\t\t\t'video',\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst baseOutputPath =\n\t\t\t\t\t\t\tinput.baseOutputPath ?? `${baseName}-base.webm`;\n\t\t\t\t\t\tconst foregroundOutputPath =\n\t\t\t\t\t\t\tinput.foregroundOutputPath ?? `${baseName}-foreground.webm`;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof baseOutputPath !== 'string' ||\n\t\t\t\t\t\t\ttypeof foregroundOutputPath !== 'string'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new Error('Output paths must be strings.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst baseError = validatePublicOutputName({\n\t\t\t\t\t\t\textension: '.webm',\n\t\t\t\t\t\t\toutName: baseOutputPath,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconst foregroundError = validatePublicOutputName({\n\t\t\t\t\t\t\textension: '.webm',\n\t\t\t\t\t\t\toutName: foregroundOutputPath,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (baseError !== null || foregroundError !== null) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\tbaseError ?? foregroundError ?? 'Invalid output path.',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tbaseOutputPath.normalize('NFC').toLowerCase() ===","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L723-L759","documentation":"Thrown when `baseOutputPath` or `foregroundOutputPath` (after defaulting to `<baseName>-base.webm` / `<baseName>-foreground.webm`) is not a string. Both output names must be strings so they can be validated as public output names.","triggerScenarios":"Explicitly passing output paths as numbers, arrays, or other non-string types via the tool input.","commonSituations":"Programmatic callers building paths via concatenation that yields a non-string, or agents passing null-ish placeholders that are not nullish-coalesced correctly.","solutions":["Pass both paths as strings ending in .webm.","Omit them and rely on the generated defaults.","Coerce/validate with typeof x === 'string' before calling."],"exampleFix":"// before\n{ baseOutputPath: 123 }\n// after\n{ baseOutputPath: 'output-base.webm' }","handlingStrategy":"type-guard","validationCode":"if ((p.baseOutputPath != null && typeof p.baseOutputPath !== 'string') || (p.foregroundOutputPath != null && typeof p.foregroundOutputPath !== 'string')) throw new Error('output paths must be strings');","typeGuard":"const isPathString = (v: unknown): v is string => typeof v === 'string';","tryCatchPattern":null,"preventionTips":["Build output paths with template literals so the result is always a string.","Omit output paths to use generated defaults.","Validate tool inputs against the schema before dispatch."],"tags":["validation","type-mismatch","output-path"],"backgroundTag":"type-mismatch","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}