Not sending recuring invoices

Hi,

My self hosted Invoice Ninja isn’t sending recurring invoices.

Here is what I get when I run the cron: php /path/ninja/artisan ninja:send-recurring

In Invoice.php line 400:
Attempt to read property “id” on null

Looks like the problem is on app/Models/Invoice.php, which have the following function:
399 if (! Storage::exists($this->client->invoice_filepath().$this->numberFormatter().’.pdf’)) {
400 event(new InvoiceWasUpdated($this, $this->company, Ninja::eventVars(auth()->user()->id)));
401 CreateEntityPdf::dispatchNow($invitation);
402 }

Any ideas on how to solve it? I have no problem sending e-mails from the Invoices. The problem is only in the recurring.

I am not sure if it is related, but when I run: /usr/bin/php /var/www/ninja/artisan ninja:check-data
I get
2021-04-26 03:50:33 2021-04-26 03:50:33 Running CheckData…
2021-04-26 03:50:34 0 clients with incorrect balances
2021-04-26 03:50:34 0 clients with incorrect invoice balances
2021-04-26 03:50:35 0 clients with incorrect paid to dates
2021-04-26 03:50:35 0 clients with incorrect client balances
2021-04-26 03:50:35 0 contacts without a contact_key
2021-04-26 03:50:35 0 clients without any contacts
2021-04-26 03:50:35 0 clients without a single primary contact
2021-04-26 03:50:35 3 activities records with incorrect client company id
2021-04-26 03:50:35 3 invoices records with incorrect client company id
2021-04-26 03:50:35 0 users with duplicate oauth ids
2021-04-26 03:50:35 Done: FAILURE

Any help will be very much appreciated.

Hi,

Thanks for reporting this!

@david, any thoughts?

I had figured out it was looking for a invoice path but the pdf wasn’t there.

Anyway, I have upgraded from 5.1.46 to 5.1.49 and this issue is gone.

The /usr/bin/php /var/www/ninja/artisan ninja:check-data persists, but for that is better to open a new topic.

Thank you

@Danilo

Which version are you on?

Since it is for a production environment, I had assumed the most up-pt-date and stable one was was on the 5.1.46, which is the one available at https://www.invoiceninja.org/

The problem has stopped when I upgraded for the stable version from GitHub. I am not on 5.1.53-C47.

Sorry, I should have included the version in the initial post.

Thank you for your attention on this matter. If that is okay I will be opening other threads on new issues I have already found.

Thank you.

@Danilo

Great to hear, i believe the issue was resolved in .53.