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

Session Replay is not working in Android #4044

Closed
5 of 11 tasks
moonfoan opened this issue Aug 23, 2024 · 6 comments
Closed
5 of 11 tasks

Session Replay is not working in Android #4044

moonfoan opened this issue Aug 23, 2024 · 6 comments

Comments

@moonfoan
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.30.0

react-native version: 0.71.17

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(@sentry/react-native)

Sentry.init({
     dsn: Config.SENTRY_DSN,
      _experiments: {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      },
      integrations: [
        Sentry.mobileReplayIntegration({
          maskAllText: false,
          maskAllImages: false,
        }),
      ],
      tracesSampleRate: 1.0,
      enableNdkScopeSync: true,
      enableNative: true,
      autoInitializeNativeSdk: true,
      enableNativeCrashHandling: true,
      attachScreenshot: true,
      appHangTimeoutInterval: 10,
      environment: Config.env,
});

I have the following issue:

Session Replay is not working on Android. It works fine in iOS. I setup the latest Sentry sdk 5.30 using the wizard, and I enabled Session Replay from init(). I manually threw a JS exception to test the Replay feature. The errors are caught correctly by Sentry in both the Android and iOS build, however, the Session Replay only showed up on the iOS side but never turn up on the Android side.

Steps to reproduce:

  • enable Session Replay from Sentry.init()
  • throw a JS exception from the Android build
  • find and view the exception in Sentry issues

Actual result:

No Session Replay is found for the exception

Expected result:

Session Replay is available for the exception

@krystofwoldrich
Copy link
Member

Hi @moonfoan,
thank you very much for the message. I'm happy to hear that the Replay on iOS works.

For Android, could you share with us Logcat log from the application start till the error is captured with debug: true in the Sentry init.

@moonfoan
Copy link
Author

