Skip to content

Mobile app records audio as AAC; Telegram channel attachment fails (WEBPAGE_CURL_FAILED) while web app MP3 works #1023

@p30arena

Description

@p30arena

Bug

When replying with an audio attachment from the Chatwoot mobile app, the app uploads/attaches an .aac file.
When the inbox is a Telegram channel, Telegram fails to deliver the attachment with:

400, Bad Request: failed to send message #1 with the error message "WEBPAGE_CURL_FAILED"

However, sending audio from the web app works (it uploads MP3), and Telegram delivers it successfully.

This suggests the mobile app audio encoding/container is incompatible with what the Telegram integration expects.

Steps to reproduce

  1. Connect a Telegram inbox/channel in Chatwoot (self-hosted or cloud).
  2. From Chatwoot web app, record/send audio -> Telegram receives it (works).
  3. From Chatwoot mobile app, record/send audio -> message fails in Telegram with WEBPAGE_CURL_FAILED.

Expected behavior

Mobile app audio attachments should be delivered to Telegram, same as web app.

Actual behavior

Mobile app audio attachments fail on Telegram inbox with:
WEBPAGE_CURL_FAILED

Evidence / logs

Chatwoot server log shows:

  • Attachment uploaded as .aac (example):
    .../rails/active_storage/blobs/redirect/.../audio-1.aac
  • Telegram error:
    400, Bad Request: failed to send message #1 with the error message "WEBPAGE_CURL_FAILED"

Also, the .aac URL is reachable publicly (302 -> 200) via curl, so this does not look like a simple "blocked file" case.

Environment

  • Chatwoot: self-hosted
  • Mobile app: Chatwoot official mobile app (React Native)
  • Telegram: Chatwoot Telegram channel integration
  • Reverse proxy/CDN: Cloudflare (but web MP3 works, mobile AAC fails)

Proposed fix / direction

  • Make mobile audio recording use a Telegram-friendly format:
    • Prefer m4a (AAC in MP4 container) or mp3, matching web behavior.
    • Or if Telegram integration treats it as a voice note (sendVoice), encode as ogg/opus.
  • Ensure mobile app sets correct MIME type and extension.
  • Ideally align mobile audio attachment format with web app for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions