422Validation failed: File has contents that are not what they are reported to be


I am trying to upload a MP3 file and get this error message:

422 Validation failed: File has contents that are not what they are reported to be

I then converted the MP3 file to M4A and retried but got the same error. What’s wrong?

You might be running into one more paperclip bug :frowning:

Do you have a system where you can try file command on your mp3 ?


Hello! Thank you for reading and replying! :+1:

I’m afraid I don’t. However I was able to upload the MP3 file to mas.to, but not to mastodon.social. They’re both running version 3.1.2. Weird.

Oh, one more thing —maybe here is the issue. This is the toot with the uploaded MP3 file. When you download the file from that download icon, you will note that no metadata is present… except for the album art. Could it be possible that this file was not properly detected because of the embedded album art? :thinking:

Also, the embedded player doesn’t show the waveform.

Can you upload the original file somewhere?

Sure! Here it is.

Thanks, got the same results:

radziecki> file "Tiny Star.mp3"
Tiny Star.mp3: Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v1, 320 kbps, 44.1 kHz, JntStereo
radziecki> id3v2 -l "Tiny Star.mp3"
id3v1 tag info for Tiny Star.mp3:
Title  : Tiny Star                       Artist: Index                         
Album  : The Complete Journey            Year: 2014, Genre: Unknown (255)
Comment: http://j.mp/kmastodon           Track: 7
id3v2 tag info for Tiny Star.mp3:
COMM (Comments): ()[eng]: http://j.mp/kmastodon
TALB (Album/Movie/Show title): The Complete Journey
TCON (Content type): Dance & Electrónica (255)
TENC (Encoded by): KNTRO
TIT2 (Title/songname/content description): Tiny Star
TPE1 (Lead performer(s)/Soloist(s)): Index
TPE2 (Band/orchestra/accompaniment): Index
TPOS (Part of a set): 1/1
TPUB (Publisher): Music Brokers
TRCK (Track number/Position in set): 07/19
TYER (Year): 2014
WXXX (User defined URL link): (): http://j.mp/kmastodon
TXXX (User defined text information): (ISRC (international standard recording code)): ARF410300095
TXXX (User defined text information): (Length): 387
TXXX (User defined text information): (Part of a set): 1/1
TXXX (User defined text information): (BARCODE): 888608922814
TXXX (User defined text information): (EncodedBy): KNTRO
TXXX (User defined text information): (ITUNESADVISORY): 0
TXXX (User defined text information): (Url): https://twitter.com/KNTRO
APIC (Attached picture): ()[, 3]: image/jpg, 75808 bytes
1 Like

I get the same error. It’s awful and there has been a pull request for this already.

I wish @Gargron would merge such crucial fixes.

1 Like

This is per se not a bug in Mastodon. Please file a bug with the system you are using to fix their file command.

It is nice to have a workaround but this should not be a permanent solution.