Open S0ulf3re opened 2 years ago
The reason of this problem might be that misskey will check if the image already exists in the database by comparing the md5 and the owner of the image when update the proflie and avatar of remote user. Misskey would do nothing except update the url
and uri
of the file in the database if the avatar of the remote doesn't change even if the cache files have been removed. So the solution to this problem is to check the drive_file
table in the database to find the wrong url of the files and correct them.
Ok, what would you reccomend to navigate the database? I have absolutely no idea of how to use psql
Ok. So, by using the following SQL:
SELECT * FROM public.drive_file where url ~ 'thetooniverse.xyz'
I was able to alienate all the incorrect files down. And many (but not all) of their URL's and thumbnail Urls are very similar. There are 11,553 records. How should I go about updating them? Obviously, manually updating all of them by hand is infeasible. So what would be the best option?
@S0ulf3re did you update the URLs in the database? if so, can you post the command?
π‘ Summary
After disabling (and deleting) the remote files cache and/or object storage, Misskey still attempts to retrieve some user avatars from the local cache or object instance that doesn't exist anymore, therefore leading to missing images on the frontend unless said avatar is already cached in the user's browser.
This first happened to me while I was setting up my instance two days ago. I was having difficulties setting up object storage and had to end up making a new bucket, and relied upon local cacheing while I was setting up the object storage. In the end, I had decided on having misskey pull media from remote servers and distributing my own media through object storage. However, by this time, I have already managed to network with multiple instances and have been subscribed to multiple relays. Even after selecting the 3 dots on a user profile, selecting "about", and then "update remote user info", the URL still doesn't update.
π₯° Expected Behavior
URL's for
avatarUrl
in the database should be automatically updated to the resource of the respective instance (i.e example.local/files/some-uuid-here or s3.yourproviderhere.example/path/to/avatarUrl-thumbnail becomes example.remote/path/to/userAvatar) whenever preferences for object storage or file caching are changed.π€¬ Actual Behavior
The original avatar URL doesn't get updated to the respective instance location. Some of the URL's are pointing to an old S3 bucket, and some of them pointing to the local cache still (which is a problem if you already deleted the local folder thinking misskey would update everything)
π Steps to Reproduce
π Environment
Misskey version: Calckey v12.118.1-calc.1 Your OS: (Client) macOS 12.5.1 (Server) Ubuntu 22.04 Your browser: Safari 15.6.1
Workarounds
TL;DR: Misskey doesn't seem to care about remote avatar URL's whenever you make significant changes to your instance's object storage or remote file cache preferences.