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

Native crash not reported on ejected expo app #663

Closed
4 tasks done
clems36 opened this issue Sep 18, 2019 · 2 comments
Closed
4 tasks done

Native crash not reported on ejected expo app #663

clems36 opened this issue Sep 18, 2019 · 2 comments

Comments

@clems36
Copy link

clems36 commented Sep 18, 2019

OS:

  • MacOS

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native: ^1.0.5

react-native version: 0.59.8

Init Code:

Sentry.init({
  dsn: 'https://1acf5ce8efb942a08eb1422bfde04cd2@sentry.io/1402155',
});
Sentry.setRelease(
  `${NativeConfigs.SLUG}@${config.VERSION_STRING}-${
    config.JS_BUNDLE_VERSION
  }`,
);
Sentry.setTags({
  environment: NativeConfigs.ENV,
  releaseChannel: Constants.manifest.releaseChannel,
  expoVersion: Constants.expoVersion,
});

Hi. I'm successfully able to report crashes using Sentry.captureException(error); but Sentry.nativeCrash(); does not not report anything on the interface.
I've automatically linked the package using react-native link @sentry/react-native which worked fine.
I still went to the "Manual setup" section to see if something went wrong, followed the steps for the Android setup and noticed a difference in my setup. In my android/app/build.gradle i don't see apply from: 'react.gradle', instead I have apply from: 'expo.gradle' which is, according to this file, based on react.gradle.
So here's what it looks like:

apply from: 'expo.gradle'
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"

// WHEN_PREPARING_SHELL_REMOVE_TO_HERE

apply from: "../../node_modules/react-native-unimodules/gradle.groovy"

dependencies {
    implementation project(':@sentry_react-native')
    // implementation "com.android.installreferrer:installreferrer:1.0"
    implementation 'io.intercom.android:intercom-sdk-base:5.+'
    implementation project(':react-native-intercom')
    implementation project(':react-native-config')
    implementation project(':react-native-iap')
    implementation project(':react-native-device-info')
    implementation project(':react-native-restart')

etc etc

For the rest of the setup, mine is the same as the manual setup.

I have tried the workaround proposed in this issue, unsuccessful.

@clems36
Copy link
Author

clems36 commented Sep 24, 2019

Has anyone encountered this ? @HazAT do you have any clue ?

@HazAT
Copy link
Member

HazAT commented Sep 25, 2019

My honest suggestion is, create a clean new project with react-native init and copy your code over 😅
Upgrading react-native project or ejecting expo projects is a nightmare and never works without issues in my experience.
I can't really guide you in any direction since there can be several issues and most likely most of them are not related to our SDK.

@HazAT HazAT closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants