Closed boboldehampsink closed 4 years ago
@boboldehampsink are you using the 1.0.5 version of the plugin? I just tested this without problems on: PHP 7.2.24 Craft Pro 3.3.20.1 Sentry SDK plugin 1.0.5
Yes this occurs on 1.0.5 and on 1.0.4 - it shows up in the logs
Can you provide a dump (without dsn or other personal info) of the born05\sentry\Plugin
line 41 $settings
variable?
Just to check the obvious, but is the CRAFT_ENVIRONMENT
variable not equal
to production
?
Nope
(Screenshot from phpinfo)
I double checked, but i really cannot reproduce this. Are you sure sentry-sdk.php
is inside craft's config folder? Dumping the settings variable from the plugin would verify if it's loaded.
Here's some more info I found. It only happens when I install a new site with an existing project config. These are the logs:
...
web_1 | > installing sentry-sdk ... born05\sentry\models\Settings#1
web_1 | (
web_1 | [enabled] => true
web_1 | [anonymous] => false
web_1 | [clientDsn] => null
web_1 | [excludedCodes] => [
web_1 | 0 => '404'
web_1 | ]
web_1 | [release] => null
web_1 | [yii\base\Model:_errors] => null
web_1 | [yii\base\Model:_validators] => null
web_1 | [yii\base\Model:_scenario] => 'default'
web_1 | [yii\base\Component:_events] => []
web_1 | [yii\base\Component:_eventWildcards] => []
web_1 | [yii\base\Component:_behaviors] => []
web_1 | )done
web_1 | > applying existing project config ... done
web_1 | > saving the first user ... done
web_1 | *** installed Craft successfully (time: 6.758s)
web_1 |
web_1 | 2020-01-17 06:49:21 [-][-][-][error][sentry-sdk] Failed to report exception due to missing client key (DSN)
web_1 | 2020-01-17 06:49:22 [-][-][-][error][sentry-sdk] Failed to report exception due to missing client key (DSN)
web_1 | born05\sentry\models\Settings#1
web_1 | (
web_1 | [enabled] => false
web_1 | [anonymous] => false
web_1 | [clientDsn] => null
web_1 | [excludedCodes] => [
web_1 | 0 => '400'
web_1 | 1 => '404'
web_1 | 2 => '429'
web_1 | ]
web_1 | [release] => null
web_1 | [yii\base\Model:_errors] => null
web_1 | [yii\base\Model:_validators] => null
web_1 | [yii\base\Model:_scenario] => 'default'
web_1 | [yii\base\Component:_events] => []
web_1 | [yii\base\Component:_eventWildcards] => []
web_1 | [yii\base\Component:_behaviors] => []
web_1 | )
You can see that after installing Craft, it picks up the correct config. I think it needs to check whether the plugin or Craft itself is actually installed yet?
Thanks! That helps alot! Fixed it in 1.0.6. Can you verify this?
That did the trick, thanks!
Seeing these errors in
dev
environment:While my config disabled sentry for dev environment: