{"record":{"id":"f9279ba832816e5b","repo":"gitroomhq/postiz-app","slug":"linkedin-took-too-long-to-process-the-media-pleas","errorCode":null,"errorMessage":"LinkedIn took too long to process the media, please try again","messagePattern":"LinkedIn 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/linkedin.provider.ts","lineNumber":1066,"sourceCode":"    const [response] = await this.postPending(\n      id,\n      accessToken,\n      postDetails,\n      integration,\n      type\n    );\n\n    let pendingData = response.pendingData;\n    const started = Date.now();\n\n    // eslint-disable-next-line no-constant-condition\n    while (true) {\n      // Cap below the 10-minute activity timeout of the old workflows using\n      // this method: failing here is safe (the post is only created once all\n      // the media is ready), timing the activity out is not - a retried\n      // activity would upload and publish again.\n      if (Date.now() - started > 8 * 60 * 1000) {\n        throw new BadBody(\n          this.identifier,\n          '{}',\n          '{}',\n          'LinkedIn took too long to process the media, please try again'\n        );\n      }\n\n      const check = await this.checkPostStatus(\n        accessToken,\n        pendingData,\n        integration\n      );\n\n      if (check.status === 'pending') {\n        pendingData = check.pendingData;\n        await timer(20000);\n        continue;\n      }","sourceCodeStart":1048,"sourceCodeEnd":1084,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts#L1048-L1084","documentation":"LinkedIn media polling loop (waitForMediaReady style) exceeded 8 minutes without the asset reaching a ready state. It fails deliberately below the 10-minute Temporal activity timeout because a retried activity would re-upload and duplicate the publish; failing cleanly is safer than timing out.","triggerScenarios":"Polling LinkedIn's asset status endpoints for >8*60*1000 ms while processingStatus stays PROCESSING. Called from LinkedinProvider during post publishing when media is attached.","commonSituations":"Large videos, slow LinkedIn transcode queues, or assets stuck in PROCESSING. Network latency stretching the polling loop.","solutions":["Retry the whole post (safe: post is only created once all media is ready)","Reduce media size/duration so LinkedIn processes faster","If it recurs consistently, test the same asset via LinkedIn directly to rule out account/API throttling"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if (/took too long to process the media/.test(err.message)) { /* safe to re-run whole post */ }","preventionTips":["Compress large videos before upload","Treat this failure as retry-safe: post not yet created"],"tags":["linkedin","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"}