You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: a message advertises an attachment whose blob is gone #3017
A conversation message can advertise an attachment whose bytes no longer exist. It renders, and the download 404s with no explanation.
Mechanism
materialize_email_attachments.ts builds the download URL at ingest and stores it in the message metadata. The URL therefore survives the blob disappearing — the message keeps offering it indefinitely.
Observed on a live deployment: one inbound message advertising a ~26 KB attachment with a download URL set, and neither a fileMetadata row nor a stored blob behind it. Confirmed cause on that deployment: a recovery cycle exported and re-imported the database without file storage, so rows came back and blobs did not.
Why it is worth fixing anyway
The import was the trigger, but nothing in the product notices the state. Any deployment that loses a blob — a restore, a bucket migration, a failed write — keeps showing attachments that cannot be fetched, and the failure surfaces as a browser error rather than as an explanation.
Shape
Either resolve the attachment at render or serve time rather than trusting the stored URL, or mark the attachment when its blob cannot be found so the UI can say so. A dangling attachment should read as "no longer available", not as a broken link.
Priority
Deferred by the owner. Filed so it is not rediscovered from scratch.
presignMessageAttachments now probes for the object before offering it, and drops the URL rather than merely flagging it — a dead link next to a "no longer available" notice would be the same bug. The probe fails open: an unreachable store or unresolved org throws, and a throw is not evidence of absence, so the attachment is offered as before and the reason is logged. Only a definite null marks it.
conversations.attachment.unavailable" in en/de/fr, and attachment-presence.test.ts` covers all three branches. The fail-open direction is the one worth having a test for — failing closed on a throw would hide every attachment whenever the blob store blipped.
Activity
fix(platform): say when an email attachment is no longer available
Israeltheminer commentedon Sep 4, 2026
Fixed by #3193, merged.
presignMessageAttachmentsnow probes for the object before offering it, and drops the URL rather than merely flagging it — a dead link next to a "no longer available" notice would be the same bug. The probe fails open: an unreachable store or unresolved org throws, and a throw is not evidence of absence, so the attachment is offered as before and the reason is logged. Only a definitenullmarks it.conversations.attachment.unavailable" in en/de/fr, andattachment-presence.test.ts` covers all three branches. The fail-open direction is the one worth having a test for — failing closed on a throw would hide every attachment whenever the blob store blipped.