Budibase/budibase · error
Invalid signed URL
Error message
Invalid signed URL
What it means
processObjectStoreAttachment expects attachment.url to be a signed/bucket-qualified object store URL that objectStore.extractBucketAndPath can parse into { bucket, path }. If parsing returns null — the URL is not a recognizable object store URL or signed URL — the function throws 'Invalid signed URL'.
Source
Thrown at packages/backend-core/src/objectStore/utils.ts:94
if (!response.body) {
throw new Error("No response received for attachment")
}
if (!(response.body instanceof stream.Readable)) {
throw new Error("Unexpected response body stream type")
}
return {
filename: attachment.filename || fallbackFilename,
content: response.body,
}
}
export async function processObjectStoreAttachment(
attachment: AutomationAttachment
): Promise<BucketedContent> {
const result = objectStore.extractBucketAndPath(attachment.url)
if (result === null) {
throw new Error("Invalid signed URL")
}
const { bucket, path: objectPath } = result
const { stream: readStream } = await objectStore.getReadStream(
bucket,
objectPath
)
const fallbackFilename = path.basename(objectPath)
return {
bucket,
path: objectPath,
filename: attachment.filename || fallbackFilename,
content: readStream,
}
}
export async function processAutomationAttachment(
attachment: AutomationAttachmentView on GitHub (pinned to a81a902e9a)
Solutions
- Ensure the attachment url is a genuine object store/signed URL for this installation (matches your MINIO_URL/host) so extractBucketAndPath can split it
- If the URL is an external HTTP link, route it to processUrlAttachment instead of processObjectStoreAttachment
- Re-generate the signed URL from the current object store configuration (expired/mis-signed URLs may fail extraction)
- Check bucket/endpoint env config so URL parsing rules match the URLs actually stored
Example fix
// before // url: "https://cdn.example.com/file.png" -> processObjectStoreAttachment // after // only pass signed/object-store urls to processObjectStoreAttachment; // use processUrlAttachment for external http links
Defensive patterns
Strategy: validation
Validate before calling
const parsed = objectStore.extractBucketAndPath(attachment.url)
if (parsed === null) throw new Error("Not an object store URL") Type guard
function isStoreUrl(url: string): boolean {
return objectStore.extractBucketAndPath(url) !== null
} Try / catch
try {
const content = await processObjectStoreAttachment(attachment)
} catch (err) {
if (err.message === "Invalid signed URL") {
// fall back to processUrlAttachment for external links
}
throw err
} Prevention
- Only pass installation-signed/object-store URLs to processObjectStoreAttachment
- Dispatch attachments by URL shape before processing
- Keep object store host config aligned with stored URLs
- Regenerate signed URLs after changing buckets/endpoints
When it happens
Trigger: An automation attachment whose url is an external http(s) link, a relative path, or an object store URL from a different/unconfigured host that extractBucketAndPath cannot match — so it should be handled by processUrlAttachment instead.
Common situations: Automations configured with plain external file URLs but routed to the object-store processor, migrations where attachment URLs changed format (e.g. presigned URL expiry formatting or new domain), or SELF_HOSTED vs hosted URL mismatch.
Related errors
- Unexpected response ${response.statusText}
- No response received for attachment
- Unexpected response body stream type
- Attachments must have both "url" and "filename" keys. You ha
- Invalid object store key: path traversal is not allowed.
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/6d584f809634e288.
Report an issue: GitHub.