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?

  • AdaA
    link
    35 months ago

    We were getting them on our instance when images took more than 10 seconds to upload. It was timing out and returning that message

    • @threelonmusketeers@sh.itjust.worksOP
      link
      fedilink
      English
      2
      edit-2
      5 months ago

      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?

      • @walter_wiggles@lemmy.nz
        link
        fedilink
        15 months ago

        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.

  • @Diplomjodler@feddit.de
    cake
    link
    fedilink
    1
    edit-2
    5 months ago

    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.