Thank you @krystofwoldrich for helping to look into my issue. There are the log entries from Sentry after I added debug: true to init, from initialization to a crash.

 LOG  Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry.
 LOG  Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers
 LOG  Sentry Logger [log]: Integration installed: NativeLinkedErrors
 LOG  Sentry Logger [log]: Integration installed: InboundFilters
 LOG  Sentry Logger [log]: Integration installed: FunctionToString
 LOG  Sentry Logger [log]: Integration installed: Breadcrumbs
 LOG  Sentry Logger [log]: Integration installed: Dedupe
 LOG  Sentry Logger [log]: Integration installed: HttpContext
 LOG  Sentry Logger [log]: Integration installed: Release
 LOG  Sentry Logger [log]: Integration installed: EventOrigin
 LOG  Sentry Logger [log]: Integration installed: SdkInfo
 LOG  Sentry Logger [log]: Integration installed: ReactNativeInfo
 LOG  Sentry Logger [log]: Integration installed: DebugSymbolicator
 LOG  Sentry Logger [log]: Integration installed: RewriteFrames
 LOG  Sentry Logger [log]: Integration installed: DeviceContext
 LOG  Sentry Logger [log]: Integration installed: ModulesLoader
 LOG  Sentry Logger [log]: Integration installed: Screenshot
 LOG  Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized.
 LOG  Sentry Logger [log]: [ReactNativeTracing] Not instrumenting route changes as routingInstrumentation has not been set.
 LOG  Sentry Logger [log]: Integration installed: ReactNativeTracing
 LOG  Sentry Logger [log]: Integration installed: MobileReplay
 LOG  Running "FSARN" with {"rootTag":11}
 LOG  Sentry Logger [log]: Integration installed: ReactNativeProfiler
 LOG  Sentry Logger [log]: Integration installed: TouchEventBoundary

 WARN  Sentry Logger [warn]: [ReactNativeTracing] `Sentry.wrap` not detected, using JS context init as app start end.
 LOG  Sentry Logger [log]: Setting idle transaction on scope. Span ID: 8d6f8a8401781782
 LOG  Sentry Logger [log]: [Tracing] starting ui.load transaction - App Start
 LOG  Sentry Logger [log]: Starting heartbeat
 LOG  Sentry Logger [log]: pinging Heartbeat -> current counter: 0
 DEBUG  Sentry Logger [debug]: [NativeFrames] Fetching frames for root span start (8d6f8a8401781782).
 LOG  Sentry Logger [log]: [ReactNativeTracing] Starting ui.load transaction "App Start" on scope
 WARN  Sentry Logger [warn]: [ReactNativeTracing] App start duration is over a minute long, not adding app start span.
 LOG  Sentry Logger [log]: [Tracing] pushActivity: 9a213a1a4605f174
 LOG  Sentry Logger [log]: [Tracing] new activities count 1
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'POST http://localhost:8081/symbolicate' (8d6f8a8401781782).

 LOG  Sentry Logger [log]: [Tracing] pushActivity: 9e89c2a3e83985d2
 LOG  Sentry Logger [log]: [Tracing] new activities count 2
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'POST http://localhost:8081/symbolicate' (8d6f8a8401781782).
 LOG  Sentry Logger [log]: [Tracing] popActivity 9a213a1a4605f174
 LOG  Sentry Logger [log]: [Tracing] new activities count 1

 LOG  Sentry Logger [log]: [Tracing] popActivity 9e89c2a3e83985d2
 LOG  Sentry Logger [log]: [Tracing] new activities count 0
 LOG  Sentry Logger [log]: [Tracing] pushActivity: 84e4fbbbc5af3f07
 LOG  Sentry Logger [log]: [Tracing] new activities count 1
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'GET https://codepush.appcenter.ms/v0.1/public/codepush/update_check?deployment_key=&app_version=11.0.0&client_unique_id=1af8b27d53477d3b' (8d6f8a8401781782).

 DEBUG  Sentry Logger [debug]: Setting ui.load transaction to cancelled because the app is in the background.
 LOG  Sentry Logger [log]: [Tracing] finishing IdleTransaction 2024-08-27T04:34:59.027Z ui.load
 DEBUG  Sentry Logger [debug]: Removing AppState listener for ui.load transaction.
 LOG  Sentry Logger [log]: [Tracing] cancelling span since transaction ended early {
  "data": {
    "sentry.origin": "auto.http.browser",
    "sentry.op": "http.client",
    "type": "xhr",
    "http.method": "GET",
    "url": "https://codepush.appcenter.ms/v0.1/public/codepush/update_check?deployment_key=&app_version=11.0.0&client_unique_id=1af8b27d53477d3b"
  },
  "description": "GET https://codepush.appcenter.ms/v0.1/public/codepush/update_check?deployment_key=&app_version=11.0.0&client_unique_id=1af8b27d53477d3b",
  "op": "http.client",
  "parent_span_id": "8d6f8a8401781782",
  "span_id": "84e4fbbbc5af3f07",
  "start_timestamp": 1724733297.8176095,
  "status": "cancelled",
  "timestamp": 1724733299.027523,
  "trace_id": "eedbad9a43fd4ba0b2c53683543b5059",
  "origin": "auto.http.browser"
}
 LOG  Sentry Logger [log]: [Tracing] flushing IdleTransaction
 LOG  Sentry Logger [log]: [Measurements] Adding measurements to transaction {
  "stall_count": {
    "value": 7,
    "unit": "none"
  },
  "stall_total_time": {
    "value": 2121.696533203125,
    "unit": "millisecond"
  },
  "stall_longest_time": {
    "value": 556.330322265625,
    "unit": "millisecond"
  }
}
 LOG  Sentry Logger [log]: [Tracing] Finishing ui.load transaction: App Start.

 DEBUG  Sentry Logger [debug]: [NativeFrames] Native end frames already fetched for trace id (eedbad9a43fd4ba0b2c53683543b5059).
 DEBUG  Sentry Logger [debug]: [NativeFrames] Using frames from root span end (traceId, eedbad9a43fd4ba0b2c53683543b5059).
 LOG  Sentry Logger [log]: [Measurements] Adding measurements to ui.load transaction App Start: {
  "frames_total": {
    "value": 176,
    "unit": "none"
  },
  "frames_frozen": {
    "value": 0,
    "unit": "none"
  },
  "frames_slow": {
    "value": 172,
    "unit": "none"
  }
}

 LOG  Sentry Logger [log]: [TouchEvents] Touch event within element: Svg
 LOG  Sentry Logger [log]: [ReactNativeTracing] User Interaction Tracing is disabled.

 LOG  Sentry Logger [log]: [TouchEvents] Touch event within element: View
 LOG  Sentry Logger [log]: [ReactNativeTracing] User Interaction Tracing is disabled.
 LOG  Sentry Logger [log]: [TouchEvents] Touch event within element: Text
 LOG  Sentry Logger [log]: [ReactNativeTracing] User Interaction Tracing is disabled.

 LOG  Sentry Logger [log]: [TouchEvents] Touch event within element: Text
 LOG  Sentry Logger [log]: [ReactNativeTracing] User Interaction Tracing is disabled.
 ERROR  Caught unexpected error in global exception handler []
 ERROR  [Error: JS crash test] []

 DEBUG  Sentry Logger [debug]: [Sentry] MobileReplay not sampled for event f7eb415ced8f4d0ea66beacfdf9e4a40.

