{"record":{"id":"f3bef55b01a5d45e","repo":"remotion-dev/remotion","slug":"outputerror","errorCode":null,"errorMessage":"${outputError}","messagePattern":"\\$\\{outputError\\}","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":602,"sourceCode":"\t\t\t\t\t\t\ttypeof forceFullSequences !== 'boolean' ||\n\t\t\t\t\t\t\ttypeof doSample !== 'boolean'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'forceFullSequences and doSample must be booleans.',\n\t\t\t\t\t\t\t);\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 outputPath =\n\t\t\t\t\t\t\tinput.outputPath ?? getDefaultCaptionOutputName(src, displayName);\n\t\t\t\t\t\tif (typeof outputPath !== 'string') {\n\t\t\t\t\t\t\tthrow new Error('outputPath must be a string.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst outputError = validateCaptionOutputName(outputPath);\n\t\t\t\t\t\tif (outputError !== null) {\n\t\t\t\t\t\t\tthrow new Error(outputError);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst jobId = addCaptionJob({\n\t\t\t\t\t\t\taudioStreamIndex: null,\n\t\t\t\t\t\t\tchunkLengthInSeconds,\n\t\t\t\t\t\t\tdisplayName,\n\t\t\t\t\t\t\tdoSample,\n\t\t\t\t\t\t\tforceFullSequences,\n\t\t\t\t\t\t\tlanguage: model.multilingual ? language : null,\n\t\t\t\t\t\t\tmodel: model.name,\n\t\t\t\t\t\t\tnoRepeatNgramSize,\n\t\t\t\t\t\t\toutName: outputPath,\n\t\t\t\t\t\t\trepetitionPenalty,\n\t\t\t\t\t\t\trequestInit: null,\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\tstrideLengthInSeconds,\n\t\t\t\t\t\t\ttask,\n\t\t\t\t\t\t\ttemperature,","sourceCodeStart":584,"sourceCodeEnd":620,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L584-L620","documentation":"After type-checking, outputPath is passed through validateCaptionOutputName(), which returns a human-readable error string for invalid output names (e.g. missing or unsupported extension, illegal path characters, path traversal). If non-null, that string is thrown verbatim as this error.","triggerScenarios":"Passing an output name with a disallowed extension (e.g. \".docx\" instead of \".srt\"/\".vtt\"), empty name, absolute paths, \"..\" path segments, or characters invalid in file names.","commonSituations":"Requesting output formats the caption writer does not support; trying to write outside the public folder with ../ traversal; filenames with slashes or reserved characters.","solutions":["Read the thrown message for the specific rule violated and correct outputPath accordingly","Use a supported caption extension such as .srt or .vtt","Use a simple relative file name without directories, dots, or special characters"],"exampleFix":"// before\n{ \"outputPath\": \"../../secrets/out.srt\" }\n// after\n{ \"outputPath\": \"captions-en.srt\" }","handlingStrategy":"try-catch","validationCode":"const safeName = /^[A-Za-z0-9._-]+\\.(srt|vtt)$/.test(outputPath)\n  ? outputPath : 'captions.srt';","typeGuard":"const isValidOutputName = (v: string): boolean =>\n  /^[A-Za-z0-9._-]+\\.(srt|vtt)$/.test(v);","tryCatchPattern":"try {\n  await callWhisperTool({ outputPath });\n} catch (err) {\n  if (err instanceof Error) {\n    // message is the validateCaptionOutputName() reason; fix and retry\n    const fixed = 'captions.srt';\n    await callWhisperTool({ outputPath: fixed });\n  }\n}","preventionTips":["Use simple relative file names with .srt or .vtt extensions","Never include directory components, \"..\", or absolute paths","Match the extension to the caption format you want","Sanitize user-supplied names by stripping invalid characters"],"tags":["validation","captions","filename"],"backgroundTag":"invalid-argument-format","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"}