Site won't load after the update
Debug mode
- [X] I have enabled debug mode
- [X] I have read checked the Common Issues page
Describe the bug
After upgrading site won't load. I had an issue where after the upgrade the was no effect, used the FAQ and ran: git fetch --all git reset --hard origin/master then I ran the upgrade again.
[laravel logs attached] snipeit laravel.log
Upgrade output:
WELCOME TO THE SNIPE-IT UPGRADER!
This script will attempt to:
- validate some very basic .env file settings
- check your PHP version and extension requirements
- check directory permissions
- do a git pull to bring you to the latest version
- run composer install to get your vendors up to date
- run migrations to get your schema up to date
- clear out old cache settings
STEP 1: Checking .env file:
- Your .env is located at /var/www/snipeit.evercompliant.com/.env
√ Your APP_KEY is not blank. √ Your APP_URL is not null or blank. It is set to http://snipeit.evercompliant.com √ Your APP_URL is set to http://snipeit.evercompliant.com and starts with the protocol (https:// or http://) √ Your APP_URL (http://snipeit.evercompliant.com) does not have a trailing slash.
STEP 2: Checking PHP requirements:
Current PHP version: (8.0.13) is at least 7.4.0 - continuing... FYI: The php.ini used by this PHP is: /etc/php/8.0/cli/php.ini
Checking Required PHP extensions...
√ bcmath is installed! √ curl is installed! √ fileinfo is installed! √ gd is installed! √ json is installed! √ ldap is installed! √ mbstring is installed! √ mysqli is installed! √ openssl is installed! √ PDO is installed! √ sodium is installed! √ tokenizer is installed! √ xml is installed! √ zip is installed!
STEP 3: Checking directory permissions:
√ /var/www/snipeit.evercompliant.com/bootstrap/cache is writable √ /var/www/snipeit.evercompliant.com/storage is writable √ /var/www/snipeit.evercompliant.com/storage/logs is writable √ /var/www/snipeit.evercompliant.com/storage/logs/laravel.log is writable √ /var/www/snipeit.evercompliant.com/storage/framework is writable √ /var/www/snipeit.evercompliant.com/storage/framework/cache is writable √ /var/www/snipeit.evercompliant.com/storage/framework/sessions is writable √ /var/www/snipeit.evercompliant.com/storage/framework/views is writable √ /var/www/snipeit.evercompliant.com/storage/app is writable √ /var/www/snipeit.evercompliant.com/storage/app/backups is writable √ /var/www/snipeit.evercompliant.com/storage/app/backup-temp is writable √ /var/www/snipeit.evercompliant.com/storage/private_uploads is writable √ /var/www/snipeit.evercompliant.com/public/uploads is writable
STEP 4: Backing up database:
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 5: Putting application into maintenance mode:
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 6: Pulling latest from Git (master branch):
Git is installed. Already on 'master' -- No local changes to save -- Your branch is up to date with 'origin/master'. -- Already up to date.
STEP 7: Cleaning up old cached files:
√ No bootstrap/cache/compiled.php, so nothing to delete. √ Deleting bootstrap/cache/services.php. It is no longer used. √ No bootstrap/cache/config.php, so nothing to delete. √ Deleting vendor/symfony/translation/TranslatorInterface.php. It is no longer used.
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 8: Updating composer dependencies: (This may take a moment.)
-- Running the app in production mode.
-- We couldn't find a local composer.phar. No worries, trying globally.
Since you are running composer globally, we won't try to update it for you.
If you run into issues with this step, try running composer self-update
before running this updater again
Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:62 Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:108 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Loading composer repositories with package information Installing dependencies from lock file PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84 Stack trace: #0 [internal function]: array_merge() #1 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array() #2 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages() #3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(742): Composer\DependencyResolver\Solver->selectAndInstall() #4 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat() #5 phar:///usr/local/bin/composer/src/Composer/Installer.php(475): Composer\DependencyResolver\Solver->solve() #6 phar:///usr/local/bin/composer/src/Composer/Installer.php(229): Composer\Installer->doInstall() #7 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(121): Composer\Installer->run() #8 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute() #9 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run() #10 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand() #11 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(258): Symfony\Component\Console\Application->doRun() #12 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun() #13 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(104): Symfony\Component\Console\Application->run() #14 phar:///usr/local/bin/composer/bin/composer(56): Composer\Console\Application->run() #15 /usr/local/bin/composer(24): require('...') #16 {main} thrown in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84 Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:62 Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:108 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Generating optimized autoload filesDeprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:321
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84 Stack trace: #0 [internal function]: array_merge() #1 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array() #2 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages() #3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(742): Composer\DependencyResolver\Solver->selectAndInstall() #4 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat() #5 phar:///usr/local/bin/composer/src/Composer/Installer.php(475): Composer\DependencyResolver\Solver->solve() #6 phar:///usr/local/bin/composer/src/Composer/Installer.php(229): Composer\Installer->doInstall() #7 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(121): Composer\Installer->run() #8 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute() #9 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run() #10 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand() #11 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(258): Symfony\Component\Console\Application->doRun() #12 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun() #13 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(104): Symfony\Component\Console\Application->run() #14 phar:///usr/local/bin/composer/bin/composer(56): Composer\Console\Application->run() #15 /usr/local/bin/composer(24): require('...') #16 {main} thrown in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84
STEP 9: Migrating database:
In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 10: Checking for OAuth keys:
√ OAuth keys detected. Skipping passport install.
STEP 11: Taking application out of maintenance mode:
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
---------------------- FINISHED! ----------------------- All done! Clear your browser cookies and re-login to use your upgraded Snipe-IT!
Reproduction steps
- have v5.3.5 installed
- run php upgrade.php
- upgrade is done and then the site won't load.
Expected behavior
Running latest version after "php upgrade.php"
Screenshots

