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:
invoice-ninja-update-error-syntax-error
Any thoughts on how this can be fixed?

Thanks in advance. :+1:
Kind regards
AngryWarrior

Hi,

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
PowerQuest

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

https://invoiceninja.github.io/docs/self-host-troubleshooting/#email-not-sending

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

Kind regards
PowerQuest

Hi @hillel

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

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME="your_email_address@gmail.com"
MAIL_PASSWORD="your_password_dont_forget_the_quotes!"
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="your_email_address@gmail.com"
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:
image

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
PowerQuest

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
PowerQuest

Oops…:blush:
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
PowerQuest