Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Sometimes lemmy returns the wrong rich link preview #2808

Open
5 tasks done
db0 opened this issue Nov 11, 2024 · 5 comments
Open
5 tasks done

[Bug]: Sometimes lemmy returns the wrong rich link preview #2808

db0 opened this issue Nov 11, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@db0
Copy link

db0 commented Nov 11, 2024

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

This is something I noticed the last week. Sometimes when linking to a lemmy post, the wrong preview image and blurb is being returned. Initially I thought it was just a fluke when I linked to this post and got a different result in the preview, but today it happened a second time from mastodon, with pretty catastrophic results. I posted one link to mastodon, and the preview was a completely different and very NSFW preview instead. The only way to "fix" it was to edit my post and add a random query at the end.

I asked on matrix and it seems I'm not the only one affected https://mstdn.social/@DJxSpeedy/113443024738078089

I checked manually on my post and the preview meta tags are all, currently correc.

Not sure if this is a UI issue or a backend issue. Feel free to move.

Steps to Reproduce

  1. Post a lemmy link somewhere which fetches link previews.
  2. Randomly get the wrong one

Technical Details

I'm on lemmy 0.19.6 but this seemns to have also affected previous versions

Version

0.19.6

Lemmy Instance URL

lemmy.dbzer0.com

@db0 db0 added the bug Something isn't working label Nov 11, 2024
@Nothing4You
Copy link

Do you happen to be able to reproduce this reliably?
Does this seem to only happen when posting Lemmy links to Mastodon or did you see this anywhere else as well?
Are the steps for "posting to Mastodon" to create a toot and put the link in the body and that leads to this or something else?

@Nothing4You
Copy link

I missed the link to the Lemmy post originally.
The lemmy.zip post looks normal when viewed from Lemmy, while it seems broken on Mastodon.

https://lemmy.dbzer0.com/post/31168360, which links to https://lemmy.dbzer0.com/post/31115200, shows wrong metadata even on Lemmy:

{
  "id": 31168360,
  "name": "Will upgrade to 0.19.6 sometime today",
  "url": "https://lemmy.dbzer0.com/post/31115200",
  // ...
  "published": "2024-11-09T11:05:01.327669Z",
  "updated": "2024-11-09T11:05:30.492140Z",
  // ...
  "embed_title": "Ambulance hits Oregon cyclist, rushes him to hospital, then sticks him with $1,800 bill, lawsuit says - Divisions by zero",
  "embed_description": "The cyclist, who suffered a broken nose, was initially treated at the scene by\nthe ambulance driver.",
  "thumbnail_url": "https://lemmy.dbzer0.com/pictrs/image/3a3d2376-11a9-4fd1-bb85-dd58ed314a45.webp",
  "ap_id": "https://lemmy.dbzer0.com/post/31168360",
  // ...
  "url_content_type": "text/html; charset=utf-8"
}

@Nothing4You
Copy link

Given that both of these cases are about metadata when posting links to Lemmy posts I'm inclined to say that this is likely a UI issue, which is where opengraph metadata comes from.

@Nutomic Nutomic transferred this issue from LemmyNet/lemmy Nov 15, 2024
@dessalines
Copy link
Member

I don't think this can be a lemmy-ui issue, because the only metadata fetching it does, is to fetch a page title when creating a post. The thumbnails, embed title, and embed description are all fetched in the back-end, from the URL.

I've seen these cases only when you create a post with the wrong url, then correct it afterwards.

The example above is pretty strange, and must have been done not using the cross-post button, since instead of using the https://join-lemmy.org/news/2024-11-08_-_Lemmy_Release_v0.19.6 url, it used a different lemmy link. My guess is that the original URL was the ambulance one, then you tried to correct it but used a different internal lemmy link instead of the join-lemmy.org link.

Its tough to follow but I'd need a reproducible example.

@db0
Copy link
Author

db0 commented Nov 18, 2024

The ones that happened to me are certainly not the wrong url and then edited, as they are things I've never even seen myself.

I'll post here when it happens to me again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants