Update error: FormatException: SyntaxError: Unexpected end of JSON input ⚠

Hello guys. :smiley:

So we just attempted to update from version 5.3.79 to the latest version 5.3.85 and when we run the update if fails with the message:
Any thoughts on how this can be fixed?

Thanks in advance. :+1:
Kind regards


It should help to manually copy over the latest release zip.

@david what’s the best recommendation in this case?

Oh just like last time?
Is there some current issue with the auto updater at the moment?

By the way @hillel

Have there some known issue with last version that I’m updating from (5.3.79) with emails not sending?

I’m currently having an real issue with that and I don’t know why.

I have checked with our main email server and there is not an single entry in the email server logs of either the Invoice Ninja’s server IP or the email that Invoice Ninja uses to send out invoices to clients.

I even tested and attempted to use our second fall back email server and nothing happens. Not one single log entry on that mail server eithers. I is pretty weird as it used to work in the past.

I have checked the Storage → logs → Error.log is squeaky clean with zero entries in it and then the lavavel.log has nothing that mentions emails…

When we sent test emails/invoices from a test customer to research/error search for this issue, it is confirmed by Invoice Ninja (the little popup).
So it does confirmed that it has been successfully added to the queue.

When it worked before in the past it sent the email directly… But now… nothing…

Any idea?

Kind regards

Not that I’m aware of, have you seen the info here:


Thanks for the link @hillel
I’ll check it out to se if I can find something.

Kind regards

Hi @hillel

Well I did not have the double quotes there in the env file:

MAIL_FROM_NAME="Full Name With Double Quotes" 

So I thought that might be the solution but nope.

Nothing just happens after you click “send”.
You do receive the notification as per screenshot though:

I have tried and tested with two different mail servers that we have and it makes no change. As a last resort I set up my old gmail account to send a test through Gmail (yes secure apps etc turned on), and the result comes out the same. E.g. nothing.

No entries in the logs on Invoice Ninja and no log entries on the email servers which is our own hosted email servers.

The whole thing is extremely strange. Email invoicing used to work like a Swiss clock before, but now not so much.

I’ve turned on the debug and hopefully it will yield something… :pray:
right now it seems like Invoice Ninja isn’t making any connection attempts to the email servers at all. So it feels like it is a dead beat. :skull_and_crossbones:

Kind regards

I’ve had this same issue for the last 3 releases and while I have copied over the zip each time, starting to become a hassle.

1 Like

@nickkilla @AngryWarrior

To debug this, try turning your QUEUE_CONNECTION=sync

this will force everything to run synchronously and you’ll get immediate feedback on any email errors.

Same here. I have another thread with the same issue and this wasn’t happening before (the json error, not email issues)

1 Like

@david Sorry, mine was more for the Update error Unexpected end of Json (not the email that was also discussed).

Thanks @david
I just checked out setup and it is already set to QUEUE_CONNECTION=sync

So now I have no idea of what to do becuse like I mentioned before in this thread…

So I have no log entries that displays any errors. Not even with debug enabled, (debug=true).

Kind regards

I realized that I accidently posted the solution to the email issue we have meantioned here in the wrong forum thread. But you can find the solution here :white_check_mark::

Kind regards

Hi, newbie user here and am having this issue updating from 5.3.100 to 5.5.8. Copy zip from where to where?

NVM, just answered my own question

1 Like

HI @hillel

Hmm… Ironically I have the FormatException: SyntaxError again as the system refuses to update; and I cannot remember how I solved it last time. :upside_down_face:

Any help to refresh my memory would be nice. :smirk:

Nothing in the log files recorded, not even with debugmode set to = true

Kind regards

I believe it may help to increase the PHP memory limit

Right, that is it!
Thanks for refreshing my memory @hillel :joy:

I checked and set the main php ini file in /etc/php/8.1/fpm to memory_limit 256M
also I checked the one in the root directory (which worked before), which is also set to 256M but now apache/php/Ubunto doesn’t seem to care and refuse to read from it/apply the changes.
Screenshot of php info file:

Memory limit in php.ini doesn’t change

Any idea on how fix this annoying stubbornly issue?

Thanks again! :smiley:

Kind regards

@david do you have any suggestions?

I have figured it out although it would be better if the PHP read the main php file from /etc/php/8.1/apache2 according to the php documentation. I haven’t figured that out yet.

Thanks a bunch @hillel
Kind regards

1 Like