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

Re-enabling Google Authenticator plugin causes non-obvious error #14276

Closed
STRML opened this issue Mar 27, 2019 · 2 comments
Closed

Re-enabling Google Authenticator plugin causes non-obvious error #14276

STRML opened this issue Mar 27, 2019 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@STRML
Copy link

STRML commented Mar 27, 2019

Posting this as much for reference (hello if you come here from Google) and to bring up a bad user experience.

In Matomo >= 3.8.0, if you don't read the release notes carefully, you might notice your Google Authenticator plugin was disabled. Okay, that's no problem, re-enable it. Everything looks fine on the admin panel, but tracking completely breaks!

The error is not obvious:

[Tue Mar 26 23:19:09.359669 2019] [proxy_fcgi:error] [pid 21220] [client x.x.x.x:30431] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method Piwik\\Tracker\\Db\\Pdo\\Mysql::getConnection() in /srv/www/public_html/core/Session/SaveHandler/DbTable.php:59
Stack trace:
#0 [internal function]: Piwik\\Session\\SaveHandler\\DbTable->open('/var/lib/php/se...', 'MATOMO_SESSID')
#1 /srv/www/public_html/libs/Zend/Session.php(469): session_start()
#2 /srv/www/public_html/core/Session.php(133): Zend_Session::start()
#3 /srv/www/public_html/plugins/GoogleAuthenticator/Auth.php(111): Piwik\\Session::start()
#4 /srv/www/public_html/core/Tracker/Request.php(201): Piwik\\Plugins\\GoogleAuthenticator\\Auth->authenticate()
#5 /srv/www/public_html/core/Tracker/Request.php(168): Piwik\\Tracker\\Request::authenticateSuperUserOrAdminOrWrite('de12bbfdaf2c970...', 2)
#6 /srv/www/public_html/core/Tracker/Request.php(131): Piwik\\Tracker\\Request->authenticateTrackingApi('de12bbfdaf2c970...')
#7 /srv/www/...
'

I am unsure why calling Piwik\\Session::start() for tracking creates this error, and it led me down a rabbit hole of debugging our db connection before I realized the plugin connection.

Simply disabling the plugin fixed the issue.

It should probably not be possible to enable it on newer versions to prevent this.

@tsteur
Copy link
Member

tsteur commented Mar 27, 2019

Thanks for letting us know.
AFAIK the latest version of GoogleAuthenticator has defined to not be compatible with 3.8 version and as such it shouldn't be possible to activate it (https://github.com/sgiehl/piwik-plugin-GoogleAuthenticator/blob/master/plugin.json#L10) . Did you maybe activate it again through the config file? In this case it shouldn't have been loaded AFAIK.
maybe you didn't have the latest version of Google Authenticator?

@tsteur tsteur closed this as completed Mar 27, 2019
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Mar 27, 2019
@STRML
Copy link
Author

STRML commented Mar 27, 2019

It's possible that I walked through a small hole in the logic - it is likely I activated an old version that didn't have the version limit.

Regardless, I don't expect a fix, but I hope this will help anyone else who runs across it.

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

2 participants