Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN 54rc3 fix #362

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/src/main/java/io/sentry/RNSentryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public void captureEvent(ReadableMap event) {
ReadableNativeMap exception = exceptionValues.getMap(0);
ReadableNativeMap stacktrace = exception.getMap("stacktrace");
if (exception.hasKey("value")) {
addExceptionInterface(eventBuilder, exception.getString("type"), exception.getString("value"), stacktrace.getArray("frames"));
addExceptionInterface(eventBuilder, exception.getString("type"), exception.getString("value"), (ReadableNativeArray) stacktrace.getArray("frames"));
} else {
// We use type/type here since this indicates an Unhandled Promise Rejection
// https://github.com/getsentry/react-native-sentry/issues/353
Expand Down
3 changes: 2 additions & 1 deletion lib/Sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const SentryLog = {
};

export const Sentry = {
install() {
async install() {
// We have to first setup raven otherwise react-native will freeze the options
// and some properties like ignoreErrors can not be mutated by raven-js
Sentry._ravenClient = new RavenClient(Sentry._dsn, Sentry.options);
Expand All @@ -31,6 +31,7 @@ export const Sentry = {
Sentry.options.disableNativeIntegration === false
) {
Sentry._nativeClient = new NativeClient(Sentry._dsn, Sentry.options);
await Sentry._nativeClient.customInit();
Sentry.eventEmitter = new NativeEventEmitter(RNSentryEventEmitter);
Sentry.eventEmitter.addListener(
RNSentryEventEmitter.EVENT_SENT_SUCCESSFULLY,
Expand Down