Skip to content

[SR] io.sentry.android.replay.screenshotrecorder.close android SIGSEGV crash #4228

Closed
@leesoyeon93

Description

@leesoyeon93

Integration

sentry-android

Build System

Gradle

AGP Version

8.0.1

Proguard

Enabled

Version

6.5.0

Steps to Reproduce

I introduced Sentry into my React Native project by setting up the following steps:

  1. sentry install
yarn add @sentry/react-native
  1. sentry init
import * as Sentry from '@sentry/react-native';

import { DEPLOY_MODE, SENTRY_DSN } from '~/config/constants';


 useEffect(() => {
    if (DEPLOY_MODE === 'prod' && SENTRY_DSN && sentryConfig.enableSentry) {
      Sentry.init({
        dsn: SENTRY_DSN,
        tracesSampleRate: sentryConfig.tracesSampleRate ?? 0.1,
        profilesSampleRate: sentryConfig.profilesSampleRate ?? 0.0,
        replaysSessionSampleRate: sentryConfig.replaysSessionSampleRate ?? 0.0,
        replaysOnErrorSampleRate: sentryConfig.replaysOnErrorSampleRate ?? 1.0,
        enableAutoSessionTracking: sentryConfig.enableAutoSessionTracking ?? true,
        sessionTrackingIntervalMillis:
          sentryConfig.sessionTrackingIntervalMillis ?? 30000,
        enableAutoPerformanceTracing: sentryConfig.enableAutoPerformanceTracing ?? true,
        maxBreadcrumbs: sentryConfig.maxBreadcrumbs ?? 100,
        integrations: [
          Sentry.hermesProfilingIntegration({
            platformProfilers: sentryConfig.platformProfilers ?? true,
          }),
          Sentry.mobileReplayIntegration({
            maskAllImages: sentryConfig.maskAllImages ?? false,
            maskAllText: sentryConfig.maskAllText ?? false,
            maskAllVectors: sentryConfig.maskAllVectors ?? false,
          }),
        ],
      });

      Sentry.setUser({
        id: auth.user.id ?? '',
        email: auth.user.email ?? '',
        username: auth.user.nickname ?? '',
      });
    }
  }, [sentryConfig, auth.user]);

sentryConfig is a JSON that manages individual values for Sentry settings.
That's it is is very simple process.

The message explains that increasing the ratio for Sentry's session replay functionality causes SIGSEGV errors on Android devices.

Initially, I set it as:

replaysSessionSampleRate: sentryConfig.replaysSessionSampleRate ?? 0.0,
replaysOnErrorSampleRate: sentryConfig.replaysOnErrorSampleRate ?? 1.0,

I set the replaysOnErrorSampleRate ratio to 1.0.
After that, abnormal terminations occurred on Android.

So I lowered the replaysOnErrorSampleRate ratio to 0.1, which significantly reduced the proportion of abnormal terminations, but errors are still being reported in the Google Play Console.

Expected Result

Increasing the replaysSessionSampleRate ratio on Android should not cause errors.

Actual Result

Image

Image

[base.apk] io.sentry.android.replay.ScreenshotRecorder.close (SIGSEGV)

i cant slove this issue.

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions