@47k opened this Issue on July 21st 2020

Hey guys

Today I upgraded via the on click updater from 3.xx (I think it was 3.12 or 3.13) to 3.14 and I got this issue directly after I clicked the button:

Class 'Piwik\Plugins\UsersManager\Model' not found

And this when I try it via CLI:

WARNING [2020-07-21 09:57:51] 3635 /var/www/matomo/vendor/composer/ClassLoader.php(444): Warning - include(/var/www/matomo/vendor/composer/../../plugins/UsersManager/Model.php): failed to open stream: No such file or directory - Matomo 3.14.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
WARNING [2020-07-21 09:57:51] 3635 /var/www/matomo/vendor/composer/ClassLoader.php(444): Warning - include(): Failed opening '/var/www/matomo/vendor/composer/../../plugins/UsersManager/Model.php' for inclusion (include_path='/var/www/matomo/vendor/pear/pear_exception:/var/www/matomo/vendor/pear/console_getopt:/var/www/matomo/vendor/pear/pear-core-minimal/src:/var/www/matomo/vendor/pear/archive_tar:.:/usr/share/php') - Matomo 3.14.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
ERROR [2020-07-21 09:57:51] 3635 Uncaught exception: Error: Class 'Piwik\Plugins\UsersManager\Model' not found in /var/www/matomo/plugins/Login/Auth.php:35
Stack trace:
#0 /var/www/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(140): Piwik\Plugins\Login\Auth->construct()
#1 /var/www/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(70): DI\Definition\Resolver\ObjectCreator->createInstance()
#2 /var/www/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ObjectCreator->resolve()
#3 /var/www/matomo/vendor/php-di/php-di/src/DI/Container.php(303): DI\Definition\Resolver\ResolverDispatcher->resolve()
#4 /var/www/matomo/vendor/php-di/php-di/src/DI/Container.php(131): DI\Container->resolveDefinition()
#5 /var/www/matomo/core/Container/StaticContainer.php(80): DI\Container->get()
#6 /var/www/matomo/core/Piwik.php(562): Piwik\Container\StaticContainer::get()
#7 /var/www/matomo/plugins/Login/Login.php(63): Piwik\Piwik::getLoginPluginName()
#8 /var/www/matomo/core/Plugin.php(232): Piwik\Plugins\Login\Login->registerEvents()
#9 /var/www/matomo/core/EventDispatcher.php(110): Piwik\Plugin->getListHooksRegistered()
#10 /var/www/matomo/core/Piwik.php(775): Piwik\EventDispatcher->postEvent()
#11 /var/www/matomo/core/Console.php(308): Piwik\Piwik::postEvent()
#12 /var/www/matomo/core/Console.php(122): Piwik\Console->initAuth()
#13 /var/www/matomo/core/Console.php(93): Piwik\Console->doRunImpl()
#14 /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun()
#15 /var/www/matomo/console(32): Symfony\Component\Console\Application->run()
#16 {main}
Uncaught exception: Class 'Piwik\Plugins\UsersManager\Model' not found
in /var/www/matomo/plugins/Login/Auth.php line 35
#0 /var/www/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(140): Piwik\Plugins\Login\Auth->
construct()
#1 /var/www/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(70): DI\Definition\Resolver\ObjectCreator->createInstance()
#2 /var/www/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ObjectCreator->resolve()
#3 /var/www/matomo/vendor/php-di/php-di/src/DI/Container.php(303): DI\Definition\Resolver\ResolverDispatcher->resolve()
#4 /var/www/matomo/vendor/php-di/php-di/src/DI/Container.php(131): DI\Container->resolveDefinition()
#5 /var/www/matomo/core/Container/StaticContainer.php(80): DI\Container->get()
#6 /var/www/matomo/core/Piwik.php(562): Piwik\Container\StaticContainer::get()
#7 /var/www/matomo/plugins/Login/Login.php(63): Piwik\Piwik::getLoginPluginName()
#8 /var/www/matomo/core/Plugin.php(232): Piwik\Plugins\Login\Login->registerEvents()
#9 /var/www/matomo/core/EventDispatcher.php(110): Piwik\Plugin->getListHooksRegistered()
#10 /var/www/matomo/core/Piwik.php(775): Piwik\EventDispatcher->postEvent()
#11 /var/www/matomo/core/Console.php(308): Piwik\Piwik::postEvent()
#12 /var/www/matomo/core/Console.php(122): Piwik\Console->initAuth()
#13 /var/www/matomo/core/Console.php(93): Piwik\Console->doRunImpl()
#14 /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun()
#15 /var/www/matomo/console(32): Symfony\Component\Console\Application->run()
#16 {main}

Greetz
Ovrld

@sgiehl commented on July 21st 2020 Member

Hi @47k. Sorry to hear you had a problem while updating. The file that is missing in your case, should have actually already existed before. To fix the issue, maybe try reuploading Matomo using the latest release zip.

@47k commented on July 21st 2020

@sgiehl
Thank you for your answer. I have no idea if the file exists before, but I tried already the manually upgrading with the latest release zip. I uploaded and unzipped it und tried the "php /var/www/matomo/console core:update" command.

@sgiehl commented on July 21st 2020 Member

Thank you for your answer. I have no idea if the file exists before, but I tried already the manually upgrading with the latest release zip. I uploaded and unzipped it und tried the "php /var/www/matomo/console core:update" command.

@47k Did that fix your problem?

@47k commented on July 21st 2020

No - I tried that before and that's the point where I got the issue log from.

@sgiehl commented on July 21st 2020 Member

Just checked the latest release, and that file is definitely included in the ZIP file. Are you using some kind of PHP cache like APC or OPcache?

@47k commented on July 21st 2020

The file is in - but the error is more that "ERROR [2020-07-21 09:57:51] 3635 Uncaught exception: Error: Class 'Piwik\Plugins\UsersManager\Model' not found in /var/www/matomo/plugins/Login/Auth.php:35"

In the file there is:
33 public function __construct()
34 {
35 $this->userModel = new Model();
36 $this->passwordHelper = new Password();
37 }

@sgiehl commented on July 21st 2020 Member

That's the point where it tries to load the model. But there should be a use statement for it, and the autoloader should then include the file. Not sure why the autoloader fails at that point 🤷

@47k commented on July 22nd 2020

I tried again with reloading my virtual machine snapshot and now

unzip -o matomo.zip

worked for me.

@sgiehl commented on July 22nd 2020 Member

Glad to hear it's working again for you. Will close this issue as I guess there is actually not much we can do on our side to prevent such problems.

This Issue was closed on July 22nd 2020
Powered by GitHub Issue Mirror