Skip to content

Runtime Exceptions are not handled and causing crash for users on Android #556

Open
@amit-hinge

Description

@amit-hinge

We are using react native app in which we have Iterable integrated.

App is getting crashed in first few seconds(5-6 seconds) on launch with below stacktrace.
Iterable version: "@iterable/react-native-sdk": "1.3.18",

Below is the error being reported to our error reporting tool:

IterableApi must be initialized before calling getInAppManager(). Make sure you call IterableApi#initialize() in Application#onCreate

Stack trace:

com.iterable.iterableapi.IterableApi in getInAppManager at line 575
com.iterable.iterableapi.IterableFirebaseMessagingService in handleMessageReceived at line 74
com.iterable.iterableapi.IterableFirebaseMessagingService in onMessageReceived at line 22
com.google.firebase.messaging.FirebaseMessagingService in dispatchMessage at line 12
com.google.firebase.messaging.FirebaseMessagingService in passMessageIntentToSdk at line 8
com.google.firebase.messaging.FirebaseMessagingService in handleMessageIntent at line 3
com.google.firebase.messaging.FirebaseMessagingService in handleIntent at line 3
com.google.firebase.messaging.EnhancedIntentService in lambda$processIntent$0$com-google-firebase-messaging-EnhancedIntentService at line 1
com.google.firebase.messaging.EnhancedIntentService$$ExternalSyntheticLambda1 in run at line 6
java.util.concurrent.ThreadPoolExecutor in runWorker at line 1167
java.util.concurrent.ThreadPoolExecutor$Worker in run at line 641
com.google.android.gms.common.util.concurrent.zza in run at line 2
java.lang.Thread in run at line 919

Device details:


Device
Battery Level - 80%
Brand - Lenovo
connection_type - wifi
Family - Lenovo
Free Memory- 778.6 MiB
Free Storage - 3.4 GiB
Low Memory - false
Model- Lenovo TB-8505F (QP1A.190711.020)
Simulator- false
Storage Size- 8.7 GiB

Iterable initialisation code:

initializeIterable({
      linkingListenerRef,
      isInAppMessagingEnabled,
      shouldPauseInAppMessages,
      refetchUnreadMessages,
      dispatch,
      checkInitialUrl,
    });
Iterable.initialize(Config.lib.iterable[BuildInfo.releaseType], config).then(
    (status: boolean) => {
      iterableInitialized = status;
      onAppStateChange("active");
    },
  );

Calling above in useEffect for Navigation Container

Let me know if any additional details are required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions