@uhlhosting opened this Issue on January 27th 2021

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<a class='mention' href='https://github.com/trace'>@trace</a>:/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<a class='mention' href='https://github.com/trace'>@trace</a>:/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<a class='mention' href='https://github.com/trace'>@trace</a>:/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 commented on January 27th 2021 Member

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 commented on January 27th 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 commented on January 27th 2021 Member

As mentioned in https://github.com/Findus23/plugin-SentryLogger/issues/4#issuecomment-768338460 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 commented on January 27th 2021 Member

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.

This Issue was closed on January 27th 2021
Powered by GitHub Issue Mirror