{"record":{"id":"947b797b7a6e4bdf","repo":"gitroomhq/postiz-app","slug":"threads-took-too-long-to-process-the-media-please","errorCode":null,"errorMessage":"Threads took too long to process the media, please try again","messagePattern":"Threads took too long to process the media, please try again","errorType":"exception","errorClass":"BadBody","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social/threads.provider.ts","lineNumber":220,"sourceCode":"    accessToken: string\n  ): Promise<boolean> {\n    // Bounded (the old version recursed forever and could hang the activity\n    // into a timeout): ~5.5 minutes at 2.2s intervals.\n    for (let i = 0; i < 150; i++) {\n      const status = await this.checkContainerStatus(\n        mediaContainerId,\n        accessToken\n      );\n\n      if (status === 'FINISHED' || status === 'PUBLISHED') {\n        await timer(2000);\n        return true;\n      }\n\n      await timer(2200);\n    }\n\n    throw new BadBody(\n      this.identifier,\n      '{}',\n      '{}',\n      'Threads took too long to process the media, please try again'\n    );\n  }\n\n  private async fetchUserInfo(accessToken: string) {\n    const { id, username, threads_profile_picture_url } = await (\n      await this.fetch(\n        `https://graph.threads.net/v1.0/me?fields=id,username,threads_profile_picture_url&access_token=${accessToken}`\n      )\n    ).json();\n\n    return {\n      id,\n      name: username,\n      picture: threads_profile_picture_url || '',","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/threads.provider.ts#L202-L238","documentation":"checkLoaded polls the Threads container until it finishes processing. After exhausting the retry loop with timer(2200) delays, if the container still is not ready it throws 'Threads took too long to process the media, please try again'.","triggerScenarios":"Threads' media processing (usually video transcoding) exceeds the fixed poll budget in the loop; slow Meta-side processing of large videos is the typical cause.","commonSituations":"Large or high-bitrate videos near Threads' limits during peak load, or a container stuck in IN_PROGRESS that never transitions.","solutions":["Retry the post - processing usually completes on a fresh container","Reduce video size/bitrate before uploading","If it recurs constantly, check Meta platform status and the container's actual status via the Graph API"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await publishThread(...); } catch (e) { if (/took too long/.test(e.message)) scheduleRetry(post, backoffMinutes(5)); else throw e; }","preventionTips":["Compress videos before scheduling to Threads","Schedule retries for slow-processing errors instead of resubmitting instantly","Watch Meta platform status during mass failures"],"tags":["threads","timeout","media-processing","polling"],"backgroundTag":"remote-processing-timeout","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}