OS:
Platform:
SDK:
@sentry/react-native (>= 1.0.0)react-native-sentry (<= 0.43.2)SDK version: 1.7.2
react-native version: 0.63.2
Are you using Expo?
Are you using sentry.io or on-premise?
Configuration:
(@sentry/react-native)
Sentry.init({
dsn: config.sentry.dsn,
debug: __DEV__ ? true : false
})
I have following issue:
When logging errors, for example using Sentry.captureException, I'm getting the following error/warning:
Sentry Logger [Log]: Failed to get device context from native: TypeError: RNSentry.deviceContexts is not a function. (In 'RNSentry.deviceContexts()', 'RNSentry.deviceContexts' is undefined)
Steps to reproduce:
npx react-native init AwesomeProjectyarn add @sentry/react-nativeimport * as Sentry from "@sentry/react-native";
Sentry.init({
dsn: "__DSN__" // My DSN hidden here
});
Sentry.captureMessage("Hello Sentry!");
yarn run androidYou can optionally also run npx sentry-wizard -i reactNative -p android to run the Sentry Wizard, but even after running the Wizard (thus adding settings and updating __android/app/build.gradle__) the issue persists.
Actual result:
I'm getting a warning about RNSentry.deviceContexts being undefined:
[Wed Sep 02 2020 08:16:27.839] LOG Sentry Logger [Log]: Integration installed: ReactNativeErrorHandlers
Expected result:
That I don't get the error :D
Updated with reproducible example
@AdamGerthel Thanks! I am able to reproduce this. Will look into it ASAP.
Also having this issue on Android with latest Sentry/React Native packages:
@sentry/react-native": "^1.7.2
"react-native": "^0.63.2"
Can see a PR is open, do we have any idea when this might get merged and released? Thanks
@toughdeveloper It just got merged and we should have a release shorty!