Closed HujinoKun closed 3 months ago
Describe the bug
I'm facing exactly the same issue when trying to upgrade from 4.15.1 to 5.0.0. The issue was already present when upgrading from 4.15.1 to 4.16.0, but unfortunately, I had to time to check more at that time.
Context
Logs
Info: Now upgrading matomo...
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for matomo...
Info: Declaring files to be backed up...
Info: Backing up the MySQL database...
Info: Backup script completed for matomo. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files...
Info: The archive will contain about 163.6MB of data.
Success! Backup created: matomo-pre-upgrade2
Success! Backup deleted: matomo-pre-upgrade1
Info: Updating sources...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating permissions...
Info: Updating apt...
Info: Updating database...
Info: [++++++++++..........] > Upgrading source files...
Warning: PHP Fatal error: Cannot override final method Piwik\Plugin\ConsoleCommand::execute() in /var/www/matomo/plugins/CoreConsole/Commands/GenerateAngularComponent.php on line 27
Error: Could not upgrade matomo: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'matomo' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20231219-224006-app_upgrade-matomo' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + ynh_secure_remove --file=/var/cache/yunohost/download/matomo/main
Info: DEBUG - + '[' -d /var/cache/yunohost/app_tmp_work_dirs/app_xik073y7/sources/patches/ ']'
Info: DEBUG - + test -e /var/cache/yunohost/app_tmp_work_dirs/app_xik073y7/sources/extra_files/main
Info: DEBUG - + '[' -n config/config.ini.php ']'
Info: DEBUG - + local keep_dir=/var/cache/yunohost/files_to_keep_during_setup_source/matomo
Info: DEBUG - + for stuff_to_keep in $keep
Info: DEBUG - + '[' -e /var/cache/yunohost/files_to_keep_during_setup_source/matomo/config/config.ini.php ']'
Info: DEBUG - ++ dirname /var/www/matomo/config/config.ini.php
Info: DEBUG - + mkdir --parents /var/www/matomo/config
Info: DEBUG - + cp --archive /var/cache/yunohost/files_to_keep_during_setup_source/matomo/config/config.ini.php /var/www/matomo/config/config.ini.php
Info: DEBUG - + rm -rf /var/cache/yunohost/files_to_keep_during_setup_source/
Info: DEBUG - + chown -R matomo:www-data /var/www/matomo
Info: DEBUG - + ynh_exec_as matomo php8.2 /var/www/matomo/console core:update -n
Info: DEBUG - + local user=matomo
Info: DEBUG - + shift 1
Info: DEBUG - ++ whoami
Info: DEBUG - + [[ matomo = root ]]
Info: DEBUG - + sudo -u matomo php8.2 /var/www/matomo/console core:update -n
Info: WARNING - PHP Fatal error: Cannot override final method Piwik\Plugin\ConsoleCommand::execute() in /var/www/matomo/plugins/CoreConsole/Commands/GenerateAngularComponent.php on line 27
Info: DEBUG - + ynh_exit_properly
Warning: Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
Info: Removing matomo...
Info: [++++++++++..........] > Removing NGINX web server configuration...
Info: [####################] > Removal of matomo completed
Info: Deprovisioning database...
Info: Deprovisioning apt...
Info: Deprovisioning permissions...
Info: Deprovisioning install_dir...
Info: Deprovisioning system_user...
Info: Deprovisioning sources...
Success! matomo uninstalled
Warning: YunoHost is already installed
Info: Preparing archive for restoration...
Info: Restoring matomo...
Info: Provisioning sources...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning permissions...
Info: Provisioning apt...
Info: Provisioning database...
Info: [+++++++.............] > Restoring the app main directory...
Info: [#######+++..........] > Restoring the MySQL database...
Info: [##########+++++.....] > Restoring the PHP-FPM configuration...
Info: [###############++...] > Reloading NGINX web server and PHP-FPM...
Info: [####################] > Restoration completed for matomo
Success! Restoration completed
Error: The operation 'Upgrade the 'matomo' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20231219-224006-app_upgrade-matomo' to get help
Thanks for the help
same here
Getting the same error message when trying to upgrade from 4.16.0 to 5.0.0 on yunohost 11.2.8.2
Same here. Logs: https://paste.yunohost.org/raw/uhoradiwis
Hi, I experienced that same issue when trying to update from 4.15.1~ynh1
to 5.0.0~ynh1
, log is @ https://paste.yunohost.org/raw/hapobuqoza on Yunohost 11.2.8.2
It's probably not a YNH specific issue though, plugins/CoreConsole/Commands/GenerateAngularComponent.php doesn't even exist anymore, so we probably should put it out (or make sure it's not in some kind of cache…)
Same problem here, the same error as for @HujinoKun. Thx @gilou for hopefully fixing it. May @ericgaspar quickly include your commit!
I think I'm wrong about how --full-replace
works, I have 0 knowledge regarding ynh apps… I'll try later…
it is --full_replace=
, with underscore
please test to update from the testing branch:
sudo yunohost app upgrade matomo -u https://github.com/YunoHost-Apps/matomo_ynh/tree/testing --force
@ericgaspar it runs as smoothly as possible. Nice! 😁
I tried to upgrade to 5ynh2, but upgrade went unsuccessfull. See log: https://paste.yunohost.org/raw/jejoxiduhu
related info: https://forum.matomo.org/t/problems-updating-from-4-16-0-to-5-0-0/54602/2 https://github.com/matomo-org/matomo/issues/19886
@jookk crazy, the error looks the same as before...
Mine first upgrade related to this: https://paste.yunohost.org/raw/jejoxiduhu
2023-12-20 06:46:51,308: WARNING - PHP Fatal error: Cannot override final method Piwik\Plugin\ConsoleCommand::execute() in /var/www/matomo/plugins/CoreConsole/Commands/GenerateAngularComponent.php on line 27
it is
--full_replace=
, with underscoreplease test to update from the testing branch:
sudo yunohost app upgrade matomo -u https://github.com/YunoHost-Apps/matomo_ynh/tree/testing --force
@jookk, although you used this to update? For me it fixed exactly that error.
Firstly I updated via yunohost admin (ynh1 upgrade) Secondly I used web admiin to upgrade to ynh2 As last I tried to use update from testing branch, as you have mentioned. Weird alltrough
Hmm… it seems that -n fore core:update, though still documented as -n, --no-interaction Do not ask any interactive question
in fact triggers a dry run…
*** Note: this is a Dry Run ***
[...]
*** End of Dry Run ***
Database upgrade not executed.
And so now, there is a -q parameter to make it quiet…
But that … doesn't work either… So I'd say there is something fishy in core:update … -q --ignore-warn doesn't do anything (not that it's a good idea anyway…), -n seems to not do anything (dry run ?), and if I use no params, I need to say yes to the prompt, and I'd rather not force that answer… blah…
I upgraded to 5.0 from matomo web ui. All went fine without issue. Only I had to activate login plugin at config. So, now I have working v5, but I didnt upgraded via ynh admin. Edit: I upgraded via yunohost admin to v5 and upgrade went fine.
I bypassed the issue and ran the core:update manually, so don't have a real use-case anymore to fix it, but I may try later this week with a dev env, see if I can reproduce, maybe fix it…
Hello,
Any update ?
Describe the bug
Upgrading to matomo 5.0 from 4.16.0 failed.
Context
Steps to reproduce
Expected behavior
Upgrading successfully.
Logs
Command :
sudo yunohost app upgrade matomo
Debug URL : https://paste.yunohost.org/raw/eqetokeyok