@krystofwoldrich
Copy link
Member

Thank you for the JS logs, based on the last message, it seems like the Replay was not started.

I assume both option were set to 1.0.

replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,

Could you also share with us the Android Logcat logs, as the Replays are recorded on the native layers.

@moonfoan
Copy link
Author

moonfoan commented Aug 27, 2024

Here I did a adb logcat -c to clear the data first, then I restarted my app and generated my manual JS crash, and then reloaded the app. Here's the logcat entries I got related to Sentry:

08-27 11:45:34.826 14017 14119 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/a48939bf-ef00-494e-adff-8ba06643df2a.envelope

08-27 11:45:34.828 14017 14119 D Sentry  : Serializing object: {
08-27 11:45:34.828 14017 14119 D Sentry  : 	"sid": "99aee25d-b70a-4a7d-91ed-0eb61538544c",
08-27 11:45:34.828 14017 14119 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:34.828 14017 14119 D Sentry  : 	"started": "2024-08-27T18:35:07.038Z",
08-27 11:45:34.828 14017 14119 D Sentry  : 	"status": "exited",
08-27 11:45:34.828 14017 14119 D Sentry  : 	"seq": 1724784334821,
08-27 11:45:34.828 14017 14119 D Sentry  : 	"errors": 0,
08-27 11:45:34.828 14017 14119 D Sentry  : 	"duration": 627.783,
08-27 11:45:34.828 14017 14119 D Sentry  : 	"timestamp": "2024-08-27T18:45:34.821Z",
08-27 11:45:34.828 14017 14119 D Sentry  : 	"attrs": {
08-27 11:45:34.828 14017 14119 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:34.828 14017 14119 D Sentry  : 		"environment": "staging"
08-27 11:45:34.828 14017 14119 D Sentry  : 	}
08-27 11:45:34.828 14017 14119 D Sentry  : }

08-27 11:45:35.159 14017 14119 D Sentry  : Envelope sent successfully.
08-27 11:45:35.160 14017 14119 D Sentry  : Discarding envelope from cache: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/a48939bf-ef00-494e-adff-8ba06643df2a.envelope
08-27 11:45:35.160  8205  8408 W ConnectivityManager.CallbackHandler: callback not found for CALLBACK_CAP_CHANGED message
08-27 11:45:35.160 14017 14119 D Sentry  : Envelope flushed
08-27 11:45:35.161 14017 14119 D Sentry  : Serializing object: {
08-27 11:45:35.161 14017 14119 D Sentry  : 	"sid": "a092c943-fe82-4fed-9191-a5adbe6afdd3",
08-27 11:45:35.161 14017 14119 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:35.161 14017 14119 D Sentry  : 	"init": true,
08-27 11:45:35.161 14017 14119 D Sentry  : 	"started": "2024-08-27T18:45:34.834Z",
08-27 11:45:35.161 14017 14119 D Sentry  : 	"status": "ok",
08-27 11:45:35.161 14017 14119 D Sentry  : 	"errors": 0,
08-27 11:45:35.161 14017 14119 D Sentry  : 	"timestamp": "2024-08-27T18:45:34.834Z",
08-27 11:45:35.161 14017 14119 D Sentry  : 	"attrs": {
08-27 11:45:35.161 14017 14119 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:35.161 14017 14119 D Sentry  : 		"environment": "staging"
08-27 11:45:35.161 14017 14119 D Sentry  : 	}
08-27 11:45:35.161 14017 14119 D Sentry  : }
08-27 11:45:35.162 14017 14119 D Sentry  : Serializing object: {
08-27 11:45:35.162 14017 14119 D Sentry  : 	"sid": "a092c943-fe82-4fed-9191-a5adbe6afdd3",
08-27 11:45:35.162 14017 14119 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:35.162 14017 14119 D Sentry  : 	"init": true,
08-27 11:45:35.162 14017 14119 D Sentry  : 	"started": "2024-08-27T18:45:34.834Z",
08-27 11:45:35.162 14017 14119 D Sentry  : 	"status": "ok",
08-27 11:45:35.162 14017 14119 D Sentry  : 	"errors": 0,
08-27 11:45:35.162 14017 14119 D Sentry  : 	"timestamp": "2024-08-27T18:45:34.834Z",
08-27 11:45:35.162 14017 14119 D Sentry  : 	"attrs": {
08-27 11:45:35.162 14017 14119 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:35.162 14017 14119 D Sentry  : 		"environment": "staging"
08-27 11:45:35.162 14017 14119 D Sentry  : 	}
08-27 11:45:35.162 14017 14119 D Sentry  : }
08-27 11:45:35.162 14017 14119 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/bdd1395e-b0a6-4a1a-bf13-f432f9ba3aec.envelope

