Twitter Links No Longer Previewing

Summary

Twitter links are no longer showing up in Mattermost with a Preview box.

Steps to reproduce

Post a link to a tweet in v5.2.4

Expected behavior

Twitter links have a Preview box.

Observed behavior

We upgraded to Mattermost v5.2.4 four days ago. Twitter link previews were working fine two days, on Monday. Yesterday, on Tuesday, they mysteriously stopped working and I have not been able to find the problem.

Twitter links still work in Slack and in iMessage, so I don’t believe Twitter is the problem. Previews for Facebook, YouTube and random news articles still work fine in Mattermost. I’ve looked in System Console and “Enable Link Previews” is flagged as True, as well as “Website Link Previews” in in my personal Account Settings.

Any help would be appreciated. Thank you.

2 Likes

This link works: https://janchowk.com/zaruri-khabar/apartheid-in-fancy-dress/

<meta property="og:title" content="फैंसी ड्रेस में रंग और नस्लभेद">
<title>फैंसी ड्रेस में रंग और नस्लभेद</title>
<meta name="twitter:title" content="फैंसी ड्रेस में रंग और नस्लभेद">

This link doesn’t work: https://twitter.com/_anishaaaaaa_/status/1267341648847126532

<meta property="og:title" content="Anisha on Twitter: &quot;I know damn well there’s not a hippo roaming the streets of Chicago rn https://t.co/lUl5Ccv4Tp&quot; / Twitter" data-rdm="">
<title>Anisha on Twitter: "I know damn well there’s not a hippo roaming the streets of Chicago rn https://t.co/lUl5Ccv4Tp" / Twitter</title>

Considering the null meta-tags, does this mean it’s a Twitter problem? Do Slack and iMessage have some sort of redundancy built-in that Mattermost doesn’t?

Ah: [Help Wanted] Website Link Previews · Issue #4257 · mattermost/mattermost · GitHub

If there is no description on the web page, do not create a link preview.

Is this still valid? If so, that’s a pain. Tweets no longer have a “og:description” tag. Everything is now in the “og:title” tag.

Our supported server versions include v5.19 and later versions. Would you be open to upgrading to see if your issue gets fixed?

Apologies, we’re actually on:

App Title & Version: Mattermost 5.23.1
Package Version: v1.37.1
Last Updated: 15 hours ago
  • What OS and version are you on?
  • Do you use Image Proxy on your instance? If yes, is it configured correctly in the same way prior to the upgrade?
  • Are the link previews completely broken or just missing? Can you send a screenshot of what you are seeing?
  • Please send over a copy of the config.json with the sensitive information redacted as well as a copy of the mattermost.log during the upgrade process too.

I would be happy to, but before I do, would it be possible for someone running a Mattermost instance to check if Twitter links are previewing for them?

This is the expected behavior:

This is what is currently happening, sans preview:

I am observing the same behavior as well

  • What OS and version are you on?
  • Do you use Image Proxy on your instance? If yes, is it configured correctly in the same way prior to the upgrade?
  • Are the link previews completely broken or just missing? Can you send a screenshot of what you are seeing?
  • Please send over a copy of the config.json with the sensitive information redacted as well as a copy of the mattermost.log during the upgrade process too.

I feel I may have confused the situation, so let me summarize: Twitter has changed how they handle their meta tags and Twitter link previews no longer work with Mattermost. I believe other chat applications are affected as well, if they depended on the same logic that Mattermost depended on.

It’s up to Mattermost to fix this, as Twitter will not. Is there somewhere to submit a bug report? Github Issues?

Ah ok, I wasn’t aware of that. I opened a ticket here: [MM-25940] - Mattermost.

3 Likes

Thank you for your help Amy! I hope you have a nice day!

Twitter link previews haven’t been working for months now, when will this be fixed?

Hello, @sdhar

The team is discussing about this issue publicly in the MM-25940 bug created by Amy. While we do not have any solid dates as to when the fix is going to be out, I highly recommend you to add yourself as a watcher if you haven’t to keep yourself notified for the progress of it.

Users from Japan reported this issue, and hope that this problem will be solved. And they think that it would be better if there is a function to change the user agent for loading the OGP card.