When a fatal error is being triggered during a run of php bin/console, e.g. during Cronjobs, Sentry itself fails with a Fatal Error:
PHP Fatal error: Uncaught Error: Call to a member function getScheme() on null in /app/vendor/shopware/shopware/engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php:430
Stack trace:
#0 /app/vendor/shopware/shopware/engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php(231): Shopware_Plugins_Backend_Auth_Bootstrap->initLocale()
#1 /app/custom/plugins/OdSentry/Components/SentryClient.php(69): Shopware_Plugins_Backend_Auth_Bootstrap->checkAuth()
#2 /app/vendor/sentry/sentry/lib/Raven/ErrorHandler.php(81): OdSentry\Components\SentryClient->captureException(Object(ErrorException), NULL, NULL, NULL)
#3 /app/vendor/sentry/sentry/lib/Raven/ErrorHandler.php(151): Raven_ErrorHandler->handleException(Object(ErrorException), true)
#4 [internal function]: Raven_ErrorHandler->handleFatalError()
#5 {main}
thrown in /app/vendor/shopware/shopware/engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php on line 430
Removing Components/SentryClient.php#L69 does indeed "solve" the issue, as now a report is sent to Sentry, but that's really not a good fix.
When a fatal error is being triggered during a run of
php bin/console
, e.g. during Cronjobs, Sentry itself fails with a Fatal Error:Removing Components/SentryClient.php#L69 does indeed "solve" the issue, as now a report is sent to Sentry, but that's really not a good fix.
Let me know if additional input is required.