{"record":{"id":"8b4aa7294ac23d29","repo":"gitroomhq/postiz-app","slug":"the-media-took-too-long-to-process-please-try-aga","errorCode":null,"errorMessage":"The media took too long to process, please try again","messagePattern":"The media took too long to process, please try again","errorType":"exception","errorClass":"BadBody","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social/mastodon.provider.ts","lineNumber":461,"sourceCode":"      } else if (check.status === 'completed') {\n        return [\n          {\n            id: response.id,\n            postId: check.postId,\n            releaseURL: check.releaseURL,\n            status: 'completed',\n          },\n        ];\n      } else {\n        pendingData = check.pendingData;\n      }\n\n      // Cap below the 10-minute activity timeout of the old workflows using\n      // this method: failing here is safe (the status is only created once the\n      // media is ready), timing the activity out is not - a retried activity\n      // would upload and publish again.\n      if (Date.now() - started > 8 * 60 * 1000) {\n        throw new BadBody(\n          this.identifier,\n          '{}',\n          '{}',\n          'The media took too long to process, please try again'\n        );\n      }\n\n      await timer(20000);\n    }\n  }\n\n  async dynamicComment(\n    id: string,\n    postId: string,\n    lastCommentId: string | undefined,\n    accessToken: string,\n    url: string,\n    postDetails: PostDetails[]","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/mastodon.provider.ts#L443-L479","documentation":"Mastodon media polling (waiting for the uploaded attachment's processing to finish before creating the status) exceeded an 8-minute cap. The cap sits below the 10-minute Temporal activity timeout on purpose: the status is only created once media is ready, so failing cleanly avoids a retry that would upload and publish twice.","triggerScenarios":"Polling GET /api/v1/media/:id returns video/video_status='processing' for more than 8 minutes before dynamicPost creates the status.","commonSituations":"Heavy video uploads on busy instances, large files, or instances with slow ffmpeg processing queues.","solutions":["Retry the post (safe: status not yet created)","Compress/downsize the video before scheduling","If persistent, check the instance's media processing health or use a different instance"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if (/media took too long/.test(err.message)) { /* status not created, safe retry */ }","preventionTips":["Downscale videos before upload to Mastodon","Prefer instances with faster media processing for video-heavy posting"],"tags":["mastodon","timeout","media-processing"],"backgroundTag":"media-processing-timeout","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}