08-27 11:45:35.333 14017 14119 D Sentry  : Envelope sent successfully.
08-27 11:45:35.334 14017 14119 D Sentry  : Discarding envelope from cache: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/bdd1395e-b0a6-4a1a-bf13-f432f9ba3aec.envelope
08-27 11:45:35.334 14017 14119 D Sentry  : Envelope flushed

08-27 11:45:44.053 16243 16243 D Sentry  : io.sentry.auto-init read: false
08-27 11:45:44.053 16243 16243 I Sentry  : Retrieving auto-init from AndroidManifest.xml

08-27 11:45:46.805 16243 16334 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class io.sentry.react.RNSentryOnDrawReporterManager

08-27 11:45:49.306 16243 16334 E unknown:ReactNative: d@3:1082
08-27 11:45:49.306 16243 16334 E unknown:ReactNative: global code@5674:3
08-27 11:45:49.326 16243 16334 E RNKeychainManager: No entry found for service: @SVMX.SETTINGS.APP_LOG_LEVEL_STORAGE_KEY
08-27 11:45:49.346 16243 16334 I RNSentry: FrameMetricsAggregator installed.
08-27 11:45:49.357 16243 16334 I RNSentry: Starting with DSN: 'https://b2bf8e3bf626938d10c35b8eb7481f68:[email protected]/4507341083770880'
08-27 11:45:49.359 16243 16334 E Sentry  : Error in the 'OptionsConfiguration.configure' callback.
08-27 11:45:49.359 16243 16334 E Sentry  : com.facebook.react.bridge.UnexpectedNativeTypeException: Value for dist cannot be cast from Double to String
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.ReadableNativeMap.checkInstance(ReadableNativeMap.java:143)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:131)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.ReadableNativeMap.getString(ReadableNativeMap.java:165)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.react.RNSentryModuleImpl.lambda$initNativeSdk$2$io-sentry-react-RNSentryModuleImpl(RNSentryModuleImpl.java:224)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.react.RNSentryModuleImpl$$ExternalSyntheticLambda0.configure(Unknown Source:6)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.android.core.SentryAndroid.lambda$init$1(SentryAndroid.java:133)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.android.core.SentryAndroid$$ExternalSyntheticLambda0.configure(Unknown Source:8)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.Sentry.applyOptionsConfiguration(Sentry.java:196)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.Sentry.init(Sentry.java:166)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:94)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:77)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.react.RNSentryModuleImpl.initNativeSdk(RNSentryModuleImpl.java:183)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at io.sentry.react.RNSentryModule.initNativeSdk(RNSentryModule.java:43)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at java.lang.reflect.Method.invoke(Native Method)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.jni.NativeRunnable.run(Native Method)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at android.os.Handler.handleCallback(Handler.java:959)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at android.os.Handler.dispatchMessage(Handler.java:100)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at android.os.Looper.loopOnce(Looper.java:232)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at android.os.Looper.loop(Looper.java:317)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
08-27 11:45:49.359 16243 16334 E Sentry  : 	at java.lang.Thread.run(Thread.java:1012)
08-27 11:45:49.359 16243 16334 I Sentry  : Initializing SDK with DSN: 'https://b2bf8e3bf626938d10c35b8eb7481f68:[email protected]/4507341083770880'
08-27 11:45:49.360 16243 16334 I Sentry  : No sentry-debug-meta.properties file was found.
08-27 11:45:49.360 16243 16334 I Sentry  : GlobalHubMode: 'true'
08-27 11:45:49.361 16243 16334 D Sentry  : UncaughtExceptionHandlerIntegration enabled: true
08-27 11:45:49.361 16243 16334 D Sentry  : default UncaughtExceptionHandler class='com.android.internal.os.RuntimeInit$KillApplicationHandler'
08-27 11:45:49.361 16243 16334 D Sentry  : UncaughtExceptionHandlerIntegration installed.
08-27 11:45:49.361 16243 16334 D Sentry  : ShutdownHookIntegration installed.
08-27 11:45:49.361 16243 16334 D Sentry  : SpotlightIntegration is not enabled. BeforeEnvelopeCallback is already set or spotlight is not enabled.
08-27 11:45:49.362 16243 16334 D Sentry  : SendCachedEnvelopeIntegration installed.
08-27 11:45:49.362 16243 16334 D Sentry  : NdkIntegration enabled: true
08-27 11:45:49.363 16243 16418 D Sentry  : Started processing cached files from /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b
08-27 11:45:49.363 16243 16418 D Sentry  : Processing dir. /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b
08-27 11:45:49.363 16243 16334 I sentry-native: using database path "/data/data/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/.sentry-native"
08-27 11:45:49.363 16243 16418 D Sentry  : Processing 1 items from cache dir /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b
08-27 11:45:49.363 16243 16418 D Sentry  : File /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/outbox is not a File.
08-27 11:45:49.363 16243 16334 D sentry-native: starting backend
08-27 11:45:49.363 16243 16418 D Sentry  : File /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/.sentry-native is not a File.
08-27 11:45:49.363 16243 16334 D sentry-native: processing and pruning old runs
08-27 11:45:49.363 16243 16418 D Sentry  : Processing file: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/session.json
08-27 11:45:49.364 16243 16334 D Sentry  : NdkIntegration installed.
08-27 11:45:49.364 16243 16418 D Sentry  : File '/data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/session.json' doesn't match extension expected.
08-27 11:45:49.364 16243 16334 D Sentry  : Registering EnvelopeFileObserverIntegration for path: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/outbox
08-27 11:45:49.364 16243 16334 D Sentry  : SendCachedEnvelopeIntegration installed.
08-27 11:45:49.364 16243 16334 D Sentry  : enableSessionTracking enabled: true
08-27 11:45:49.364 16243 16334 D Sentry  : enableAppLifecycleBreadcrumbs enabled: true
08-27 11:45:49.364 16243 16334 D Sentry  : AnrIntegration enabled: true
08-27 11:45:49.364 16243 16334 D Sentry  : AnrV2Integration installed.
08-27 11:45:49.364 16243 16334 D Sentry  : AppComponentsBreadcrumbsIntegration enabled: true
08-27 11:45:49.364 16243 16334 D Sentry  : AppComponentsBreadcrumbsIntegration installed.
08-27 11:45:49.364 16243 16334 D Sentry  : SystemEventsBreadcrumbsIntegration enabled: true
08-27 11:45:49.364 16243 16334 D Sentry  : NetworkBreadcrumbsIntegration enabled: true
08-27 11:45:49.367  1611  4255 D ConnectivityService: requestNetwork for uid/pid:10260/16243 activeRequest: null callbackRequest: 1956 [NetworkRequest [ REQUEST id=1957, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10260 RequestorUid: 10260 RequestorPkg: com.servicemaxinc.fsa UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647
08-27 11:45:49.367 16243 16334 D Sentry  : NetworkBreadcrumbsIntegration installed.
08-27 11:45:49.367 16243 16334 D Sentry  : enableSystemEventsBreadcrumbs enabled: true
08-27 11:45:49.367 16243 16334 D Sentry  : enableSystemEventBreadcrumbs enabled: true
08-27 11:45:49.368 16243 16334 I Sentry  : Session replay is disabled, no sample rate specified
08-27 11:45:49.369 16243 16243 D Sentry  : AppLifecycleIntegration installed.
08-27 11:45:49.369  1611  2453 D WifiNetworkFactory: got request NetworkRequest [ REQUEST id=1957, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10260 RequestorUid: 10260 RequestorPkg: com.servicemaxinc.fsa UnderlyingNetworks: Null] ]
08-27 11:45:49.370 16243 16420 W Sentry  : Current session is not ended, we'd need to end it.

08-27 11:45:49.373 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.373 16243 16420 D Sentry  : 	"sid": "a092c943-fe82-4fed-9191-a5adbe6afdd3",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"init": true,
08-27 11:45:49.373 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:34.834Z",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"status": "ok",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.373 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:34.834Z",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.373 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.373 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.373 16243 16420 D Sentry  : 	}
08-27 11:45:49.373 16243 16420 D Sentry  : }
08-27 11:45:49.373 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.373 16243 16420 D Sentry  : 	"sid": "8e0ff582-b4ed-45e0-8eb8-576ae15101bb",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"init": true,
08-27 11:45:49.373 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:49.368Z",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"status": "ok",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.373 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:49.368Z",
08-27 11:45:49.373 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.373 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.373 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.373 16243 16420 D Sentry  : 	}
08-27 11:45:49.373 16243 16420 D Sentry  : }
08-27 11:45:49.374 16243 16420 D Sentry  : Overwriting session to offline storage: 8e0ff582-b4ed-45e0-8eb8-576ae15101bb
08-27 11:45:49.374 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.374 16243 16420 D Sentry  : 	"sid": "8e0ff582-b4ed-45e0-8eb8-576ae15101bb",
08-27 11:45:49.374 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.374 16243 16420 D Sentry  : 	"init": true,
08-27 11:45:49.374 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:49.368Z",
08-27 11:45:49.374 16243 16420 D Sentry  : 	"status": "ok",
08-27 11:45:49.374 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.374 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:49.368Z",
08-27 11:45:49.374 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.374 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.374 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.374 16243 16420 D Sentry  : 	}
08-27 11:45:49.374 16243 16420 D Sentry  : }
08-27 11:45:49.375 16243 16420 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/10596bda-234a-4733-aab5-b0a3b67e8eca.envelope

