When creating a WhatsApp channel in Chatwoot version 4.4.0, I can send and receive text messages correctly.
If I send an audio or image from Chatwoot to WhatsApp, it is received successfully.
However, when I send an audio or image from WhatsApp to Chatwoot, it does not work.
It seems that the media file is downloaded in Rails, but when I try to retrieve it from the UI, I get a 404 Not Found error.
Audio or image sent from WhatsApp to Chatwoot should be available for playback/download in the Chatwoot conversation.
Text messages work fine in both directions. Media sent from Chatwoot to WhatsApp works fine.
The issue only occurs when receiving media from WhatsApp into Chatwoot.
I, [2025-08-10T18:04:32.622438 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Performing Webhooks::WhatsappEventsJob (Job ID: 572a5a8a-db82-4427-b40e-fc35c96308ec) from Sidekiq(low) enqueued at 2025-08-10T18:04:32.617458967Z with arguments: {"object" => "whatsapp_business_account", "entry" => [{"id" => "1052316823771479", "changes" => [{"value" => {"messaging_product" => "whatsapp", "metadata" => {"display_phone_number" => "15551471456", "phone_number_id" => "755157437671006"}, "contacts" => [{"profile" => {"name" => "Custom App"}, "wa_id" => "5215660548888"}], "messages" => [{"from" => "5215660548888", "id" => "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", "timestamp" => "1754849070", "type" => "audio", "audio" => {"mime_type" => "audio/ogg; codecs=opus", "sha256" => "AxdsE50BYZP5xkoQ2osP3eLq3oejVjNLlu+Kd30NVC8=", "id" => "2914625362044713", "voice" => true}}]}, "field" => "messages"}]}], "controller" => "webhooks/whatsapp", "action" => "process_payload", "phone_number" => "+15551471456", "whatsapp" => {"object" => "whatsapp_business_account", "entry" => [{"id" => "1052316823771479", "changes" => [{"value" => {"messaging_product" => "whatsapp", "metadata" => {"display_phone_number" => "15551471456", "phone_number_id" => "755157437671006"}, "contacts" => [{"profile" => {"name" => "Custom App"}, "wa_id" => "5215660548888"}], "messages" => [{"from" => "5215660548888", "id" => "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", "timestamp" => "1754849070", "type" => "audio", "audio" => {"mime_type" => "audio/ogg; codecs=opus", "sha256" => "AxdsE50BYZP5xkoQ2osP3eLq3oejVjNLlu+Kd30NVC8=", "id" => "2914625362044713", "voice" => true}}]}, "field" => "messages"}]}]}}
I, [2025-08-10T18:04:33.708957 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued ActionCableBroadcastJob (Job ID: a586d0eb-ad4f-48c3-bbbc-820985410845) to Sidekiq(critical) with arguments: ["H1GEDyTf9ZcBjyX6aGhNoy8n", "EyFZ75ZsggyRdKpkNDrCEoKy"], "message.created", {id: 9, content: nil, account_id: 1, inbox_id: 1, conversation_id: 1, message_type: 0, created_at: 1754849073, updated_at: Sun, 10 Aug 2025 18:04:33.654376332 UTC +00:00, private: false, status: "sent", source_id: "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", content_type: "text", content_attributes: {}, sender_type: "Contact", sender_id: 1, external_source_ids: {}, additional_attributes: {}, processed_message_content: nil, sentiment: {}, conversation: {assignee_id: 1, unread_count: 1, last_activity_at: 1754849073, contact_inbox: {source_id: "5215660548888"}}, attachments: [{id: 8, message_id: 9, file_type: "audio", account_id: 1, extension: nil, data_url: "https://chatwoot.custom.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7b6f28682489dace52bec88fb0b38f9ee63ba418/File.ogg", thumb_url: "", file_size: 8139, width: nil, height: nil, transcribed_text: ""}], sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}}
I, [2025-08-10T18:04:33.711496 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued EventDispatcherJob (Job ID: e97e5df0-5d38-4a9c-9eb0-d34dcd924ea6) to Sidekiq(critical) with arguments: "message.created", Sun, 10 Aug 2025 18:04:33.696753638 UTC +00:00, {message: #<GlobalID:0x00007f6553290440 @uri=#<URI::GID gid://chatwoot/Message/9>>, performed_by: nil}
I, [2025-08-10T18:04:33.801065 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued ActionCableBroadcastJob (Job ID: 24ace592-449a-4c3b-8c8e-d78adc979d02) to Sidekiq(critical) with arguments: ["H1GEDyTf9ZcBjyX6aGhNoy8n", "EyFZ75ZsggyRdKpkNDrCEoKy"], "conversation.updated", {additional_attributes: {}, can_reply: true, channel: "Channel::Whatsapp", contact_inbox: #<GlobalID:0x00007f6552b10918 @uri=#<URI::GID gid://chatwoot/ContactInbox/1>>, id: 1, inbox_id: 1, messages: [{id: 9, content: nil, account_id: 1, inbox_id: 1, conversation_id: 1, message_type: 0, created_at: 1754849073, updated_at: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00, private: false, status: "sent", source_id: "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", content_type: "text", content_attributes: {}, sender_type: "Contact", sender_id: 1, external_source_ids: {}, additional_attributes: {}, processed_message_content: nil, sentiment: {}, conversation: {assignee_id: 1, unread_count: 1, last_activity_at: 1754849073, contact_inbox: {source_id: "5215660548888"}}, attachments: [{id: 8, message_id: 9, file_type: "audio", account_id: 1, extension: nil, data_url: "https://chatwoot.custom.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7b6f28682489dace52bec88fb0b38f9ee63ba418/File.ogg", thumb_url: "", file_size: 8139, width: nil, height: nil, transcribed_text: ""}], sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}}], labels: [], meta: {sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}, assignee: {id: 1, name: "Will", available_name: "Will", avatar_url: "", type: "user", availability_status: nil, thumbnail: ""}, team: nil, hmac_verified: false}, status: "open", custom_attributes: {}, snoozed_until: nil, unread_count: 1, first_reply_created_at: Sun, 10 Aug 2025 17:17:37.014253000 UTC +00:00, priority: nil, waiting_since: 1754849073, agent_last_seen_at: 1754848912, contact_last_seen_at: 0, last_activity_at: 1754849073, timestamp: 1754849073, created_at: 1754845904, updated_at: 1754849073.7177923, account_id: 1}
I, [2025-08-10T18:04:33.806224 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [47a78529-83fd-442b-8d12-5e3ebbf08bd8] Performing EventDispatcherJob (Job ID: 47a78529-83fd-442b-8d12-5e3ebbf08bd8) from Sidekiq(critical) enqueued at 2025-08-10T18:04:33.801408518Z with arguments: "conversation.updated", Sun, 10 Aug 2025 18:04:33.743463532 UTC +00:00, {conversation: #<GlobalID:0x00007f655e25a9c0 @uri=#<URI::GID gid://chatwoot/Conversation/1>>, notifiable_assignee_change: false, changed_attributes: {"updated_at" => [Sun, 10 Aug 2025 18:04:33.655806544 UTC +00:00, Sun, 10 Aug 2025 18:04:33.717792214 UTC +00:00], "waiting_since" => [nil, Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00]}, performed_by: nil}
I, [2025-08-10T18:04:33.816340 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued EventDispatcherJob (Job ID: 47a78529-83fd-442b-8d12-5e3ebbf08bd8) to Sidekiq(critical) with arguments: "conversation.updated", Sun, 10 Aug 2025 18:04:33.743463532 UTC +00:00, {conversation: #<GlobalID:0x00007f655e256f78 @uri=#<URI::GID gid://chatwoot/Conversation/1>>, notifiable_assignee_change: false, changed_attributes: {"updated_at" => [Sun, 10 Aug 2025 18:04:33.655806544 UTC +00:00, Sun, 10 Aug 2025 18:04:33.717792214 UTC +00:00], "waiting_since" => [nil, Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00]}, performed_by: nil}
I, [2025-08-10T18:04:33.821732 #1] INFO -- : [ActiveJob] [Messages::AudioTranscriptionJob] [16e06c2f-cd83-4954-be0a-a6ed3806a813] Performing Messages::AudioTranscriptionJob (Job ID: 16e06c2f-cd83-4954-be0a-a6ed3806a813) from Sidekiq(low) enqueued at 2025-08-10T18:04:33.818315092Z with arguments: 8
I, [2025-08-10T18:04:33.824787 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued Messages::AudioTranscriptionJob (Job ID: 16e06c2f-cd83-4954-be0a-a6ed3806a813) to Sidekiq(low) with arguments: 8
I, [2025-08-10T18:04:33.825926 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [2b80831b-47d1-4264-934f-97703b188e45] Performing EventDispatcherJob (Job ID: 2b80831b-47d1-4264-934f-97703b188e45) from Sidekiq(critical) enqueued at 2025-08-10T18:04:33.810966466Z with arguments: "notification.created", Sun, 10 Aug 2025 18:04:33.767018202 UTC +00:00, {notification: #<GlobalID:0x00007f65581cf6c8 @uri=#<URI::GID gid://chatwoot/Notification/8>>}
I, [2025-08-10T18:04:33.826326 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [2b80831b-47d1-4264-934f-97703b188e45] Performed EventDispatcherJob (Job ID: 2b80831b-47d1-4264-934f-97703b188e45) from Sidekiq(critical) in 13.41ms
I, [2025-08-10T18:04:33.836374 #1] INFO -- : [ActiveJob] [Messages::AudioTranscriptionJob] [16e06c2f-cd83-4954-be0a-a6ed3806a813] Performed Messages::AudioTranscriptionJob (Job ID: 16e06c2f-cd83-4954-be0a-a6ed3806a813) from Sidekiq(low) in 14.67ms
I, [2025-08-10T18:04:33.836836 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Disk Storage (10.7ms) Uploaded file to key: m7rl6n46jxo0kv8769x7gbuue7mp (checksum: bfRU4BzlBIuRQYAi+0oS5g==)
I, [2025-08-10T18:04:33.839555 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued ActiveStorage::AnalyzeJob (Job ID: 711c6191-b55f-409e-8195-7a5922b7518d) to Sidekiq(default) with arguments: #<GlobalID:0x00007f654f8e5bc8 @uri=#<URI::GID gid://chatwoot/ActiveStorage::Blob/8>>
I, [2025-08-10T18:04:33.840297 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued SendReplyJob (Job ID: 9de61740-3748-46cb-a0d9-563edccbb03c) to Sidekiq(high) at 2025-08-10 18:04:35 UTC with arguments: 9
I, [2025-08-10T18:04:33.845626 #1] INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [711c6191-b55f-409e-8195-7a5922b7518d] Performing ActiveStorage::AnalyzeJob (Job ID: 711c6191-b55f-409e-8195-7a5922b7518d) from Sidekiq(default) enqueued at 2025-08-10T18:04:33.837845712Z with arguments: #<GlobalID:0x00007f655eabfdb8 @uri=#<URI::GID gid://chatwoot/ActiveStorage::Blob/8>>
I, [2025-08-10T18:04:33.849018 #1] INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [711c6191-b55f-409e-8195-7a5922b7518d] Disk Storage (0.1ms) Downloaded file from key: m7rl6n46jxo0kv8769x7gbuue7mp
I, [2025-08-10T18:04:33.859813 #1] INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [711c6191-b55f-409e-8195-7a5922b7518d] Skipping audio analysis because ffprobe isn't installed
I, [2025-08-10T18:04:33.868792 #1] INFO -- : [ActiveJob] [WebhookJob] [70af5d25-759f-45a4-8bc6-62c5df5f5818] Performing WebhookJob (Job ID: 70af5d25-759f-45a4-8bc6-62c5df5f5818) from Sidekiq(medium) enqueued at 2025-08-10T18:04:33.860630171Z with arguments: "http://pos-whatsapp-ai.apps.svc.cluster.local:8080/pos-whatsapp-ai/webhook/chatwoot/receiveMessage", {account: {id: 1, name: "Custom"}, additional_attributes: {}, content_attributes: {}, content_type: "text", content: nil, conversation: {additional_attributes: {}, can_reply: true, channel: "Channel::Whatsapp", contact_inbox: #<GlobalID:0x00007f6552f8ab38 @uri=#<URI::GID gid://chatwoot/ContactInbox/1>>, id: 1, inbox_id: 1, messages: [{id: 9, content: nil, account_id: 1, inbox_id: 1, conversation_id: 1, message_type: 0, created_at: 1754849073, updated_at: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00, private: false, status: "sent", source_id: "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", content_type: "text", content_attributes: {}, sender_type: "Contact", sender_id: 1, external_source_ids: {}, additional_attributes: {}, processed_message_content: nil, sentiment: {}, conversation: {assignee_id: 1, unread_count: 1, last_activity_at: 1754849073, contact_inbox: {source_id: "5215660548888"}}, attachments: [{id: 8, message_id: 9, file_type: "audio", account_id: 1, extension: nil, data_url: "https://chatwoot.custom.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7b6f28682489dace52bec88fb0b38f9ee63ba418/File.ogg", thumb_url: "", file_size: 8139, width: nil, height: nil, transcribed_text: ""}], sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}}], labels: [], meta: {sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}, assignee: {id: 1, name: "Will", available_name: "Will", avatar_url: "", type: "user", availability_status: nil, thumbnail: ""}, team: nil, hmac_verified: false}, status: "open", custom_attributes: {}, snoozed_until: nil, unread_count: 1, first_reply_created_at: Sun, 10 Aug 2025 17:17:37.014253000 UTC +00:00, priority: nil, waiting_since: 0, agent_last_seen_at: 1754848912, contact_last_seen_at: 0, last_activity_at: 1754849073, timestamp: 1754849073, created_at: 1754845904, updated_at: 1754849073.655806}, created_at: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00, id: 9, inbox: {id: 1, name: "Custom AI Dev"}, message_type: "incoming", private: false, sender: {account: {id: 1, name: "Custom"}, additional_attributes: {}, avatar: "", custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false}, source_id: "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", attachments: [{id: 8, message_id: 9, file_type: "audio", account_id: 1, extension: nil, data_url: "https://chatwoot.custom.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7b6f28682489dace52bec88fb0b38f9ee63ba418/File.ogg", thumb_url: "", file_size: 8139, width: nil, height: nil, transcribed_text: ""}], event: "message_created"}
I, [2025-08-10T18:04:33.883432 #1] INFO -- : [ActiveJob] [WebhookJob] [70af5d25-759f-45a4-8bc6-62c5df5f5818] Performed WebhookJob (Job ID: 70af5d25-759f-45a4-8bc6-62c5df5f5818) from Sidekiq(medium) in 21.14ms
I, [2025-08-10T18:04:33.894189 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [47a78529-83fd-442b-8d12-5e3ebbf08bd8] Enqueued WebhookJob (Job ID: dd8642c9-e6d1-4b0e-bd28-9d1f74fb2cae) to Sidekiq(medium) with arguments: "http://pos-whatsapp-ai.apps.svc.cluster.local:8080/pos-whatsapp-ai/webhook/chatwoot/receiveMessage", {additional_attributes: {}, can_reply: true, channel: "Channel::Whatsapp", contact_inbox: #<GlobalID:0x00007f654edf8fa8 @uri=#<URI::GID gid://chatwoot/ContactInbox/1>>, id: 1, inbox_id: 1, messages: [{id: 9, content: nil, account_id: 1, inbox_id: 1, conversation_id: 1, message_type: 0, created_at: 1754849073, updated_at: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00, private: false, status: "sent", source_id: "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", content_type: "text", content_attributes: {}, sender_type: "Contact", sender_id: 1, external_source_ids: {}, additional_attributes: {}, processed_message_content: nil, sentiment: {}, conversation: {assignee_id: 1, unread_count: 1, last_activity_at: 1754849073, contact_inbox: {source_id: "5215660548888"}}, attachments: [{id: 8, message_id: 9, file_type: "audio", account_id: 1, extension: nil, data_url: "https://chatwoot.custom.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7b6f28682489dace52bec88fb0b38f9ee63ba418/File.ogg", thumb_url: "", file_size: 8139, width: nil, height: nil, transcribed_text: ""}], sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}}], labels: [], meta: {sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}, assignee: {id: 1, name: "Will", available_name: "Will", avatar_url: "", type: "user", availability_status: nil, thumbnail: ""}, team: nil, hmac_verified: false}, status: "open", custom_attributes: {}, snoozed_until: nil, unread_count: 1, first_reply_created_at: Sun, 10 Aug 2025 17:17:37.014253000 UTC +00:00, priority: nil, waiting_since: 1754849073, agent_last_seen_at: 1754848912, contact_last_seen_at: 0, last_activity_at: 1754849073, timestamp: 1754849073, created_at: 1754845904, updated_at: 1754849073.717792, event: "conversation_updated", changed_attributes: [{"updated_at" => {previous_value: Sun, 10 Aug 2025 18:04:33.655806544 UTC +00:00, current_value: Sun, 10 Aug 2025 18:04:33.717792214 UTC +00:00}}, {"waiting_since" => {previous_value: nil, current_value: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00}}]}
I, [2025-08-10T18:04:33.894355 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [47a78529-83fd-442b-8d12-5e3ebbf08bd8] Performed EventDispatcherJob (Job ID: 47a78529-83fd-442b-8d12-5e3ebbf08bd8) from Sidekiq(critical) in 92.26ms
I, [2025-08-10T18:04:33.896543 #1] INFO -- : [ActiveJob] [WebhookJob] [dd8642c9-e6d1-4b0e-bd28-9d1f74fb2cae] Performing WebhookJob (Job ID: dd8642c9-e6d1-4b0e-bd28-9d1f74fb2cae) from Sidekiq(medium) enqueued at 2025-08-10T18:04:33.892379716Z with arguments: "http://pos-whatsapp-ai.apps.svc.cluster.local:8080/pos-whatsapp-ai/webhook/chatwoot/receiveMessage", {additional_attributes: {}, can_reply: true, channel: "Channel::Whatsapp", contact_inbox: #<GlobalID:0x00007f654edf2e50 @uri=#<URI::GID gid://chatwoot/ContactInbox/1>>, id: 1, inbox_id: 1, messages: [{id: 9, content: nil, account_id: 1, inbox_id: 1, conversation_id: 1, message_type: 0, created_at: 1754849073, updated_at: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00, private: false, status: "sent", source_id: "wamid.HBgNNTIxNTY2MDU0NDY0MhUCABIYFDNBOEY2RUQxQjIxQ0ZCQzc5MDUwAA==", content_type: "text", content_attributes: {}, sender_type: "Contact", sender_id: 1, external_source_ids: {}, additional_attributes: {}, processed_message_content: nil, sentiment: {}, conversation: {assignee_id: 1, unread_count: 1, last_activity_at: 1754849073, contact_inbox: {source_id: "5215660548888"}}, attachments: [{id: 8, message_id: 9, file_type: "audio", account_id: 1, extension: nil, data_url: "https://chatwoot.custom.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7b6f28682489dace52bec88fb0b38f9ee63ba418/File.ogg", thumb_url: "", file_size: 8139, width: nil, height: nil, transcribed_text: ""}], sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}}], labels: [], meta: {sender: {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact"}, assignee: {id: 1, name: "Will", available_name: "Will", avatar_url: "", type: "user", availability_status: nil, thumbnail: ""}, team: nil, hmac_verified: false}, status: "open", custom_attributes: {}, snoozed_until: nil, unread_count: 1, first_reply_created_at: Sun, 10 Aug 2025 17:17:37.014253000 UTC +00:00, priority: nil, waiting_since: 1754849073, agent_last_seen_at: 1754848912, contact_last_seen_at: 0, last_activity_at: 1754849073, timestamp: 1754849073, created_at: 1754845904, updated_at: 1754849073.717792, event: "conversation_updated", changed_attributes: [{"updated_at" => {previous_value: Sun, 10 Aug 2025 18:04:33.655806544 UTC +00:00, current_value: Sun, 10 Aug 2025 18:04:33.717792214 UTC +00:00}}, {"waiting_since" => {previous_value: nil, current_value: Sun, 10 Aug 2025 18:04:33.654376000 UTC +00:00}}]}
I, [2025-08-10T18:04:33.900827 #1] INFO -- : [ActiveJob] [WebhookJob] [dd8642c9-e6d1-4b0e-bd28-9d1f74fb2cae] Performed WebhookJob (Job ID: dd8642c9-e6d1-4b0e-bd28-9d1f74fb2cae) from Sidekiq(medium) in 7.36ms
I, [2025-08-10T18:04:33.912374 #1] INFO -- : [ActiveJob] [ActionCableBroadcastJob] [d8d32bbb-0920-4995-9696-f6ffaa593005] Performing ActionCableBroadcastJob (Job ID: d8d32bbb-0920-4995-9696-f6ffaa593005) from Sidekiq(critical) enqueued at 2025-08-10T18:04:33.911631343Z with arguments: ["H1GEDyTf9ZcBjyX6aGhNoy8n"], "notification.deleted", {notification: {id: 7}, unread_count: 1, count: 1, account_id: 1}
I, [2025-08-10T18:04:33.916603 #1] INFO -- : [ActiveJob] [ActionCableBroadcastJob] [d8d32bbb-0920-4995-9696-f6ffaa593005] Performed ActionCableBroadcastJob (Job ID: d8d32bbb-0920-4995-9696-f6ffaa593005) from Sidekiq(critical) in 4.3ms
I, [2025-08-10T18:04:33.917513 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [e1c5b457-00c6-43f6-8385-92cf2da7c619] Skipping EventDispatcherJob with ["notification.deleted", {"_aj_serialized" => "ActiveJob::Serializers::TimeWithZoneSerializer", "value" => "2025-08-10T18:04:33.908416434Z", "time_zone" => "Etc/UTC"}, {"notification" => {"_aj_globalid" => "gid://chatwoot/Notification/7"}, "_aj_symbol_keys" => ["notification"]}] because of ActiveJob::DeserializationError (Error while trying to deserialize arguments: Couldn't find Notification with 'id'=7)
E, [2025-08-10T18:04:33.917560 #1] ERROR -- : [ActiveJob] [EventDispatcherJob] [e1c5b457-00c6-43f6-8385-92cf2da7c619] Discarded EventDispatcherJob (Job ID: e1c5b457-00c6-43f6-8385-92cf2da7c619) due to a ActiveJob::DeserializationError (Error while trying to deserialize arguments: Couldn't find Notification with 'id'=7).
I, [2025-08-10T18:04:33.917594 #1] INFO -- : [ActiveJob] [EventDispatcherJob] [e1c5b457-00c6-43f6-8385-92cf2da7c619] Performed EventDispatcherJob (Job ID: e1c5b457-00c6-43f6-8385-92cf2da7c619) from Sidekiq(critical) in 1.7ms
I, [2025-08-10T18:04:33.930471 #1] INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [711c6191-b55f-409e-8195-7a5922b7518d] Performed ActiveStorage::AnalyzeJob (Job ID: 711c6191-b55f-409e-8195-7a5922b7518d) from Sidekiq(default) in 91.37ms
I, [2025-08-10T18:04:33.930641 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued ActionCableBroadcastJob (Job ID: c959fad3-4c14-4773-a330-9733824e35a8) to Sidekiq(critical) with arguments: ["account_1"], "contact.updated", {additional_attributes: {}, custom_attributes: {}, email: nil, id: 1, identifier: nil, name: "Custom App", phone_number: "+5215660548888", thumbnail: "", blocked: false, type: "contact", account_id: 1}
I, [2025-08-10T18:04:33.931887 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued EventDispatcherJob (Job ID: 5d21a21b-f64f-4fe5-82b0-856906ae4c6b) to Sidekiq(critical) with arguments: "contact.updated", Sun, 10 Aug 2025 18:04:33.929640184 UTC +00:00, {contact: #<GlobalID:0x00007f6557fc0a58 @uri=#<URI::GID gid://chatwoot/Contact/1>>, changed_attributes: {"updated_at" => [Sun, 10 Aug 2025 17:52:12.265984000 UTC +00:00, Sun, 10 Aug 2025 18:04:33.884496130 UTC +00:00], "last_activity_at" => [Sun, 10 Aug 2025 17:52:12.263120000 UTC +00:00, Sun, 10 Aug 2025 18:04:33.864013599 UTC +00:00]}}
I, [2025-08-10T18:04:33.933574 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued Messages::AudioTranscriptionJob (Job ID: 204ba18d-5a4c-4b70-b9df-9143bb5b5884) to Sidekiq(low) with arguments: 8
I, [2025-08-10T18:04:33.934162 #1] INFO -- : [ActiveJob] [Messages::AudioTranscriptionJob] [204ba18d-5a4c-4b70-b9df-9143bb5b5884] Performing Messages::AudioTranscriptionJob (Job ID: 204ba18d-5a4c-4b70-b9df-9143bb5b5884) from Sidekiq(low) enqueued at 2025-08-10T18:04:33.933279438Z with arguments: 8
I, [2025-08-10T18:04:33.935173 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Enqueued ActiveStorage::AnalyzeJob (Job ID: 16be8f14-9977-401b-ad02-c1b2e622ee55) to Sidekiq(default) with arguments: #<GlobalID:0x00007f6560519178 @uri=#<URI::GID gid://chatwoot/ActiveStorage::Blob/8>>
I, [2025-08-10T18:04:33.935657 #1] INFO -- : [ActiveJob] [Webhooks::WhatsappEventsJob] [572a5a8a-db82-4427-b40e-fc35c96308ec] Performed Webhooks::WhatsappEventsJob (Job ID: 572a5a8a-db82-4427-b40e-fc35c96308ec) from Sidekiq(low) in 1316.53ms
I, [2025-08-10T18:04:33.939377 #1] INFO -- : [ActiveJob] [Messages::AudioTranscriptionJob] [204ba18d-5a4c-4b70-b9df-9143bb5b5884] Performed Messages::AudioTranscriptionJob (Job ID: 204ba18d-5a4c-4b70-b9df-9143bb5b5884) from Sidekiq(low) in 5.25ms
Describe the bug
When creating a WhatsApp channel in Chatwoot version 4.4.0, I can send and receive text messages correctly.
If I send an audio or image from Chatwoot to WhatsApp, it is received successfully.
However, when I send an audio or image from WhatsApp to Chatwoot, it does not work.
It seems that the media file is downloaded in Rails, but when I try to retrieve it from the UI, I get a 404 Not Found error.
To Reproduce
Steps to Reproduce:
Environment:
Expected behavior
Audio or image sent from WhatsApp to Chatwoot should be available for playback/download in the Chatwoot conversation.
Environment
app.chatwoot.com
Cloud Provider
None
Platform
None
Operating system
No response
Browser and version
4.4.0
Docker (if applicable)
No response
Additional context
Text messages work fine in both directions. Media sent from Chatwoot to WhatsApp works fine.
The issue only occurs when receiving media from WhatsApp into Chatwoot.
Relevant Logs:
Worker log:
Web log: