microsoft / appcenter-sdk-android

Development repository for the App Center SDK for Android
Other
276 stars 134 forks source link

Fatal Exception: java.lang.NullPointerException Attempt to invoke interface method 'boolean android.content.SharedPreferences.getBoolean(java.lang.String, boolean)' on a null object reference #1645

Closed kyh8496 closed 2 years ago

kyh8496 commented 2 years ago

Description

Fatal Exception: java.lang.NullPointerException Attempt to invoke interface method 'boolean android.content.SharedPreferences.getBoolean(java.lang.String, boolean)' on a null object reference

com.microsoft.appcenter.utils.storage.SharedPreferencesManager.getBoolean (SharedPreferencesManager.java:68) com.microsoft.appcenter.AbstractAppCenterService.isInstanceEnabled (AbstractAppCenterService.java:136) com.microsoft.appcenter.distribute.Distribute.registerReceiver (Distribute.java:617) com.microsoft.appcenter.distribute.Distribute.onActivityStarted (Distribute.java:545) android.app.Application.dispatchActivityStarted (Application.java:414)

androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:246) net.deali.buyer.base.BindingActivity.onStart (BindingActivity.kt:65) android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1433)

com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)

Please describe the issue you are facing using the SDK.

Repro Steps

Please list the steps used to reproduce your issue.

This issue appears intermittently on Crashlytics.

Details

  1. Which SDK version are you using?
    • com.microsoft.appcenter:appcenter-distribute. 4.4.3
  2. Which OS version did you experience the issue on?
    • android 10 , 11, 12
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • Galaxy Z Flip3 5G , Galaxy S22+ , Galaxy A31 , Galaxy S21+ 5G , Galaxy Note20 Ultra 5G, LG G7 ThinQ
  4. What third party libraries are you using?
    • androidx , kotlinx , coroutine , eventBus , tedPermission, firebase , glide
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here: not applied yet
MatkovIvan commented 2 years ago

Duplicate of #1610, already fixed in latest version

kyh8496 commented 2 years ago

thank you