Skip to content

[BlueBubbles] Outbound audio messages sent as application/octet-stream instead of audio/x-caf #234

@weiluntong

Description

@weiluntong

Environment:

  • mautrix-imessage v0.1.0+dev.7a7312c5
  • BlueBubbles Server 1.9.9

Description

I ran across this issue when I tried sending an iMessage audio message through beeper. Essentially, the messages would arrive as just files titled "voice_message" rather than the usual audio message. You can't download them or click on them. I went ahead and tried reproducing the issue, so I'll follow with the steps

Steps

  1. Create an audio message directly in iMessage to my own phone number.
  2. Capture success condition in logs with tail -50 ~/Library/Logs/bluebubbles-server/main.log
  3. Create an audio message in beeper
  4. Capture failure condition in logs with tail -50 ~/Library/Logs/bluebubbles-server/main.log

Logs

Of course, 50 lines was a bit over kill, but it's my first time debugging bluebubbles so I wasn't sure how many lines would be generated per message. I've cleaned them up and have pasted them here:

Success

[2026-03-23 20:28:28.107][info] [BlueBubblesServer] New Message from You, <No Text>; Attachments: 1; Date: 3/23/2026, 8:28:27 PM
[2026-03-23 20:28:28.108][info] Converting attachment, Audio Message.caf, to an MP3...
[2026-03-23 20:28:28.191][debug] Attachment download request (MIME: audio/x-caf; GUID: A1B2C3D4-E5F6-7890-ABCD-EF1234567890; Original GUID: A1B2C3D4-E5F6-7890-ABCD-EF1234567890)
[2026-03-23 20:28:28.191][debug] Sending attachment (audio/mp3) with path: .../Audio Message.caf.mp3

Failure

[2026-03-23 20:30:00.460][debug] Request to /api/v1/message/attachment (URL Params: {})
[2026-03-23 20:30:00.462][debug] Sending attachment "voice_message" to any;-;+1XXXXXXXXXX
[2026-03-23 20:30:00.463][info] Adding await for chat: "any;-;+1XXXXXXXXXX"; attachment: voice_message; tempGuid: temp-PzSQmMHk
[2026-03-23 20:30:01.009][debug] Attachment download request (MIME: application/octet-stream; GUID: B2C3D4E5-F6A7-8901-BCDE-F12345678901; Original GUID: B2C3D4E5-F6A7-8901-BCDE-F12345678901)
[2026-03-23 20:30:01.010][debug] Sending attachment (application/octet-stream) with path: .../BlueBubbles/C3D4E5F6-A7B8-9012-CDEF-123456789012/voice_message

Mautrix-iMessage log

I also took the liberty in checking out the mautrix-imessage log in trying to find out where in the stack we were going wrong. I think this is pretty telling that it's a problem with mautrix-imessage.

{"level":"debug","portal_guid":"any;-;+1XXXXXXXXXX","message":"Converting iMessage attachment D4E5F6A7-B8C9-0123-DEFA-234567890123.0"}
{"level":"debug","portal_guid":"any;-;+1XXXXXXXXXX","message":"Sending iMessage attachment D4E5F6A7-B8C9-0123-DEFA-234567890123.0"}
{"level":"debug","as_user_id":"@sh-imessage_1XXXXXXXXXX:beeper.local","message":"Uploading media to external URL"}
{"level":"debug","portal_guid":"any;-;+1XXXXXXXXXX","message":"Handled iMessage attachment D4E5F6A7-B8C9-0123-DEFA-234567890123.0 -> $XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:beeper.local"}

So in this log, we can see that mautrix-imessage itself is the one that handled it as a generic file to begin with. So by the time it reaches BlueBubbles Server, it doesn't have the voice-specific flag or MIME type for BlueBubbles or iMessage to realize it's supposed to be an audio message.

this mautrix-imessage is all outbound of course, with Beeper sending to iMessage, because the success case shown in bluebubbles-server/main.log in which we directly use iMessage does not go through mautrix-imessage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions