Error when attempting update from v5.3.17 to v5.3.18

Environment:

  • Production VM
  • Debian 10 with current updates applied
  • PHP v8.0.11 (current update)
  • Apache 2 (current update)
  • Invoice Ninja configured with debugging turned on

Error Message after attempted update: FormatException: SyntaxError: Unexpected end of JSON input

Troubleshooting steps:

  1. sudo -u www-data php artisan optimize - Error thrown
    PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Foundation\Application::configureMonologUsing() in /var/www/html/invoiceninja/bootstrap/app.php:61
    Stack trace:
    #0 /var/www/html/invoiceninja/artisan(18): require_once()
    #1 {main}
    thrown in /var/www/html/invoiceninja/bootstrap/app.php on line 61

Contents of app.php line 61

$app->configureMonologUsing(function($monolog) {
if (config(‘app.log’) == ‘single’) {
$monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_pat$
$monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_pat$
$monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_pat$
}
});

Laravel Error Log

  • nothing of note

Apache 2 error log
Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Foundation\Application::configureMonologUsing() in /var/www/html/invoiceninja/bootstrap/app.php:61\nStack trace:\n#0 /var/www/html/invoiceninja/public/index.php(34): require_once()\n#1 {main}\n thrown in /var/www/html/invoiceninja/bootstrap/app.php on line 61’

Rolled back the VM before the update
Selection_314

@david any thoughts on this error?

not sure,

i’d try either composer dump or clear the content of bootstrap/cache

Update: At close of business today, took the affected system offline, shut it down (power off state) and made a backup before attempting to run the next update (v5.3.19). Updated the system to v5.3.18 (unexpected till I read there was an issue with v5.3.19 and it was pulled) with no errors from the dashboard (conventional method) and completed a basic functionality test including

  • View\create PDF from existing invoices
  • View the client portal from existing invoices
  • Create new invoice, view PDF and the client portal
  • Edit the newly created invoice, save and view the updates

No errors were encountered, and seems the issue was corrected somewhere.

Question: Would shutdown of the server (power off state, not a reboot) correct the issue or was the v5.3.18 update adjusted behind the scenes?

Thoughts: To this point in my IT career, I have not seen a cold boot correct a package update on a Linux server unless something is wrong with the hardware, such as memory corruption with non-ECC memory. The affected server is a VM and runs on enterprise class server hardware (ECC memory) with a enterprise hypervisor (Xen) and enterprise storage system (SAN based on OpenZFS). Have seen reboots correct issues with Windows based VM systems but very rarely with Linux based VMs. Checked out the BCM on the server and there are no reported issues with any of the RAM modules. How is this possible? Are there tasks that run at startup that do some house keeping?

Other Note: After completing the update to v5.3.18, there is a notice to that v5.3.19 is ready for update. I read earlier in the forum that v.5.3.19 has an issue and v5.3.20 will be issued shortly as a correction.