-
-
Notifications
You must be signed in to change notification settings - Fork 348
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] Custom emojis in profiles returned with no URL to cached images #3605
Comments
Alright, I ran
We've got a big emoji problem. In these situations, should we just use the original emoji URL instead of caching? or should a record not be stored at all so that only the shortcode is rendered? Emitting an unusable emoji object with blank URLs seems like a less desirable option. |
Oh wow thanks for doing this detailed investigation! <3 Indeed we should fix this. I think there's a few different possible options for emojis we can't (or won't) cache locally, due to size or network outages or other issues:
I'm not sure yet which of the above is best. I'd steer away from number 2 since I don't really like hotlinking. That leaves 1 or 3. The problem with 1 is that we don't necessarily know before decoding the emoji image what file extension and content type we'd be using for it, which makes estimating a probable path for it difficult. The problem with 3 is that it precludes on-demand (re)cache attempts via attempting to access the image url (ie., what we do for media attachments), so instead of doing that we'd have to attempt to (re)cache all of a status's emojis in response to an API request for the status, rather than requests for each of the emoji image URLs. That's possible to do but requires a bit of jiggling. I'm sort of leaning towards option 3 as a fix for this 🤔 @NyaaaWhatsUpDoc do you have any feelie weelies on the matter? |
Related to #3486 as it's basically the same issue/request. |
I think we can treat media attachments and emojis differently. In the case of a missing emoji, you still get the I think trying to fetch the emoji and if it fails, we leave it at that until we for some reason refresh the status, ought to be good enough in practice? We can try fetching an emoji with the typical backoff on ingestion, but if we hit a size limitation we ought to give up entirely since that cannot be resolved without an admin changing the instance configuration. |
Describe the bug with a clear and concise description of what the bug is.
Custom emojis in profiles are returned with blank
"url"
and"static_url"
properties which prevents clients from rendering them.What's your GoToSocial Version?
0.17.3+git-6f4cb2f
GoToSocial Arch
x86 Docker
What happened?
Loading a post from a user with a custom emoji will return the emoji with missing data for
"url"
and"static_url"
preventing the emoji from being rendered properly.In some clients we see a graceful fallback to presenting the shortcode text, but in Ice Cubes it prevents timelines or profiles from loading at all (Dimillian/IceCubesApp#2202)
What you expected to happen?
"url"
and"static_url"
should be populated with urls that reference cached copies of the emoji.How to reproduce it?
Querying the account of or any post by @catsalad@infosec.exchange on my instance will present this issue with their
:ablobcatmaracasevil:
profile emoji.Anything else we need to know?
The
:ablobcatmaracasevil:
emoji does have a record in the database but it is missing urls to a locally cached version. Dumped SQL record:350 out of the 8367 emojis in my database are missing
image_url
andimage_static_url
. Their created dates vary and cover every day that my personal instance has been operational.I am using a local folder for media storage in my
docker-compose.yml
and have gigabytes of free space so I do not believe there was a time when storage prevented downloading a cached copy.The text was updated successfully, but these errors were encountered: