Status 500 Error when trying to download edited quote

Hi,

My application has always been working fine, but quite recently I started to receive Status 500 “Internal Server Error” responses from my API calls.

When I create a new quote and download the PDF there is no problem. But when I update the quote and redownload the PDF I get the above mentioned error message.

Can you please advise?

Kind regards,
Tino

Hi,

Are there any details about the 500 in storage/logs?

Where can I find that if you don’t mind me asking?

Regards,
Tino

There folder storage/logs is in the root folder of the app code

Hi Hillel,

Thank you for your quick reply.

The scenario to recreate is the following:

  1. Create a quote.
  2. Download pdf => no problem
  3. Update the client.
  4. Update the quote.

After this sequence the changes have been made on the portal.
However when we then download the quote’s pdf we get the following error as found in the “storage/logs”:

2022-05-19 05:54:17] production.ERROR: Trying to get property ‘contact’ of non-object {“userId”:1,“exception”:“[object] (ErrorException(code: 0): Trying to get property ‘contact’ of non-object at /var/www/invoice-ninja/app/Models/Client.php:752)
[stacktrace]

Kind regards,
Tino

Thanks for details!

@david any thoughts?

This is strange, Line 752 on Client.php does not exist in my version of Client.php this file only has 690 lines.

Which version are you on @Tino

@david

We are currently on v5.3.23-C59

regards,
Tino

@Tino

I would suggest updating the app in the first instance.

@david

Will do and keep you posted on the outcome.
Hopefully this solves our issue.

regards,
Tino

1 Like