Page 1 of 2

Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: October 31st, 2022, 4:31 pm
by Vilcker7
Good evening, Librivox forum friends!

I would like to ask for your help, please, with this error I'm getting when trying to upload a file:

Unexpected token '<', "<!doctype "... is not valid JSON

Well I had tried other times and sometimes the error that appears is simply: ''Error true''.

Please, whoever has more experience than me and can shed some light. :)

Browsers used in the tests: Google Chrome and Microsoft Edge.

File name and weight:

guarany_20_alencar_128kb (15.9mb)

Thanks! :D

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: October 31st, 2022, 4:35 pm
by annise
Are you including the (15.9mb) in your upload? if so just use the file name and try.

Anne

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: October 31st, 2022, 6:13 pm
by Vilcker7
Yea! The file name is only ''guarany_20_alencar_128kb''.

However, something strange happens is that the upload is taking too long to load.
It gives the impression that the file is very heavy, although it is not.

Anyway, thanks Annise! :D

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: October 31st, 2022, 7:27 pm
by annise
I've never had that message but it seems to imply there is a character in what you are entering that it will not accept. Do you have .mp3 after the 128kb like

guarany_20_alencar_128kb.mp3 ? or just guarany_20_alencar_128kb ?

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: October 31st, 2022, 8:00 pm
by annise
Ok - I did a forum search and it is suggested you may have timed out. Does logging out then logging in help ?

Anne

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 1st, 2022, 11:22 am
by Vilcker7
Hi, Anne.

No, in the filename I didn't add mp3, only 128kb.

and re-entering the account is also not working, unfortunately...

I think about trying another browser (Mozilla Firefox), to see if it works.

In case I get the same error, I'll try to re-record a smaller audio and see if it's passing.

I used a cell phone to record.

Thank you very much for the support!

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 1st, 2022, 12:26 pm
by TriciaG
Hmm. If logging out and then back in doesn't work, try stripping all metadata from the file (any title/album/track/reader/comment information aside from the file name).

If that doesn't work, maybe it's not an MP3?

Can you run it through Checker? Does it work there? It's here: https://cgjennings.ca/projects/checker/ if you need to download it.

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 1st, 2022, 7:24 pm
by InTheDesert
It seems like this has happened to someone else recently.

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 2nd, 2022, 8:46 am
by redrun
Just to make sure:
I see from your 1-minute test post that you might be using the MP3Gain program to adjust the volume of your recordings. The usual advice is to use it to check the volume, but to make the adjustments in Audacity.
Can you try uploading a new MP3 file before using MP3Gain, and see if that is accepted?


The trouble with MP3Gain is that it doesn't actually make your file louder, it just adds metadata that tells audio players to play it louder. That metadata is usually recognized, but it can cause trouble when it's not.
Here's another way of adjusting volume from within Audacity, which doesn't require using MP3Gain. The latest versions might have moved it to Effect -> Volume and Compression -> Loudness Normalization, but here's a video showing how to use it:
https://www.youtube.com/watch?v=aSKR55RDVpk&list=PLD623ECF357234509&index=46&t=8s

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 2nd, 2022, 8:49 am
by TriciaG
redrun wrote: November 2nd, 2022, 8:46 am Just to make sure:
I see from your 1-minute test post that you might be using the MP3Gain program to adjust the volume of your recordings. The usual advice is to use it to check the volume, but to make the adjustments in Audacity.
Can you try uploading a new MP3 file before using MP3Gain, and see if that is accepted?


The trouble with MP3Gain is that it doesn't actually make your file louder, it just adds metadata that tells audio players to play it louder. That metadata is usually recognized, but it can cause trouble when it's not.
Here's another way of adjusting volume from within Audacity, which doesn't require using MP3Gain. The latest versions might have moved it to Effect -> Volume and Compression -> Loudness Normalization, but here's a video showing how to use it:
https://www.youtube.com/watch?v=aSKR55RDVpk&list=PLD623ECF357234509&index=46&t=8s
This shouldn't have anything to do with the error message in the uploader. :)

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 2nd, 2022, 8:56 am
by redrun
Fair enough, though that same error message does show up any time a file fails to upload for any reason - it's not an MP3 file (or is malformed, including malformed metadata), it's a fine file but the user's login session has expired, or there's some temporary issue that interrupted the connection.

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 2nd, 2022, 5:59 pm
by Vilcker7
Hey guys!

I came back to update how things are going:

First of all I would like to thank everyone for their good disposition and support!

Well, with the audio I tried everything so far that you guys have indicated to me: give audio gain through Audacity, by the way, thank you very much for the tip because I didn't know about this tip.

I had the tags removed too, Tricia, thank you very much. =)

The good news is that I re-recorded a short audio test on my cell phone at 2:00m and strangely it passed... Well, I plan on re-recording the entire audio even though I don't know what happened.

I hope this time it works.

A thousand apologies for giving you this headache

Anyway, thank you all my friends and have a great night.

Whoever has more suggestions to save the audio I'll be trying because I thought the reading was very good and it would be interesting to ''recover it''.

I'm using Google Translate, so I kindly ask you to understand if one expression or another was misplaced. Sometimes these translations are not so accurate.

Good recordings and readings to all!

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 2nd, 2022, 7:58 pm
by knotyouraveragejo
Hi. Before you rerecord, try the following.

Open Audacity
Under the File Menu - Open

Navigate to the file saved on your system. If the file opens in Audacity, then reexport it to mp3 as follows

Click on the File Menu, then select Export - Export as mp3

At the bottom of the export window that opens,

Save as type MP3 files

Under Format Options, choose the following
Bit Rate Mode: Constant
Quality - select 128 kbps from the dropdown
Channel Mode: Force export to mono

Navigate to the folder where you want to save the file, make sure the filename is guarany_20_alencar_128kb.mp3

then Click Save

Then reopen the uploader, login and try and upload this new saved file.

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 5th, 2022, 7:10 am
by Vilcker7
Hello, knotyouraveragejo, good morning!

I did everything you told me and it still didn't work...

But, something happened that I found even more interesting while I'm reviewing all the technical devices of cell phones, recording, etc.

I kind of had nothing else to do, I went to use my audios already recorded and given as ''OK'' here in librivox (a poem called Horto) and, believe me, it gave ''error true'' again.

Something that I noticed is, for example, with this poem by Horto that I've already recorded: it has 1.20mb, but when the uploader finishes loading it ends up with 1.22gb and the same message ''error true'' appears. With another section of this same poem appears: ''Error Request Timeout'', with a certain slowness like the others and also leaving the files in GB at the end.


Well, I'll keep checking myself here to see what I'm doing wrong. But in fact, it's the first time it's happened to me...


Peace, friends and thank you!

Re: Upload Error: Unexpected token '<', "<!doctype "... is not valid JSON

Posted: November 6th, 2022, 2:47 pm
by Rapunzelina
Let us know if you've had any progress!
Vilcker7 wrote: October 31st, 2022, 6:13 pm The file name is only ''guarany_20_alencar_128kb''.
It might be that you can't see the suffix .mp3 because it's set to hide file extensions, or it might be that the file somehow lost its .mp3 extension, in which case the file can't be recognised as an MP3 file so it can't be uploaded.

If the file is missing the extension, then that might be the problem. But if you can see the extension (guarany_20_alencar_128kb.mp3) when you select it at the uploader, then something else must be wrong...

I can't explain the change in size (MB vs GB). This used to be an issue, but shouldn't be anymore.