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

Plugin is not active yet it broked the whole Matomo #17149

Closed
uhlhosting opened this issue Jan 27, 2021 · 4 comments
Closed

Plugin is not active yet it broked the whole Matomo #17149

uhlhosting opened this issue Jan 27, 2021 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@uhlhosting
Copy link

The latest dev branch its simply broken for some reason after installing the latest 4.x-dev branch, I get this:

An error occurred
Package "sentry/sentry" is not installed

the worst outcome of this, is that will render unusable the entire Matomo, they should have a better failsafe in place, or sorry is not possible one module will kill entire app. Thats a very poor application baseline for failsafe.

cosmic@trace:/var/www/html/matomo$ php console plugin:activate SentryLogger

ERROR [2021-01-26 23:49:04] 27870  Uncaught exception: /var/www/html/matomo/vendor/composer/InstalledVersions.php(584): Package "sentry/sentry" is not installed
Package "sentry/sentry" is not installed
                                            
  [OutOfBoundsException]                    
  Package "sentry/sentry" is not installed  
                                            
plugin:activate [plugin1] ... [pluginN]
cosmic@trace:/var/www/html/matomo$ php console plugin:uninstall SentryLogger
ERROR [2021-01-26 23:49:07] 27884  Uncaught exception: /var/www/html/matomo/vendor/composer/InstalledVersions.php(584): Package "sentry/sentry" is not installed
Package "sentry/sentry" is not installed
                                            
  [OutOfBoundsException]                    
  Package "sentry/sentry" is not installed  
                                            
plugin:uninstall [plugin1] ... [pluginN]
cosmic@trace:/var/www/html/matomo$ 

I have already contacted the developer of the module. Why I present this here, well is simple. It is a bad failover system it seems in Matomo when an OLD or BAD module will not be checked before or after was uploaded for functionality. Thus a simple check of requirements would avoid situations like this, where just a simple TEST for a newer module release killed the whole Matomo instance.

I tried to do some CLI work on module side it did not helped. Can someone tell me how this can be solved?

The SentryLogger is not Active, and the state is visible above yet still renders whole instance broken

image

@tsteur
Copy link
Member

tsteur commented Jan 27, 2021

Hi @uhlhosting thanks for bringing this up. Which sentry plugin do you refer to? Matomo should already do some basic checks before activating a plugin and not fail in theory. We'll try to reproduce it once we know which plugin it is.

@uhlhosting
Copy link
Author

uhlhosting commented Jan 27, 2021

Hi, @tsteur SentryLogger, was mentioned above in the cli side where I tried to uninstall it, its stuck somehow now on that printscreen no matter what I tried from cli

@Findus23
Copy link
Member

As mentioned in digitalist-se/MatomoPlugin-Sentry#4 (comment) the way the plugin works is very experimental as both adding (a lot of) additional composer dependencies in a separate vendor tree and integrating Sentry by trying to load the SDK during plugin initialisation is not how it is intended to be used.
That's why I wrote into the description that the plugin is experimental.

I doubt it is possible to write Matomo in a way that makes it impossible for plugins to break it as if you add arbitrary code this arbitrary code can break things in arbitrary ways. But simply deleting the plugin (and maybe the entries in the config/config.ini.php) should fix everything again.

@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Jan 27, 2021
@tsteur
Copy link
Member

tsteur commented Jan 27, 2021

I've tried to reproduce this but couldn't. The plugin activation etc works without an issue for me. I was thinking maybe the SentryLogger::__construct causes an issue because there likely shouldn't be any code but it worked for me. I see there's a path hard coded to plugins dir which I created a PR for. I'll close this issue for now as it's likely an issue with the plugin itself but if we found a way to reproduce this then we could see if we can make changes to Matomo that be better. So far I'm thinking this behaviour might be expected/wanted as you're seeing the plugin cannot be activated because it's causing errors.

@tsteur tsteur closed this as completed Jan 27, 2021
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