{"record":{"id":"e88911b824359c40","repo":"toeverything/AFFiNE","slug":"transcript-native-recipe-failed","errorCode":null,"errorMessage":"transcript native recipe failed","messagePattern":"transcript native recipe failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/backend/server/src/plugins/copilot/transcript/service.ts","lineNumber":591,"sourceCode":"              workspace: task.workspaceId,\n              taskId,\n              billingUnitId: taskId,\n              featureKind: 'transcript',\n            },\n          },\n        },\n        input => this.executeTranscriptAction(input, runtimePayload)\n      )) {\n        if (event.type === 'error' || event.status === 'failed') {\n          bridgeFailed = true;\n          bridgeError = event.errorMessage ?? event.errorCode ?? bridgeError;\n        }\n        if (event.type === 'action_done' && event.status === 'succeeded') {\n          finalResult = event.result;\n        }\n      }\n      if (bridgeFailed) {\n        throw new Error(bridgeError);\n      }\n      const parsedResult = {\n        ...TranscriptPayloadSchema.parse(finalResult),\n        infos: payload.infos,\n      } satisfies TranscriptionPayloadV2;\n      const completed =\n        await this.models.copilotTranscriptTask.completeDispatch(\n          taskId,\n          generation,\n          actionRunId,\n          {\n            status: 'ready',\n            publicMeta: this.buildTaskPublicMeta(parsedResult),\n            protectedResult: parsedResult,\n            errorCode: null,\n          }\n        );\n      if (completed) {","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/591f874dad30887a80143a061a44bd3ca7ee3299/packages/backend/server/src/plugins/copilot/transcript/service.ts#L573-L609","documentation":"Generic Error thrown in the transcript dispatch path when the action bridge emits an event with type 'error' or status 'failed' while executing the native transcript action. The message defaults to 'transcript native recipe failed' and is replaced by the event's errorMessage or errorCode when present; the task is then marked failed rather than ready.","triggerScenarios":"Executing the native transcript action (dispatch flow around service.ts:540-602) when the action runner emits error events: native binding/module missing, model asset download failure, unreadable or unsupported audio input, or an exception inside the action implementation.","commonSituations":"Self-hosted deployment without the native transcript addon installed or with a version mismatch after a server upgrade; corrupted or zero-length audio blob fetched for the task; sandboxed environment blocking the native binary.","solutions":["Check server logs immediately before this throw - the underlying event errorMessage/errorCode and debug logging of the action run identify the real cause","Verify the native transcript action package/binary is installed and its version matches the server release","Retry via retryTask once the environment issue is fixed - dispatch claims a new generation","Reproduce with a small standard WAV/MP3 file to rule out input corruption"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"const isBridgeError = (e: unknown): e is Error =>\n  e instanceof Error && /transcript native recipe failed/i.test(e.message);","tryCatchPattern":"try {\n  await dispatch(taskId);\n} catch (e) {\n  // task is now status 'failed'; inspect server logs for event.errorMessage/errorCode\n  await backoff();\n  await retryTask(userId, workspaceId, taskId); // claims a new generation\n}","preventionTips":["Run the native transcript action in a sandbox first (small WAV) after every server upgrade","Keep the native action package version pinned in lockstep with the server","Capture the action run id with each dispatch so failures correlate to logged error events"],"tags":["copilot","transcription","native","action-runner","dispatch"],"backgroundTag":"upstream-service-error","analyzedSha":"591f874dad30887a80143a061a44bd3ca7ee3299","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}