Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate ExtraTools failing on latest version of matomo 3.13.4 with Error: Class 'Piwik\Plugin\Manager' not found #18

Closed
r621549 opened this issue Mar 27, 2020 · 10 comments

Comments

@r621549
Copy link

r621549 commented Mar 27, 2020

ExtraTools are failing on latest version of matomo.

when trying to execute the command
./console plugin:activate ExtraTools
Error :
: Uncaught Error: Class 'Piwik\Plugin\Manager' not found in /var/www/html/analytics/core/bootstrap.php:46
Stack trace:
#0 /var/www/html/analytics/index.php(21): require_once()
#1 {main}

@mikkeschiren
Copy link
Contributor

mikkeschiren commented Mar 30, 2020

It looks like you are missing some files from Matomo?

@r621549
Copy link
Author

r621549 commented Mar 30, 2020

It looks like you are missing some files from Matomo?

@mikkeschiren Thanks for the reply
I took the latest version of matomo and try to install matomo using ExtraTools, manually from UI is it is working fine.

Followed this link https://plugins.matomo.org/ExtraTools

bash-5.0# wget https://builds.matomo.org/matomo.zip
--2020-03-27 20:07:29-- https://builds.matomo.org/matomo.zip
Resolving builds.matomo.org... 185.31.40.177, 2a00:b6e0:1:200:177::1
Connecting to builds.matomo.org|185.31.40.177|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19375918 (18M) [application/zip]
Saving to: 'matomo.zip'

matomo.zip 100%[=========================================================================>] 18.48M 3.63MB/s in 7.8s

2020-03-27 20:07:38 (2.36 MB/s) - 'matomo.zip' saved [19375918/19375918]

bash-5.0# unzip -o matomo.zip

bash-5.0# ls
How to install Matomo.html matomo matomo.zip
bash-5.0# rm matomo.zip
bash-5.0# ls
How to install Matomo.html matomo
bash-5.0# unzip ../ExtraTools.zip matomo/plugins/
Archive: ../ExtraTools.zip
bash-5.0# cd matomo/
bash-5.0# composer require symfony/yaml:~2.6.0
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 1 removal

Removing leafo/lessphp (dev-php74-compat)
Installing symfony/yaml (v2.6.13): Loading from cache
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package piwik/cache is abandoned, you should avoid using it. Use matomo/cache instead.
Package piwik/decompress is abandoned, you should avoid using it. Use matomo/decompress instead.
Package piwik/ini is abandoned, you should avoid using it. Use matomo/ini instead.
Package piwik/network is abandoned, you should avoid using it. Use matomo/network instead.
Package piwik/piwik-php-tracker is abandoned, you should avoid using it. Use matomo/matomo-php-tracker instead.
Writing lock file
Generating autoload files
bash-5.0# composer require symfony/process:^3.4
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Installing symfony/process (v3.4.38): Loading from cache
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package piwik/cache is abandoned, you should avoid using it. Use matomo/cache instead.
Package piwik/decompress is abandoned, you should avoid using it. Use matomo/decompress instead.
Package piwik/ini is abandoned, you should avoid using it. Use matomo/ini instead.
Package piwik/network is abandoned, you should avoid using it. Use matomo/network instead.
Package piwik/piwik-php-tracker is abandoned, you should avoid using it. Use matomo/matomo-php-tracker instead.
Writing lock file
Generating autoload files
bash-5.0# ./console plugin:activate ExtraTools
[27-Mar-2020 20:15:57 UTC] PHP Fatal error: Uncaught Error: Class 'Piwik\Plugin\Manager' not found in /var/www/html/install/install_matomo/matomo/core/bootstrap.php:46
Stack trace:
#0 /var/www/html/install/install_matomo/matomo/console(18): require_once()
#1 {main}
thrown in /var/www/html/install/install_matomo/matomo/core/bootstrap.php on line 46
Fatal error: Uncaught Error: Class 'Piwik\Plugin\Manager' not found in /var/www/html/install/install_matomo/matomo/core/bootstrap.php:46
Stack trace:
#0 /var/www/html/install/install_matomo/matomo/console(18): require_once()
#1 {main}
thrown in /var/www/html/install/install_matomo/matomo/core/bootstrap.php on line 46

@mikkeschiren
Copy link
Contributor

mikkeschiren commented Mar 30, 2020

Do you have opcache for cli activated? I guess something like that could happen if so. Piwik\Plugin\Manager use a core class, so if everything is ok otherwise it looks like some problem that could be in the php cli environment.

