• Resolved Matt Pramschufer

    (@mattpramschufer)


    We have the official Sentry Plugin installed as well so I think there may be a Namespace issue on this.

    [24-Mar-2021 12:22:05] WARNING: [pool www] child 30196 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught OutOfBoundsException: Package “sentry/sentry” is not installed in /var/www/xxxxxx.com/wp-content/plugins/duplicate-post/vendor/composer/InstalledVersions.php:188″
    [24-Mar-2021 12:22:05] WARNING: [pool www] child 30196 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught OutOfBoundsException: Package “sentry/sentry” is not installed in /var/www/xxxxxx.com/wp-content/plugins/duplicate-post/vendor/composer/InstalledVersions.php:188″

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi @mattpramschufer,
    actually we are not using the sentry/sentry package at all in Duplicate Post, so it might be a namespace/conflict issue related to the autoloader instead.
    I’ll try to reproduce the issue and get back to you.

    Dit it happen with version 4.1.1?

    Can you link me the Sentry plugin you are using?

    Thread Starter Matt Pramschufer

    (@mattpramschufer)

    Nope, just happened this morning on 3 sites I updated. I went in and deactivated WP Sentry for the time being and it works as intended.

    Thread Starter Matt Pramschufer

    (@mattpramschufer)

    I will try, thanks
    Where do you get the error message?

    Thread Starter Matt Pramschufer

    (@mattpramschufer)

    I got the 500 error as soon as I upgraded and activated 4.1.2. I am assuming you are not able to reproduce…

    Hi @mattpramschufer,
    actually I cannot seem to reproduce it, but I have just installed the WP Sentry plugin without any configuration. I don’t think this should matter, though.

    Is the WP Sentry plugin at the latest version?

    Hi @mattpramschufer!

    We installed WordPress Sentry v4.2.0 and have Duplicate Post v4.1.2 (see image: https://ibb.co/9hX63Df) and we were not able to reproduce this.

    No server 500 error happened. However, can you elaborate more on how you set-up WordPress Sentry we could try to reproduce it if the settings are the same. This is ours: https://ibb.co/YXK3Tb1.

    You can use a tool like: https://imgbb.com/ to share the image of the settings.

    @pcosta88 the problem appears as soon as you enable Sentry with \Sentry\init() and then require the Duplicate Post plugin – https://ibb.co/k69xqhz
    I noticed that you pack the plugin with a, basically, empty vendor folder and composer autoload. If you don’t use any library inside – you shouldn’t even package it then, not to mention that it’s an additional load on the server – https://ibb.co/2nh0G22

    Hi @jahggler,
    the autoload is used by the plugin itself to load its own classes, not for any library. This is done by many other plugins as well, and so far only the sentry/sentry package has been reported to display this kind of conflict.

    From your screenshot it seems that in your case it’s a package imported by your theme’s functions.php and not the above mentioned plugin, am I right?

    Yes, it’s a Sage framework https://github.com/roots/sage, the Sentry sdk goes to wordpress root folder /vendor/sentry
    This just gave me an idea of maybe trying to initialize Sentry earlier before all the plugins and theme code kicks in.. and it worked! so the solution is to initialize Sentry before any plugin initialization starts, for anyone interested I put the initialization into /config/application.php, something like this:

    
    /** Sentry */
    $dsn = env('SENTRY_DSN', '');
    if ($dsn) {
        \Sentry\init([ 'dsn' => $dsn ]);
    }

    Hi @jahggler,
    glad to hear this! We’ll continue to try to reproduce that since we still aren’t able to do it (also because the fix can’t apply to the above mentioned plugin), but thanks for letting us know, it can be a useful clue.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fatal Error on Update to 4.1.2’ is closed to new replies.