matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.79k stars 2.13k forks source link

Failure to download image for URL preview should not fail the whole preview #5298

Closed turt2live closed 2 years ago

turt2live commented 5 years ago

Currently Synapse uses OpenGraph to try and find an image. If that fails, it'll pick an image from the DOM. If the image from either fails to download (403, 404, too large, etc) then Synapse should just return a preview without an image. Currently, it instead throws a 502 error instead.

akontsevich commented 5 years ago

изображение This is preview from Skype, for example. However it is not the only problem: as I mentioned nothing from youtube works, many other sites like this: https://hdrezka-me.me/22654-teni-ischezayut-v-polden-95051943.html, livejournal, etc - nothing works actually.

akontsevich commented 5 years ago

Inserting new youtube link shows preview, however all previous links or on next days links are not previewed. So could be both synapse and client bugs.

akontsevich commented 5 years ago

Happen again today for some links, yesterday preview was normal for that link, for example: https://rezka.ag/series/drama/13646-blokada.html

Kevin-Mok commented 5 years ago

I have a site hosting Twitch emotes that I used to reference to preview the emote. It was just working the last couple of days but suddenly stopped working. Previews from other images not on that site still work fine, so I'm not sure what happened.

It used to just work like this but now doesn't show anything, even though the link is still valid: 7d37a7c0876078d3

Edit: They started working again after a few hours.

akontsevich commented 4 years ago

Issue appeared again. Please fix!

akontsevich commented 4 years ago

URL preview is terrible: often show on strange languages like on screenshot below: Screenshot_20191019_192445 - text above should be on Russian. Definitely logic should be moved to client side!