Skip to content

Image upload fails with '500 Internal Server Error' from Google (Python bridge) #114

@jcromero

Description

@jcromero

Image uploads fail consistently with a 500 error from Google's upload endpoint.

Context:

  • Fresh session created via incognito window (cookies extracted and updated via login).
  • Text messages work fine.
  • Small images (<500KB) fail consistently.
  • Rebooted bridge, same result.

It seems like the Google Chat API upload endpoint might have changed or is rejecting the request format.

Logs:

[2026-02-06 11:43:25,265] [DEBUG@mau.as] Handling transaction 124691 with 1 PDUs
[2026-02-06 11:43:25,270] [DEBUG@mau.as] Finished handling transaction 124691
[2026-02-06 11:43:25,271] [INFO@aiohttp.access] 127.0.0.1 [06/Feb/2026:10:43:25 +0000] "PUT /_matrix/app/v1/transactions/124691 HTTP/1.1" 200 158 "-" "Synapse/1.132.0"
[2026-02-06 11:43:25,271] [DEBUG@mau.mx] Received Matrix event  from @user:example.com in !xxx:example.com
[2026-02-06 11:43:26,769] [INFO@maugclib.http_utils] Request to https://chat.google.com/uploads?group_id=[REDACTED]&alt=&key=[REDACTED]&upload_id=[REDACTED]&session_crd=[REDACTED_TOKEN]&upload_protocol=resumable returned unexpected status: 500 Internal Server Error
[2026-02-06 11:43:26,769] [ERROR@mau.portal.dm:tocLnkAAAAE-xxx] Failed handling Matrix message 
Traceback (most recent call last):
  File "/opt/mautrix-googlechat/lib/python3.9/site-packages/mautrix_googlechat/portal.py", line 919, in handle_matrix_message
    resp = await self._handle_matrix_media(
  File "/opt/mautrix-googlechat/lib/python3.9/site-packages/mautrix_googlechat/portal.py", line 1098, in _handle_matrix_media
    upload = await sender.client.upload_file(
  File "/opt/mautrix-googlechat/lib/python3.9/site-packages/maugclib/client.py", line 309, in upload_file
    res = await self._base_request(upload_url, None, "", data, headers=headers, method="PUT")
  File "/opt/mautrix-googlechat/lib/python3.9/site-packages/maugclib/client.py", line 668, in _base_request
    res = await self._session.fetch(
  File "/opt/mautrix-googlechat/lib/python3.9/site-packages/maugclib/http_utils.py", line 169, in fetch
    raise exceptions.NetworkError(
maugclib.exceptions.NetworkError: Request return unexpected status: 500: Internal Server Error

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