transloadit/uppy · warning · Error
Missing S3 object key for aborting upload
Error message
Missing S3 object key for aborting upload
What it means
The OAuth callback route /:providerName/callback requires a providerName URL parameter. This 400 is returned when the parameter is absent, not a string, or an empty string, meaning Express matched the route but the path segment is empty/invalid.
Source
Thrown at packages/@uppy/aws-s3/src/S3Uploader.ts:223
}
#pause(): void {
this.#abortController?.abort()
}
/**
*
* @param opts - `abortInS3`: Whether to also abort the multipart upload in S3. Default: true. Set to false to keep the multipart upload in S3 active, allowing for manual cleanup later and preventing accidental data loss if the user later tries to resume the upload.
*/
abort(opts?: { abortInS3?: boolean }): void {
this.#abortController?.abort()
// Clean up event listeners
this.#eventManager.remove()
if (opts?.abortInS3 !== false && this.#uploadId) {
if (!this.#key) {
throw new Error('Missing S3 object key for aborting upload')
}
this.#options.s3Client
.abortMultipartUpload({ key: this.#key, uploadId: this.#uploadId })
.catch((abortErr) => {
this.#options.log?.(abortErr, 'warning')
})
}
this.#key = undefined
this.#uploadId = undefined
this.#uploadHasStarted = false
}
async #resumeMultipartUpload(
uploadId: string,
signal: AbortSignal,
): Promise<void> {
if (!this.#key) {View on GitHub (pinned to 5d4dedd02a)
Solutions
- Ensure the callback URL includes the provider name, e.g. /connect/drive/callback
- Check the redirect URI registered with the OAuth provider matches `${companionUrl}/connect/:providerName/callback`
- Verify server.path prefix and proxy rewriting are not stripping the provider segment
- Confirm the route is mounted via the connect router and not hit directly at root
Example fix
// before GET /connect/callback // after GET /connect/drive/callback
Defensive patterns
Strategy: validation
Validate before calling
const providerName = 'drive'
if (!providerName || typeof providerName !== 'string') throw new Error('provider name required')
await fetch(`${companionUrl}/connect/${encodeURIComponent(providerName)}/callback`) Type guard
const isValidProviderName = (p: unknown): p is string => typeof p === 'string' && p.length > 0
Prevention
- Build provider URLs from a validated constant list of provider names
- Encode provider path segments
- Add integration tests asserting callback URLs include the provider segment
When it happens
Trigger: Calling /connect/callback, /connect//callback, or manually constructing a callback URL without the provider segment; also a misconfigured grant callback URL or a provider OAuth app whose redirect URI points at the wrong path.
Common situations: Wrong redirect URI configured in the provider's OAuth app; a reverse proxy or load balancer rewriting the path; typo'd companionUrl/server.path options so the callback path is truncated.
Related errors
- Missing S3 object key for resuming upload
- Missing S3 object key for uploading part
- companionEndpoint must be a string
- s3Endpoint must be a string
- No key returned
AI-assisted analysis of transloadit/uppy@5d4dedd02a (2026-08-28).
Data as JSON: /api/errors/15ba26b19fca9921.
Report an issue: GitHub.