08-27 11:45:49.464 16243 16418 D Sentry  : Processing file: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/a3196e5f-7b85-40aa-8e2d-d34e118b75f4.envelope
08-27 11:45:49.466 16243 16418 D Sentry  : Captured Envelope is already cached
08-27 11:45:49.466 16243 16418 D Sentry  : Envelope enqueued

08-27 11:45:49.508 16243 16420 D Sentry  : Envelope sent successfully.
08-27 11:45:49.510 16243 16420 D Sentry  : Discarding envelope from cache: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/10596bda-234a-4733-aab5-b0a3b67e8eca.envelope
08-27 11:45:49.510 16243 16420 D Sentry  : Envelope flushed
08-27 11:45:49.511 16243 16420 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/3efbfd08-b4ae-4773-873d-9118db25663f.envelope
08-27 11:45:49.511 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.511 16243 16420 D Sentry  : 	"sid": "8e0ff582-b4ed-45e0-8eb8-576ae15101bb",
08-27 11:45:49.511 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.511 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:49.368Z",
08-27 11:45:49.511 16243 16420 D Sentry  : 	"status": "exited",
08-27 11:45:49.511 16243 16420 D Sentry  : 	"seq": 1724784349369,
08-27 11:45:49.511 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.511 16243 16420 D Sentry  : 	"duration": 0.001,
08-27 11:45:49.511 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:49.369Z",
08-27 11:45:49.511 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.511 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.511 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.511 16243 16420 D Sentry  : 	}
08-27 11:45:49.511 16243 16420 D Sentry  : }

