mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.21k stars 170 forks source link

Http 500 Error on POST pictures #632

Closed muellerjoel closed 1 year ago

muellerjoel commented 1 year ago

IMG_1388

tulir commented 1 year ago

That's an error in your homeserver

muellerjoel commented 1 year ago

Are you shure? In private whatsapp rooms the pictures are shown normal

tulir commented 1 year ago

Yes, that's what "internal server error" means: the server that handled the request is broken. /_matrix/media/v3/upload is usually handled by the homeserver, or if you have a separate media repo then by that server.

muellerjoel commented 1 year ago

Ok. Wired. Why should video work in the same broadcast room and pictures not and so pictures in normal bridge rooms too.

muellerjoel commented 12 months ago

Ok i found out the error it’s about sqlite version. Sqlite 3.40 is all ok with 3.42 the internal error shows up

Happyfeet01 commented 12 months ago

hi @muellerjoel

have the same error message with the generated QR Code. Can you tell me how you downgrade the Sqlite Version?

ERR Failed to upload QR code: failed to POST /_matrix/media/v3/upload: M_UNKNOWN (HTTP 500):

muellerjoel commented 12 months ago

@Happyfeet01

Hi Which Distro do you have?

For Arch Linux go to https://archive.archlinux.org browse s and go to the right sqlite version copy the url

do curl -o URL and then pacman -U sqlite-XXXXX

Restart synapse and the bridge with systemd service

Cheers

uvolmer commented 12 months ago

I had the same error with a matrix synapse installed via pip. Posting images to unencrypted rooms (like whatsapp) was not possible. For me, this was solved by

pip install -U pillow==9.5.0

Happyfeet01 commented 12 months ago

Thanks. That Works @uvolmer @muellerjoel

blacklight commented 11 months ago

Downgrading Pillow worked for me (but not downgrading SQLite).

Does anyone know why this bug started occurring in the first place? I can't see any details from the logs, and, even though downgrading Pillow is a workaround that works for now, I can't keep it on a lower version without breaking other Python system packages.

uvolmer commented 11 months ago

The synapse bugreport of the pillow bug is below. As far as I know, it is fixed in synapse version 1.88.0

https://github.com/matrix-org/synapse/pull/15876