sentry-react-native: No errors reported

We’re using an on premise install (8.14.1) and I’m trying to setup react-native-sentry I’ve configured according to the docs and everything seems to build and run fine, but no errors actually show up. I’m testing from the Simulator and manually throwing an error from the root component on mount.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 42 (15 by maintainers)

Most upvoted comments

+1 Nothing is reported on the sentry dashboard with debug/release build.

@HazAT please add full manual instruction for iOS & Android it will be useful 😉

For everyone who has the same issue that on Android crashes/JS errors war not reported:

It works when I disable the native integration for Android

    Sentry.config('URL', {
      deactivateStacktraceMerging: true,
      logLevel: SentryLog.Verbose,
      // currently sentry is not reporting errors on android using the native module
      disableNativeIntegration: Platform.OS === 'android',
    }).install();

@samuelchvez Is it only on Android? Please make sure your MainApplication.java looks something like this:

...
import io.sentry.RNSentryPackage;
...

public class MainApplication extends Application implements ReactApplication {

    ....
    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
              new MainReactPackage(),
              new RNSentryPackage(MainApplication.this)
      );
    }
    ...

Is there reason why android’s native integration doesn’t work and when this will be fixed?

@HazAT hello, thank you for the effort and work on this library.

I have a similar issue as the guys above:

  • No errors are registered on the sentry.io site
  • Only captureMessage gets registered
  • Successfully linked and followed the installation wizard
  • I have tried removing yarn.lock, node_modules, and runnig yarn cache clean
  • I’m using the latest version of this library (0.34)
  • I don’t see any log (on react-native log-android) when I place the logLevel verbose configuration.
  • I’m using a Mac
  • All my tests have been on a physical Android device
  • The only piece of code that I’m adding is at the main index.js file:
import { Sentry, SentryLog } from 'react-native-sentry';
Sentry.config('https://aaa:bbb@sentry.io/ccc', {
	logLevel: SentryLog.Verbose, 
}).install();

Best regards!

Hello guys,

I’m currently doing the same as @nicinabox , and having the same result so far.

Only captureMessagedoes send an error to Sentry, but nativeCrash or a simple throw do nothing.

EDIT: I tested with an iOS app built in production settings through Hockey App, and a throw is indeed catched by Sentry