08-27 11:45:49.632 16243 16420 D Sentry  : Envelope sent successfully.
08-27 11:45:49.632 16243 16420 D Sentry  : Discarding envelope from cache: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/3efbfd08-b4ae-4773-873d-9118db25663f.envelope
08-27 11:45:49.632   621 15403 D libnos_datagram: Calling App 0x02 with params 0x000b
08-27 11:45:49.632 16243 16420 D Sentry  : Envelope flushed
08-27 11:45:49.633 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.633 16243 16420 D Sentry  : 	"sid": "2d7aa195-3a4d-4a2e-ac71-3cb408f139d5",
08-27 11:45:49.633 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.633 16243 16420 D Sentry  : 	"init": true,
08-27 11:45:49.633 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:49.369Z",
08-27 11:45:49.633 16243 16420 D Sentry  : 	"status": "ok",
08-27 11:45:49.633 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.633 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:49.369Z",
08-27 11:45:49.633 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.633 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.633 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.633 16243 16420 D Sentry  : 	}
08-27 11:45:49.633 16243 16420 D Sentry  : }
08-27 11:45:49.634 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.634 16243 16420 D Sentry  : 	"sid": "2d7aa195-3a4d-4a2e-ac71-3cb408f139d5",
08-27 11:45:49.634 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.634 16243 16420 D Sentry  : 	"init": true,
08-27 11:45:49.634 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:49.369Z",
08-27 11:45:49.634 16243 16420 D Sentry  : 	"status": "ok",
08-27 11:45:49.634 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.634 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:49.369Z",
08-27 11:45:49.634 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.634 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.634 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.634 16243 16420 D Sentry  : 	}
08-27 11:45:49.634 16243 16420 D Sentry  : }
08-27 11:45:49.634 16243 16420 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/203301a3-3146-455b-8d7c-0f39fbef650a.envelope

