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

Update to latest Matomo 3.14 failure: Class 'Piwik\Plugins\UsersManager\Model' not found #16230

Closed
47k opened this issue Jul 21, 2020 · 9 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@47k
Copy link

47k commented Jul 21, 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
Copy link
Member

sgiehl commented Jul 21, 2020

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
Copy link
Author

47k commented Jul 21, 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
Copy link
Member

sgiehl commented Jul 21, 2020

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
Copy link
Author

47k commented Jul 21, 2020

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

@sgiehl
Copy link
Member

sgiehl commented Jul 21, 2020

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
Copy link
Author

47k commented Jul 21, 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
Copy link
Member

sgiehl commented Jul 21, 2020

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 🤷

@tsteur tsteur added the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Jul 21, 2020
@47k
Copy link
Author

47k commented Jul 22, 2020

I tried again with reloading my virtual machine snapshot and now

unzip -o matomo.zip

worked for me.

@sgiehl
Copy link
Member

sgiehl commented Jul 22, 2020

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.

@sgiehl sgiehl closed this as completed Jul 22, 2020
@sgiehl sgiehl added answered For when a question was asked and we referred to forum or answered it. and removed Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. labels Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants