Error when running cli update
lue30499 opened this issue · 1 comments
lue30499 commented
Describe the Bug
Hello,
Updating from v24.10 to v24.10.2
Ubuntu 22.04.5 LTS
PHP 8.1.2-1ubuntu2.19
I run command:
cd /var/www/bookstack/
sudo -u www-data ./bookstack-system-cli update
I get the following:
WARNING: This CLI is in early alpha testing.
There's a high chance of running into bugs, and the CLI API is subject to change.
Checking system requirements...
Checking local Git repository is active...
Checking composer exists...
Fetching latest code via Git...
Installing PHP dependencies via composer...
Running database migrations...
PHP Notice: include(): zlib: data error in phar:///var/www/bookstack/bookstack-system-cli/vendor/composer/ClassLoader.php on line 582
PHP Warning: include(phar:///var/www/bookstack/bookstack-system-cli/vendor/composer/../../src/Services/ArtisanRunner.php): Failed to open stream: phar error: internal corruption of phar "/var/www/bookstack/bookstack-system-cli" (actual filesize mismatch on file "src/Services/ArtisanRunner.php") in phar:///var/www/bookstack/bookstack-system-cli/vendor/composer/ClassLoader.php on line 582
PHP Warning: include(): Failed opening 'phar:///var/www/bookstack/bookstack-system-cli/vendor/composer/../../src/Services/ArtisanRunner.php' for inclusion (include_path='phar:///var/www/bookstack/bookstack-system-cli:.:/usr/share/php') in phar:///var/www/bookstack/bookstack-system-cli/vendor/composer/ClassLoader.php on line 582
PHP Fatal error: Uncaught Error: Class "Cli\Services\ArtisanRunner" not found in phar:///var/www/bookstack/bookstack-system-cli/src/Commands/UpdateCommand.php:52
Stack trace:
#0 phar:///var/www/bookstack/bookstack-system-cli/vendor/symfony/console/Command/Command.php(291): Cli\Commands\UpdateCommand->execute()
#1 phar:///var/www/bookstack/bookstack-system-cli/vendor/symfony/console/Application.php(1014): Symfony\Component\Console\Command\Command->run()
#2 phar:///var/www/bookstack/bookstack-system-cli/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#3 phar:///var/www/bookstack/bookstack-system-cli/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#4 phar:///var/www/bookstack/bookstack-system-cli/run.php(31): Symfony\Component\Console\Application->run()
#5 /var/www/bookstack/bookstack-system-cli(10): include('...')
#6 {main}
thrown in phar:///var/www/bookstack/bookstack-system-cli/src/Commands/UpdateCommand.php on line 52
If I run the command again, I get:
WARNING: This CLI is in early alpha testing.
There's a high chance of running into bugs, and the CLI API is subject to change.
Checking system requirements...
Checking local Git repository is active...
Checking composer exists...
Fetching latest code via Git...
Installing PHP dependencies via composer...
Running database migrations...
Clearing app caches...
Your BookStack instance at [/var/www/bookstack] has been updated!
Not sure why I need to run the command twice...
It seems to be updated. The new version is reflected in the Settings page.
Regards,
Lue
Steps to Reproduce
At least for my system, which was installed a few years ago with the Ubuntu install script and kept up-to-date:
cd /var/www/bookstack/
sudo -u www-data ./bookstack-system-cli update
- Witness error
sudo -u www-data ./bookstack-system-cli update
- Witness no error and successful upgrade.
Expected Behaviour
Run once to update
Screenshots or Additional Context
No response
Browser Details
Chrome 131.0.6778.86 (but don't believe to be a browser issue)
Exact BookStack Version
v24.10 to v24.10.2