08-27 11:45:49.745 16243 16420 D Sentry  : Envelope sent successfully.
08-27 11:45:49.749 16243 16420 D Sentry  : Discarding envelope from cache: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/203301a3-3146-455b-8d7c-0f39fbef650a.envelope
08-27 11:45:49.750 16243 16420 D Sentry  : Envelope flushed

08-27 11:45:49.787 16243 16334 D Sentry  : SU isn't found on this Device.

08-27 11:45:49.793 16243 16334 I Sentry  : Not possible to read external files directory

08-27 11:45:49.867 16243 16420 D Sentry  : Request failed, API returned 429
08-27 11:45:49.867 16243 16420 D Sentry  : {"detail":"Sentry dropped data due to a quota or internal rate limit being reached. This will not affect your application. See https://docs.sentry.io/product/accounts/quotas/ for more information."}

08-27 11:45:49.867  1611  2136 W UserManagerService: Requested status bar icon for non-badged user 0
08-27 11:45:49.867 16243 16420 D Sentry  : {"detail":"Sentry dropped data due to a quota or internal rate limit being reached. This will not affect your application. See https://docs.sentry.io/product/accounts/quotas/ for more information."}
08-27 11:45:49.868 16243 16420 E newrelic: TransactionStateUtil: Attempting to convert network exception java.io.FileNotFoundException to error code.
08-27 11:45:49.869 16243 16420 D Sentry  : The transport failed to send the envelope with response code 429
08-27 11:45:49.869 16243 16420 E Sentry  : Envelope submission failed
08-27 11:45:49.869 16243 16420 E Sentry  : java.lang.IllegalStateException: The transport failed to send the envelope with response code 429
08-27 11:45:49.869 16243 16420 E Sentry  : 	at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:320)
08-27 11:45:49.869 16243 16420 E Sentry  : 	at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:243)
08-27 11:45:49.869 16243 16420 E Sentry  : 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
08-27 11:45:49.869 16243 16420 E Sentry  : 	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
08-27 11:45:49.869 16243 16420 E Sentry  : 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
08-27 11:45:49.869 16243 16420 E Sentry  : 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
08-27 11:45:49.869 16243 16420 E Sentry  : 	at java.lang.Thread.run(Thread.java:1012)
08-27 11:45:49.869 16243 16420 D Sentry  : Marking envelope submission result: false
08-27 11:45:49.869 16243 16418 D Sentry  : Deleted file /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/a3196e5f-7b85-40aa-8e2d-d34e118b75f4.envelope.
08-27 11:45:49.870 16243 16420 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/42dd5fdd-1a1b-44a6-a785-bb3479c9ac74.envelope
08-27 11:45:49.873 16243 16420 D TrafficStats: tagSocket(113) with statsTag=0xffffffff, statsUid=-1
08-27 11:45:49.970 16243 16418 D Sentry  : Finished processing cached files from /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b
08-27 11:45:49.970 16243 16418 D Sentry  : EnvelopeFileObserverIntegration installed.
08-27 11:45:49.970 16243 16418 D Sentry  : Started processing cached files from /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/outbox
08-27 11:45:49.970 16243 16418 D Sentry  : Processing dir. /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/outbox
08-27 11:45:49.971 16243 16418 D Sentry  : Processing 0 items from cache dir /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/outbox
08-27 11:45:49.971 16243 16418 D Sentry  : Finished processing cached files from /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/outbox
08-27 11:45:49.972 16243 16418 D Sentry  : Last ANR marker does not exist. /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/last_anr_report.
08-27 11:45:49.972 16243 16418 D Sentry  : No ANRs have been found in the historical exit reasons list.
08-27 11:45:49.975 16243 16418 D Sentry  : SystemEventsBreadcrumbsIntegration installed.
08-27 11:45:49.976 16243 16418 I Sentry  : TYPE_AMBIENT_TEMPERATURE is not available.
08-27 11:45:49.976 16243 16418 W Sentry  : Current session is not ended, we'd need to end it.

