gitroomhq/postiz-app · error · Error
File upload timed out
Error message
File upload timed out
What it means
After PUTting media to Whop, uploadMediaToWhop polls the file's upload_status every 5s; if it is not 'ready' after 108 attempts (~9 minutes) it throws 'File upload timed out'.
Source
Thrown at libraries/nestjs-libraries/src/integrations/social/whop.provider.ts:309
duplex: 'half',
} as any);
// A rejected PUT leaves the file pending forever - fail fast instead
// of burning the ~9 minute status poll below.
if (!uploadResponse.ok) {
throw new BadBody(
this.identifier,
await uploadResponse.text().catch(() => '{}'),
'{}',
'Failed to upload the media file'
);
}
let uploadStatus = 'pending';
let attempts = 0;
const maxAttempts = 108; // ~9 minutes at 5s interval
while (uploadStatus !== 'ready') {
if (attempts++ >= maxAttempts) {
throw new Error('File upload timed out');
}
const fileStatus = await (
await this.fetch(
`https://api.whop.com/api/v1/files/${createFileResponse.id}`,
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
},
'check file status',
0,
true
)
).json();
uploadStatus = fileStatus.upload_status;
if (uploadStatus === 'failed') {
throw new Error('File upload failed');View on GitHub (pinned to 0f1647f749)
Solutions
- Retry the post — most slow-processing files succeed on a second attempt
- Reduce media size/resolution before uploading
- Check the Whop file status manually via GET /api/v1/files/{id} to see if it eventually became ready or 'failed'
- If consistently timing out, report to Whop support with the file id
Defensive patterns
Strategy: retry
Try / catch
catch (e) { if (e instanceof Error && e.message === 'File upload timed out') { /* check file status via GET /api/v1/files/{id}; retry post once */ } throw e; } Prevention
- Compress media so Whop finishes processing within ~9 minutes
- Treat a timeout as unknown-state: verify on Whop before retrying
- Schedule large uploads with headroom, not at the last minute
When it happens
Trigger: Whop's file processing stays 'pending'/'processing' beyond the 9-minute window: very large files, slow Whop-side processing, or a stuck file state.
Common situations: Large videos on congested Whop pipelines; polling endpoint throttling; file whose processing silently stalled after a partially-successful PUT.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- File upload failed
- 'checkPostStatus is not implemented for this provider'
- Threads took too long to process the media, please try again
- TikTok refused to publish your post
- Could not determine the media size for upload
AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27).
Data as JSON: /api/errors/139f06fc659de8e8.
Report an issue: GitHub.