Snipe-IT Version
5.3.5
Operating System
Ubuntu 18.04.6
Web Server
Apache
PHP Version
PHP 8.0.13
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
This is the original upgrade output (the 1st try, before running the one who broke the site) 1st upgrade run.txt
Were you upgrading from 5.3.5? DomPDF is a newer dependency I believe. All the errors are from DomPDF so you can try installing it and see if that helps: sudo apt update && sudo apt install php-dompdf
Hi @ccj9874 Thanks, I've rolled back the instance and installed dompdf but still arrived at the same end result - after the upgrade, all I see is error 500.
This is the current upgrade output:
WELCOME TO THE SNIPE-IT UPGRADER!
This script will attempt to:
- validate some very basic .env file settings
- check your PHP version and extension requirements
- check directory permissions
- do a git pull to bring you to the latest version
- run composer install to get your vendors up to date
- run migrations to get your schema up to date
- clear out old cache settings
STEP 1: Checking .env file:
- Your .env is located at /var/www/snipeit.evercompliant.com/.env
√ Your APP_KEY is not blank. √ Your APP_URL is not null or blank. It is set to http://snipeit.evercompliant.com √ Your APP_URL is set to http://snipeit.evercompliant.com and starts with the protocol (https:// or http://) √ Your APP_URL (http://snipeit.evercompliant.com) does not have a trailing slash.
STEP 2: Checking PHP requirements:
Current PHP version: (8.0.13) is at least 7.4.0 - continuing... FYI: The php.ini used by this PHP is: /etc/php/8.0/cli/php.ini
Checking Required PHP extensions...
√ bcmath is installed! √ curl is installed! √ fileinfo is installed! √ gd is installed! √ json is installed! √ ldap is installed! √ mbstring is installed! √ mysqli is installed! √ openssl is installed! √ PDO is installed! √ sodium is installed! √ tokenizer is installed! √ xml is installed! √ zip is installed!
STEP 3: Checking directory permissions:
√ /var/www/snipeit.evercompliant.com/bootstrap/cache is writable √ /var/www/snipeit.evercompliant.com/storage is writable √ /var/www/snipeit.evercompliant.com/storage/logs is writable √ /var/www/snipeit.evercompliant.com/storage/logs/laravel.log is writable √ /var/www/snipeit.evercompliant.com/storage/framework is writable √ /var/www/snipeit.evercompliant.com/storage/framework/cache is writable √ /var/www/snipeit.evercompliant.com/storage/framework/sessions is writable √ /var/www/snipeit.evercompliant.com/storage/framework/views is writable √ /var/www/snipeit.evercompliant.com/storage/app is writable √ /var/www/snipeit.evercompliant.com/storage/app/backups is writable √ /var/www/snipeit.evercompliant.com/storage/app/backup-temp is writable √ /var/www/snipeit.evercompliant.com/storage/private_uploads is writable √ /var/www/snipeit.evercompliant.com/public/uploads is writable
STEP 4: Backing up database:
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 5: Putting application into maintenance mode:
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 6: Pulling latest from Git (master branch):
Git is installed. Already on 'master' -- No local changes to save -- Your branch is up to date with 'origin/master'. -- Already up to date.
STEP 7: Cleaning up old cached files:
√ No bootstrap/cache/compiled.php, so nothing to delete. √ No bootstrap/cache/services.php, so nothing to delete. √ No bootstrap/cache/config.php, so nothing to delete. √ Deleting vendor/symfony/translation/TranslatorInterface.php. It is no longer used.
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 8: Updating composer dependencies: (This may take a moment.)
-- Running the app in production mode.
-- We couldn't find a local composer.phar. No worries, trying globally.
Since you are running composer globally, we won't try to update it for you.
If you run into issues with this step, try running composer self-update
before running this updater again
Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:62 Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:108 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Loading composer repositories with package information Installing dependencies from lock file PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84 Stack trace: #0 [internal function]: array_merge() #1 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array() #2 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages() #3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(742): Composer\DependencyResolver\Solver->selectAndInstall() #4 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat() #5 phar:///usr/local/bin/composer/src/Composer/Installer.php(475): Composer\DependencyResolver\Solver->solve() #6 phar:///usr/local/bin/composer/src/Composer/Installer.php(229): Composer\Installer->doInstall() #7 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(121): Composer\Installer->run() #8 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute() #9 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run() #10 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand() #11 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(258): Symfony\Component\Console\Application->doRun() #12 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun() #13 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(104): Symfony\Component\Console\Application->run() #14 phar:///usr/local/bin/composer/bin/composer(56): Composer\Console\Application->run() #15 /usr/local/bin/composer(24): require('...') #16 {main} thrown in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84 Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:62 Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:108 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130 Generating optimized autoload filesDeprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:321
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84 Stack trace: #0 [internal function]: array_merge() #1 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array() #2 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages() #3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(742): Composer\DependencyResolver\Solver->selectAndInstall() #4 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat() #5 phar:///usr/local/bin/composer/src/Composer/Installer.php(475): Composer\DependencyResolver\Solver->solve() #6 phar:///usr/local/bin/composer/src/Composer/Installer.php(229): Composer\Installer->doInstall() #7 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(121): Composer\Installer->run() #8 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute() #9 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run() #10 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand() #11 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(258): Symfony\Component\Console\Application->doRun() #12 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun() #13 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(104): Symfony\Component\Console\Application->run() #14 phar:///usr/local/bin/composer/bin/composer(56): Composer\Console\Application->run() #15 /usr/local/bin/composer(24): require('...') #16 {main} thrown in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84
STEP 9: Migrating database:
In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
STEP 10: Checking for OAuth keys:
√ OAuth keys detected. Skipping passport install.
STEP 11: Taking application out of maintenance mode:
-- In ProviderRepository.php line 208:
Class "Barryvdh\DomPDF\ServiceProvider" not found
---------------------- FINISHED! ----------------------- All done! Clear your browser cookies and re-login to use your upgraded Snipe-IT!
I've done some more reading, and just found out the composer also needs to be upgraded, just did that.
After the composer updated to version 2, I ran the upgrade.php once more - the server now responding, but very slowly and this is how the login screen looks like now:

Are there other dependencies I might've missed along the way?
Found the issue, it was the .env variable "APP_URL" pointing at an old DNS name.
So the bottom line for future references if needed:
- Update composer to latest version - composer self-update --stable
- Install php-dompdf - sudo apt update && sudo apt install php-dompdf
- If there's an issue pulling from git - git config --global --add safe.directory /var/www/snipeit
- Now run the upgrade.php
Thanks, Ofer.