@mikkeschiren
Copy link
Contributor

And follow up question - if you activate some other plugin that is not active, what do you get then?

@r621549
Copy link
Author

r621549 commented Mar 30, 2020

And follow up question - if you activate some other plugin that is not active, what do you get then?

I don't need any other plugins so do not have that step , but let me try one now.

@mikkeschiren
Copy link
Contributor

The path looks a bit fishy:

/var/www/html/install/install_matomo/matomo

Is whole Matomo code base in that path?

@r621549
Copy link
Author

r621549 commented Mar 30, 2020

@mikkeschiren
wget https://builds.matomo.org/matomo.zip
unzip -o matomo.zip
unzip ../HashUserId.zip -d matomo/plugins
bash-5.0# ./console plugin:activate HashUserId

The configuration file {/var/www/html/install/matomo_try_3/matomo/config/config.ini.php} has not been found or could not be read.
» Please check that /var/www/html/install/matomo_try_3/matomo/config/config.ini.php is readable by the user 'root'.

INFO [2020-03-30 20:15:37] 486 Plugin HashUserId activated
Activated plugin HashUserId

I download the latest matomo version , then loaded plugin and active , it worked fine

@r621549
Copy link
Author

r621549 commented Mar 30, 2020

when tried to active ExtraTools without
composer require symfony/yaml:~2.6.0 (moves it from dev)
composer require symfony/process:^3.4
it activated successfully but failed at install

bash-5.0# ./console matomo:install --db-username=dbuser --db-pass=password --db-host=benefitpro-matomo-mysql --db-name="matomo" --db-prefix="piwik_"
Are you really sure you would like to install Matomo - if you have an installation already, it will be wiped? yes
ERROR [2020-03-30 20:23:35] 492 Uncaught exception: Error: Class 'Symfony\Component\Process\Process' not found in /var/www/html/install/matomo_try_3/matomo/plugins/ExtraTools/Lib/Drop.php:32
Stack trace:
#0 /var/www/html/install/matomo_try_3/matomo/plugins/ExtraTools/Commands/InstallMatomo.php(223): Piwik\Plugins\ExtraTools\Lib\Drop->execute()
#1 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\ExtraTools\Commands\InstallMatomo->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\ExtraTools\Commands\InstallMatomo), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/install/matomo_try_3/matomo/core/Console.php(140): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/install/matomo_try_3/matomo/core/Access.php(644): Piwik\Console->Piwik{closure}()
#7 /var/www/html/install/matomo_try_3/matomo/core/Console.php(141): Piwik\Access::doAsSuperUser(Object(Closure))
#8 /var/www/html/install/matomo_try_3/matomo/core/Console.php(93): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/install/matomo_try_3/matomo/console(32): Symfony\Component\Console\Application->run()
#11 {main}
Uncaught exception: Class 'Symfony\Component\Process\Process' not found
in /var/www/html/install/matomo_try_3/matomo/plugins/ExtraTools/Lib/Drop.php line 32
#0 /var/www/html/install/matomo_try_3/matomo/plugins/ExtraTools/Commands/InstallMatomo.php(223): Piwik\Plugins\ExtraTools\Lib\Drop->execute()
#1 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\ExtraTools\Commands\InstallMatomo->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\ExtraTools\Commands\InstallMatomo), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/install/matomo_try_3/matomo/core/Console.php(140): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/install/matomo_try_3/matomo/core/Access.php(644): Piwik\Console->Piwik{closure}()
#7 /var/www/html/install/matomo_try_3/matomo/core/Console.php(141): Piwik\Access::doAsSuperUser(Object(Closure))
#8 /var/www/html/install/matomo_try_3/matomo/core/Console.php(93): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/install/matomo_try_3/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/install/matomo_try_3/matomo/console(32): Symfony\Component\Console\Application->run()
#11 {main}

@mikkeschiren
Copy link
Contributor

Aha, you using matomo from https://builds.matomo.org/matomo.zip.

Try something like this:

wget https://builds.matomo.org/matomo.zip
unzip matomo.zip
cd matomo
wget https://raw.githubusercontent.com/matomo-org/matomo/3.x-dev/composer.lock
wget https://raw.githubusercontent.com/matomo-org/matomo/3.x-dev/composer.json
composer install --no-dev
composer require symfony/yaml:~2.6.0
composer require symfony/process:^3.4

Dowload ExtraTools to plugins directory
And then activate ExtraTools.

@r621549
Copy link
Author

r621549 commented Mar 31, 2020

Thank you so much for all help, it got resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants