When should new recurring invoices go out?

Hi,

I’ve used recurring invoices before - but for some reason the new invoices don’t seem to be going out. I have this cron:

cd /home/ultranerds/web/mysystem.co.uk && php8.1 artisan schedule:run

This runs:

INFO No scheduled commands are ready to run.

And this is what I have set for the recurring invoice:

Yet nothing is going out. It used to work (as recent as a client last month), so I’m not sure what has changed. I have checked, and the server date is:

Thu Jun 13 07:09:40 AM UTC 2024

(the next date shows as today @ 7AM)

Any suggestions are much appreciated!

Cheers

Andy

Hi,

If you’re using v5.9.x you’ll need to change to php8.2

Thanks for the reply. I wasn’t on the latest version. I’m trying to upgrade, but I’m having issues

  1. I downloaded the ZIP file, and uploaded (overwrote) the files on the server
  2. I tried running https://myurl.co.uk/update?secret=secret - but it gives a server error
  3. I tried running:
sudo -u ultranerds php8.2  artisan schedule:run

   Error

  Call to undefined method Livewire\LivewireManager::setUpdateRoute()

  at vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:338
    334▕         if (! $instance) {
    335▕             throw new RuntimeException('A facade root has not been set.');
    336▕         }
    337▕
  ➜ 338▕         return $instance->$method(...$args);
    339▕     }
    340▕ }
    341▕

  1   app/Providers/AppServiceProvider.php:78
      Illuminate\Support\Facades\Facade::__callStatic()

      +7 vendor frames
  9   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()

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

Ah, that’d be why I wasn’t seeing anything in the nginx logs - there aren’t in there :slight_smile: So the storage log has:

[2024-06-13 08:20:33] production.ERROR: Call to undefined method Livewire\LivewireManager::setUpdateRoute() {"exception":"[object] (Error(code: 0): Call to undefined method Livewire\\LivewireManager::setUpdateRoute() at /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:338)

[stacktrace]

#0 /home/ultranerds/web/foobar.co.uk/app/Providers/AppServiceProvider.php(78): Illuminate\\Support\\Facades\\Facade::__callStatic()

#1 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Providers\\AppServiceProvider->boot()

#2 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()

#3 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()

#4 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()

#5 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call()

#6 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(929): Illuminate\\Container\\Container->call()

#7 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): Illuminate\\Foundation\\Application->bootProvider()

#8 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}()

#9 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): array_walk()

#10 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()

#11 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(242): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap()

#12 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Foundation\\Application->bootstrapWith()

#13 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(160): Illuminate\\Foundation\\Http\\Kernel->bootstrap()

#14 /home/ultranerds/web/foobar.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()

#15 /home/ultranerds/web/foobar.co.uk/public_html/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle()

#16 {main}

"}

@david do you have any ideas?

I’ve reverted back to my backup, and it works again (on 5.6), but when I try and upgrade I get:

"PHP message: PHP Warning: require(): open_basedir restriction in effect. File(/home/ultranerds/web/foobar.co.uk/vendor/autoload.php) is not within the allowed path(s): (/home/ultranerds/.composer:/home/ultranerds/web/foobar.co.uk/public_html:/home/ultranerds/web/foobar.co.uk/private:/home/ultranerds/web/foobar.co.uk/public_shtml:/home/ultranerds/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in /home/ultranerds/web/foobar.co.uk/public_html/index.php on line 26; PHP message: PHP Warning: require(/home/ultranerds/web/foobar.co.uk/vendor/autoload.php): Failed to open stream: Operation not permitted in /home/ultranerds/web/foobar.co.uk/public_html/index.php on line 26; PHP message: PHP Fatal error: Uncaught Error: Failed opening required ‘/home/ultranerds/web/foobar.co.uk/public_html/…/vendor/autoload.php’ (include_path=‘.:/usr/share/php’) in /home/ultranerds/web/foobar.co.uk/public_html/index.php:26
Stack trace:

I fixed this originally when manually uploading the files by editing app/Utils/SystemHealth.php , and commenting out:

        // foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
        //     if (strpos($file->getPathname(), '.git') !== false) {
        //         continue;
        //     }

        //     //nlog($file->getPathname());

        //     if ($file->isFile() && ! $file->isWritable()) {
        //         return "{$file->getFileName()} is not writable";
        //     }
        // }

That stops that error - but comes up again when you try and do an automatic update (as I guess its downloading the new code, then trying to run it, which then gives the open_basedir error again)

The issue I think comes from it looking in /home/ultranerds/web/foobar.co.uk/logs, and finding that the nginx logs are owned by root - which is normal. Really it should check for fileownership :wink: (it seems like fileowner would do this trick - no?)

Anyway - I still can’t get it going :confused: (getting the same error message as before)

I managed to get it updated :slight_smile:

  1. I had to delete the symlinked log files (as they were pointing to root owner log files)
  2. I had to run a chown on the folder, as there were a few randomly root-owned files in there

Unfortunatly though, the recurring invoices don’t want to go out still. I’ve made sure they are all set to go out:

But even when I manually run:

cd /home/ultranerds/web/invoicesnew.ultranerds.co.uk && php8.2 artisan schedule:run

I just get:

INFO No scheduled commands are ready to run.

Am I missing something? (the one in red should have gone out on the 29th of last month, as you can see, and the other 2 , today)

UPDATE Those 3 invoices just went out ok. Must have needed to wait for the cron to run at a certain point. Hopefully it carries on ticking over happily like it used to now =)

Cheers

Andy