08-27 11:45:49.992 16243 16420 D Sentry  : Request failed, API returned 429
08-27 11:45:49.992 16243 16420 D Sentry  : {"detail":"Sentry dropped data due to a quota or internal rate limit being reached. This will not affect your application. See https://docs.sentry.io/product/accounts/quotas/ for more information."}

08-27 11:45:49.993 16243 16420 D Sentry  : The transport failed to send the envelope with response code 429
08-27 11:45:49.993 16243 16420 E Sentry  : Envelope submission failed
08-27 11:45:49.993 16243 16420 E Sentry  : java.lang.IllegalStateException: The transport failed to send the envelope with response code 429
08-27 11:45:49.993 16243 16420 E Sentry  : 	at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:320)
08-27 11:45:49.993 16243 16420 E Sentry  : 	at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:243)
08-27 11:45:49.993 16243 16420 E Sentry  : 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
08-27 11:45:49.993 16243 16420 E Sentry  : 	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
08-27 11:45:49.993 16243 16420 E Sentry  : 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
08-27 11:45:49.993 16243 16420 E Sentry  : 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
08-27 11:45:49.993 16243 16420 E Sentry  : 	at java.lang.Thread.run(Thread.java:1012)
08-27 11:45:49.993 16243 16420 D Sentry  : Adding Envelope to offline storage: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/f3571357-bf19-4850-9f4e-b8f79c837b96.envelope
08-27 11:45:49.994 16243 16420 D Sentry  : Serializing object: {
08-27 11:45:49.994 16243 16420 D Sentry  : 	"sid": "a092c943-fe82-4fed-9191-a5adbe6afdd3",
08-27 11:45:49.994 16243 16420 D Sentry  : 	"did": "61465103-2379-49ba-8f47-b74661841da2",
08-27 11:45:49.994 16243 16420 D Sentry  : 	"started": "2024-08-27T18:45:34.834Z",
08-27 11:45:49.994 16243 16420 D Sentry  : 	"status": "exited",
08-27 11:45:49.994 16243 16420 D Sentry  : 	"seq": 1724784349978,
08-27 11:45:49.994 16243 16420 D Sentry  : 	"errors": 0,
08-27 11:45:49.994 16243 16420 D Sentry  : 	"duration": 15.144,
08-27 11:45:49.994 16243 16420 D Sentry  : 	"timestamp": "2024-08-27T18:45:49.978Z",
08-27 11:45:49.994 16243 16420 D Sentry  : 	"attrs": {
08-27 11:45:49.994 16243 16420 D Sentry  : 		"release": "[email protected]+0",
08-27 11:45:49.994 16243 16420 D Sentry  : 		"environment": "staging"
08-27 11:45:49.994 16243 16420 D Sentry  : 	}
08-27 11:45:49.994 16243 16420 D Sentry  : }

08-27 11:45:50.115 16243 16420 D Sentry  : Envelope sent successfully.
08-27 11:45:50.117 16243 16420 D Sentry  : Discarding envelope from cache: /data/user/0/com.servicemaxinc.fsa/cache/sentry/9a6fd60b1b08379eb3a904f87bea04d4e91dbd9b/f3571357-bf19-4850-9f4e-b8f79c837b96.envelope
08-27 11:45:50.117 16243 16420 D Sentry  : Envelope flushed

And yes, I have the sample rate set at 1.0:

_experiments: {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      },

I also tried replaysSessionSampleRate: 0 and the result is the same, works on iOS but not on Android.

@krystofwoldrich
Copy link
Member

Thank you for the logs,

based on

08-27 11:45:49.368 16243 16334 I Sentry  : Session replay is disabled, no sample rate specified

the Session Replay feature does not initialize on the Android layer.

It's likely due to unfinished init due to:

08-27 11:45:49.359 16243 16334 E Sentry  : com.facebook.react.bridge.UnexpectedNativeTypeException: Value for dist cannot be cast from Double to String

Are you setting dist in Sentry options?

@moonfoan
Copy link
Author

moonfoan commented Sep 3, 2024

@krystofwoldrich Indeed I used the build number for the dist value, which is a large numeric value on Android side. I'm a bit surprised since it didn't seem to cause any issue on crash reporting with the Sentry SDK. After I convert the value with toString(), now the Session Replay is showing up! Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

2 participants