sentry expo logs error when enableInDevelopment is set to false or omitted

1k views Asked by At

I have a react native expo managed app using react-native-sentry. According to the docs here: Sentry Expo Docs disabled by default in dev when encountering an error in dev it should be no op. I'm getting an error logged:

config Object {
  "debug": true,
  "defaultIntegrations": false,
  "deployEnvironment": "default",
  "dsn": "my-valid-dsn",
  "environment": "local",
}
[sentry-expo] Disabled Sentry in development. Note you can set Sentry.init({ enableInExpoDevelopment: true });

Sentry Logger [Error]:, [SentryError: SDK not enabled, will not capture event.]
at http://192.168.0.110:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:267225:41 in anonymous
at node_modules/sentry-expo/node_modules/@sentry/utils/dist/logger.js:26:4 in consoleSandbox
at http://192.168.0.110:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:267222:20 in anonymous
at node_modules/sentry-expo/node_modules/@sentry/utils/dist/syncpromise.js:72:26 in cachedHandlers.forEach$argument_0
at node_modules/sentry-expo/node_modules/@sentry/utils/dist/syncpromise.js:67:12 in _executeHandlers
at http://192.168.0.110:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:268617:30 in anonymous
at node_modules/sentry-expo/node_modules/@sentry/utils/dist/syncpromise.js:82:12 in SyncPromise
at http://192.168.0.110:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:268594:28 in anonymous
at http://192.168.0.110:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:274894:79 in anonymous
at node_modules/sentry-expo/node_modules/@sentry/hub/dist/hub.js:381:8 in Hub.prototype._invokeClient
at http://192.168.0.110:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:274350:24 in anonymous
at node_modules/sentry-expo/node_modules/@sentry/minimal/dist/index.js:16:28 in callOnHub
at node_modules/sentry-expo/node_modules/@sentry/minimal/dist/index.js:30:8 in captureException
at App.js:34:2 in App
at App.js:46:27 in initStripe
- ... 16 more stack frames from framework internals 

Code snippet:

export default function App() {
  console.log('config', getConfig().sentry);
  Sentry.init(getConfig().sentry);
  Sentry.Native.captureException(new Error("Oops!")); 

npm list sentry-expo

npm list sentry-expo
client@ /Users/blah/Repositories/blah-blah/client
└── [email protected]

I expected no logging. Any help or advice would be appreciated!

0

There are 0 answers