I frequently encounter the following error when trying to upload images to post: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Additional info: jpeg file type, Lemmy web interface, desktop PC, Firefox browser.
Any idea what causes this?
We were getting them on our instance when images took more than 10 seconds to upload. It was timing out and returning that message
You say “were”, past tense. Did you eventually find a fix or a workaround?
Was the unexpected character a
u
?Maybe? The popup doesn’t say what the character was, just that it was unexpected. Is there some error debug dump log I should look at for more info?
Use a desktop browser and open the developer tools, specifically the console tab. With the console tab open recreate the error and see if there’s more info output in the console.
Did your file have a BOM (byte order mark)? That’s often a cause for errors like that. I’d fire up a hex editor and take a look.