stayallive / wp-sentry

A (unofficial) WordPress plugin reporting PHP and JavaScript errors to Sentry.
https://wordpress.org/plugins/wp-sentry-integration/
MIT License
305 stars 48 forks source link

Trouble with the installation #98

Closed LiegardPierre closed 2 years ago

LiegardPierre commented 3 years ago

Hello !

I have some trouble with the plugin installation. I have a multisite wordpress (v5.6.2) and when I try to install the plugin (the latest version - v4.6) I get this error :

Fatal error: Uncaught WPSentry\ScopedVendor\Symfony\Component\OptionsResolver\Exception\InvalidOptionsException: The option "release" with value false is expected to be of type "null" or "string", but is of type "boolean". in /mnt/ebs/wordpress/data/wp-content/plugins/wp-sentry-integration/build/vendor/symfony/options-resolver/OptionsResolver.php:812 Stack trace: #0 /mnt/ebs/wordpress/data/wp-content/plugins/wp-sentry-integration/build/vendor/symfony/options-resolver/OptionsResolver.php(707): WPSentry\ScopedVendor\Symfony\Component\OptionsResolver\OptionsResolver->offsetGet('release') #1 /mnt/ebs/wordpress/data/wp-content/plugins/wp-sentry-integration/build/vendor/sentry/sentry/src/Options.php(39): WPSentry\ScopedVendor\Symfony\Component\OptionsResolver\OptionsResolver->resolve(Array) #2 /mnt/ebs/wordpress/data/wp-content/plugins/wp-sentry-integration/build/vendor/sentry/sentry/src/ClientBuilder.php(75): Sentry\Options->__construct(Array) #3 /mnt/ebs/wordpress/data/wp-content/plugins/wp-sentry-integration/src/class-wp-sen in /mnt/ebs/wordpress/data/wp-content/plugins/wp-sentry-integration/build/vendor/symfony/options-resolver/OptionsResolver.php on line 812

Thanks for your time !

stayallive commented 3 years ago

Hi @LiegardPierre,

That error is caused when WP_SENTRY_VERSION define is set to false it seems.

Are you setting WP_SENTRY_VERSION yourself?

The fallback is wp_get_theme()->get( 'Version' ) ?: 'unknown' which I can assume might return false but false should default to unknown to I believe you are either setting WP_SENTRY_VERSION yourself or something unexpected is happening :)

stayallive commented 2 years ago

I am closing this issue because of inactivity, if there is still an issue please re-open / open a new issue so we can investigate 👍