Error 500 updating the app

Hi,
I have a self hosted 5.10.10 using php 8.3 .
From version 5.10.10 I cannot update anymore to any version. Everytime I receive error 500.

Lavarel log:

production.ERROR: unable to decompress gzipped phar archive ".../storage/app/invoiceninja.tar" to temporary file {"userId":1,"exception":"[object] (UnexpectedValueException(code: 0): unable to decompress gzipped phar archive \".../storage/app/invoiceninja.tar\" to temporary file at .../app/Http/Controllers/SelfUpdateController.php:89)
[stacktrace]
#0 .../app/Http/Controllers/SelfUpdateController.php(89): PharData->__construct()

Any hint?

It looks like the update package is not successfully being decompressed. According to the PHP manual it may be related to a setting in your php.ini file. But I’m not an expert in PHP.

You could also try updating manually.

Tried manual update with a tar archive as provided at Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja but still have error 500 running https://url.com/update?secret=*****


production.ERROR: Class "InvoiceNinja\Inspector\InspectorServiceProvider" not found {"exception":"[object] (Error(code: 0): Class \"InvoiceNinja\\Inspector\\InspectorServiceProvider\" not found at /.../vendor/laravel/framework/src/Illuminate/Foundation/Application.php:933)

Something is missing.

You could try one of the following methods to update:

or

The manual update unveiled the problem.

production.ERROR: Class "InvoiceNinja\Inspector\InspectorServiceProvider" not found {"exception":"[object] (Error(code: 0): Class \"InvoiceNinja\\Inspector\\InspectorServiceProvider\" not found at /.../vendor/laravel/framework/src/Illuminate/Foundation/Application.php:933)

to solve it , move to /bootstrap/cache and delete content.
After it run php artisan clear-compiled
If the result is INFO Compiled services and packages files removed successfully. you are good to go.

Now the app is updated.
Thanks for the collaboration.

2 Likes

New update and this error stays.

@david any hints?

Until version 5.10.10, I updated everything through app, now I have to go for a manual update to make it works.

1 Like

@david @nort i tried sudo -u www-data composer update and got

Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884
Loading composer repositories with package information GitHub API limit (0 calls/hr) is exhausted, could not fetch https://api.github.com/repos/turbo124/snappdf/commits/1afb8d951461375eb334bb54e211b7e5724c9d10. Create a GitHub OAuth token to go over the API rate limit. You can also wait until ? for the rate limit to reset.

I created the token and continued.
The process output some warnings

68 package suggestions were added by new dependencies, use composer suggest to see details.
Generating optimized autoload files
Class Unirest\Response located in ./vendor/apimatic/unirest-php/src/Unirest/Response.php does not comply with psr-4 autoloading standard. Skipping.
Class Unirest\Method located in ./vendor/apimatic/unirest-php/src/Unirest/Method.php does not comply with psr-4 autoloading standard. Skipping.
Class Unirest\Request located in ./vendor/apimatic/unirest-php/src/Unirest/Request.php does not comply with psr-4 autoloading standard. Skipping.
Class Unirest\Exception located in ./vendor/apimatic/unirest-php/src/Unirest/Exception.php does not comply with psr-4 autoloading standard. Skipping.
Class Unirest\OverrideRetry located in ./vendor/apimatic/unirest-php/src/Unirest/OverrideRetry.php does not comply with psr-4 autoloading standard. Skipping.
Class Unirest\Request\Body located in ./vendor/apimatic/unirest-php/src/Unirest/Request/Body.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Integration\Einvoice\FACT1Test located in ./tests/Integration/Einvoice/Fact1Test.php does not comply with psr-4 autoloading standard. Skipping.
Class CleverIt\UBL\Invoice\Codes\V21\PaymentCode located in ./vendor/invoiceninja/ubl_invoice/src/Codes/V21/PaymeanMeansCode.php does not comply with psr-4 autoloading standard. Skipping.
Warning: Ambiguous class resolution, “League\Flysystem\Local\FallbackMimeTypeDetector” was found 2x: in “/xxx/vendor/league/flysystem-local/FallbackMimeTypeDetector.php” and “/xxx/public_html/vendor/league/flysystem/src/Local/FallbackMimeTypeDetector.php”, the first will be used.
Warning: Ambiguous class resolution, “League\Flysystem\Local\LocalFilesystemAdapter” was found 2x: in “/xxx/public_html/vendor/league/flysystem-local/LocalFilesystemAdapter.php” and “/xxx/vendor/league/flysystem/src/Local/LocalFilesystemAdapter.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\DateTimeType” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeType.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\CarbonType” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonType.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\DateTimeImmutableType” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\CarbonTypeConverter” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonTypeConverter.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\CarbonDoctrineType” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\CarbonImmutableType” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php”, the first will be used.
Warning: Ambiguous class resolution, “Carbon\Doctrine\DateTimeDefaultPrecision” was found 2x: in “/xxx/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php” and “/xxx/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php”, the first will be used.

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

and completed

INFO Discovering packages.

barryvdh/laravel-debugbar … DONE
barryvdh/laravel-ide-helper … DONE
imdhemy/laravel-purchases … DONE
intervention/image … DONE
invoiceninja/inspector … DONE
laracasts/cypress … DONE
laravel/slack-notification-channel … DONE
laravel/socialite … DONE
laravel/tinker … DONE
laravel/ui … DONE
livewire/livewire … DONE
nesbot/carbon … DONE
nunomaduro/collision … DONE
nunomaduro/termwind … DONE
nwidart/laravel-modules … DONE
sentry/sentry-laravel … DONE
socialiteproviders/manager … DONE
spatie/laravel-ignition … DONE
turbo124/beacon … DONE

The apache log has a single error
“POST /api/v1/self-update? HTTP/1.1” 500 707 “-” “Dart/3.3 (dart:io)”

Anyway I can normally use the application.

Maybe some dirty file?

You should never run composer update, you only want to use composer install.

1 Like

The composer install had totally the same result.

What error are you seeing?

production.ERROR: unable to decompress gzipped phar archive “…/storage/app/invoiceninja.tar” to temporary file {“userId”:1,“exception”:"[object] (UnexpectedValueException(code: 0): unable to decompress gzipped phar archive "…/storage/app/invoiceninja.tar" to temporary file at …/app/Http/Controllers/SelfUpdateController.php:89)
[stacktrace]
#0 …/app/Http/Controllers/SelfUpdateController.php(89): PharData->__construct()

You may want to try manually updating the app

Yes, I am updating manually every single time after 5.10.10. The automatica update jfrom the app just does not work anymore for me.

Sorry for the trouble, you may want to create a discussion on GitHub