didomi / react-native

Didomi SDK for React Native
Other
9 stars 2 forks source link

Android crash "lateinit property component has not been initialized" #51

Closed Minishlink closed 2 years ago

Minishlink commented 2 years ago

Hello, we have some crashes in production on Android. I don't see any Android SDK repo so I'm leaving this here (we're using the React Native module though)

Android SDK version 1.64.0 Happens on a variety of devices and Android versions (11, 12...)

Caused by kotlin.UninitializedPropertyAccessException: lateinit property component has not been initialized
       at io.didomi.sdk.c2.a(SourceFile:1)
       at io.didomi.sdk.Didomi.getComponent$android_release(SourceFile:4)
       at io.didomi.sdk.u0.onAttach(SourceFile:1)
       at androidx.fragment.app.Fragment.performAttach(Fragment.java:2954)
       at androidx.fragment.app.FragmentStateManager.attach(FragmentStateManager.java:463)
       at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:254)
       at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
       at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1374)
       at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2841)
       at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:2773)
       at androidx.fragment.app.FragmentController.dispatchCreate(FragmentController.java:251)
       at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:252)
       at com.facebook.react.GoogleCastActivity.onCreate(GoogleCastActivity.java:51)
       at android.app.Activity.performCreate(Activity.java:8290)
       at android.app.Activity.performCreate(Activity.java:8270)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4009)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8663)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
jawadst commented 2 years ago

@Minishlink I'll relay this one to the team. I'd recommend reaching out to support@didomi.io for urgent issues.

nicolas-chaix-didomi commented 2 years ago

Thanks @Minishlink, We have identified the issue and a fix will be soon available. I will let you know once a new release is available.

nicolas-chaix-didomi commented 2 years ago

Hello @Minishlink, The fix for your issue should be fixed by using the last Android SDK: https://developers.didomi.io/cmp/mobile-sdk/android/versions#1.66.0-august-26-2022

A new React-Native SDK embedding the very last native SDKs will be released soon.

Minishlink commented 2 years ago

Thanks @nicolas-chaix-didomi!