Skip to content

fix(bluebubbles): raise send_file timeout to cover slow uploads (#77918) - #77940

Open
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/77918-bluebubbles-timeout
Open

fix(bluebubbles): raise send_file timeout to cover slow uploads (#77918)#77940
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/77918-bluebubbles-timeout

Conversation

@webtecnica

Copy link
Copy Markdown
Contributor

Summary

Fixes #77918. The BlueBubbles attachment upload in _send_attachment used a hardcoded timeout=120, but on macOS 26 a successful attachment send routinely takes ~2 minutes to return. The client-side timeout fired first, _send_attachment returned SendResult(success=False), and the user saw "Couldn't deliver the file attachment" moments after the file actually arrived.

Root Cause

gateway/platforms/bluebubbles.py posted to /api/v1/message/attachment with timeout=120, well below BlueBubbles Server's own internal upload timeout of 300s. The gateway log showed the failure warning exactly 120s after the send started, even though delivery succeeded.

Change

  • Added a class constant BlueBubblesAdapter.ATTACHMENT_UPLOAD_TIMEOUT = 300, matching BlueBubbles Server's own 300s internal limit, and used it for the attachment upload request instead of the hardcoded 120s.

Verification

  • New test TestBlueBubblesAttachmentUpload::test_send_attachment_uses_300s_upload_timeout asserts _send_attachment posts to /api/v1/message/attachment with timeout == 300 and returns success.
  • Full BlueBubbles test file: 19 passed.

Closes #77918

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlueBubbles: send_file 120s timeout too low — user gets "Couldn't deliver the file attachment" for attachments that were delivered

2 participants