Website previews: "context deadline exceeded"

Summary
Issue in one concise sentence

As of recently (don’t know at which version exactly, sorry! :man_shrugging:), website previews don’t work anymore, and error messages are logged stating “context deadline exceeded”.

Steps to reproduce
How can we reproduce the issue (what version are you using?)

Post a Youtube or Amazon link, for example - no preview is generated. I’m currently using mattermost-team-11.8.2-linux-amd64.tar.xz.

Expected behavior
Describe your issue in detail

Website previews should work as before. :wink:

Observed behavior
What did you see happen? Please include relevant error messages and/or screenshots.

No previews are generated below the posted links. Error messages get logged, stating “context deadline exceeded”. I guess posting screenshots where no previews are generated doesn’t make much sense, but here’s a couple of the log entries:

warn  [2026-06-29 08:44:06.485 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=gmqpsrnuypn578pckywicnkziy ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjuwlhYHWHTM": context deadline exceeded"
warn  [2026-06-29 14:46:04.396 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/users/kxzxbyskcfrjbm3ifuq6wgy8my/channels/o4jsj83gkpdipgqzst14ibenhy/posts/unread request_id=capxzra3btnciesbgijm99gy6e ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVTv5WhJftiQ": context deadline exceeded"
warn  [2026-06-30 18:41:17.770 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=bhkwfdp3yifk3f46o7xtt4ib1w ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjuwlhYHWHTM": context deadline exceeded"
warn  [2026-07-01 08:52:36.380 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=brrr97f78jgiuywf6d71w3wnco ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVTv5WhJftiQ": context deadline exceeded"
warn  [2026-07-02 11:25:06.484 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/users/kxzxbyskcfrjbm3ifuq6wgy8my/channels/o4jsj83gkpdipgqzst14ibenhy/posts/unread request_id=xepsb3ags7ndxb9dmt6atnqcke ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
warn  [2026-07-02 16:54:13.594 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=zor3peqgzbb1imynqazxxprn9c ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-02 16:54:13.727 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=shbyjrj1bjb69xodi8i9m3zeth ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-02 16:54:13.742 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=iryy7t4dk3dz5mchwjc74b9gca ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-03 11:14:23.246 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=s6kezc3pw388xmmzeb1ponhe1w ip_addr=127.0.0.1 user_id=hz3116o7pjrhfmwqyxmekcursc method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-05 23:33:43.818 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=5d7tjjoi978j5kdu3cppawws1o ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-05 23:33:43.988 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=ypoujtt3eirdxj9tn4gxk8m5da ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-05 23:33:45.074 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=s85rai18bfraxes15y93opsb9a ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-06 11:50:25.445 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=qhjth8dpppngmfoax1w81hdqze ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrBW65Jbesjw": context deadline exceeded"
warn  [2026-07-06 11:52:03.915 +02:00] error fetching OG image data                  caller="app/post_metadata.go:1044" path=/api/v4/posts request_id=6tr1cjwc7tguxxrnq44n6ia3uo ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=POST error="Get "https://www.amazon.de/Vakarey-Lenovo-Idea-Plus-12-1/dp/B0FRRPDGTS": context deadline exceeded"
warn  [2026-07-06 11:59:08.842 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=dmjopmohwirj5rwhsx93xj1qoo ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjuwlhYHWHTM": context deadline exceeded"
warn  [2026-07-06 11:59:13.846 +02:00] error fetching oEmbed data                    caller="app/post_metadata.go:1005" path=/api/v4/channels/o4jsj83gkpdipgqzst14ibenhy/posts request_id=dmjopmohwirj5rwhsx93xj1qoo ip_addr=127.0.0.1 user_id=kxzxbyskcfrjbm3ifuq6wgy8my method=GET error="Get "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dx6sX_Q3XKMA": context deadline exceeded"

Any ideas on how to get website previews working again? :thinking:

TIA & HAND
Thomas

Hi Thomas, great to see you back, and thanks for the detailed logs - because both the YouTube oEmbed and Amazon requests are timing out, could you test those URLs with curl from the Mattermost host or container and check for any recent DNS, firewall, outbound proxy, or IPv6 changes, as website previews require the server to have outbound internet access, then let us know what you find?

Thanks, I think I found & fixed the issue in the meantime. :partying_face:

I have an IPv6 tunnel which appeared to be up & running, but somehow failed silently, preventing any data to go through in either direction, thus leading to timeouts. So whenever a hostname happend to resolve to an IPv6 address rather than an IPv4 address, the data would be sent through that broken tunnel, but not actually get through. :roll_eyes:

I’ve since configured another IPv6 tunnel with a different provider & endpoint, and website previews are working again. :smiling_face_with_sunglasses: :+1: