How to debug 422 Error processing thumbnail for uploaded media

journalctl -u mastodon-web shows nothing but something like the following:

Nov 30 09:27:08 jabberwocky bundle[6557]: [363d8b12-cfea-4c2d-b19d-631300be199a] method=GET path=/api/v1/media/105298550033164446 format=html controller=Api::V1::MediaController action=show status=422 duration=7.94 view=0.71 db=1.46

It’s strange that I am getting this error even for some mp3 files without any thumbnails. But I could not reproduce it on mastodon.online so I don’t know where to start.

anything in some other mastodon service logs? the problem is probably that PaperClip (component responsible for media identification/transcoding) has issues detecting the file type right.

One issue I remember (can’t locate it right now) was that the magic database of the file(1) command was broken on some operating systems and had to be updated. Things to try is to run file yourfile.mp3 on your instance server and see what it gives out.

1 Like

Thanks!
I manually downloaded file 5.39 source code from their site and installed with checkinstall and ldconfig. Then I hold those packages from upgrading. So far everything seems fine.
But I think there might be some other reasons, such as unstable connection to the object storage service. DigitalOcean Spaces had some weird problems and down-times before.
Anyway I marked your reply as the solution.

1 Like

I think object storage errors would have shown somehow up in the logs. Great to hear it works so far for you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.