Closed rogerbriggen closed 1 year ago
Hello, @rogerbriggen, thanks for getting in touch with us! Unfortunately, we were unable to reproduce the behavior you described. Could you please provide repro steps and verbose logs.
Hi @aleksandr-dorofeev , I don't know the steps nor can I reproduce it mayself but I have these crashlogs in appcenter from our app. The crash was 17 times while we have maybe 10 testers... so it happens. But you can see in the stacktrace that the problem comes from appcenter distribute... so we have probably to get rid of it because it crashes our app.
Could you provide verbose logs in this case?
Sure. Where do I get then the output of these logs?
You can find the AppCenter logs in the output of your IDE.
Then I cannot. As I have written, the phones are not connected to my computer. It would be helpful if we could get a callback for the log entries or you support ILogger
Sorry for the misunderstanding. In this case, could you clarify how you launch the application? Do you use AppCenter tests?
No. We just use Crash, Analytics and Distribute in our app, otherwise we don't use any service of app center. The app is created with MAUI. Currently, I just see several crashes inside appcenter with the above stacktrace which means, that app center sdk is crashing my app. I also think, that the stack trace is quite clear, so catching the exception or checking for null inside the app center is appreciated. The other option is to disable app center distribute since the stack trace seems quite clear about it.
Hi @rogerbriggen , this looks like a duplicate of https://github.com/microsoft/appcenter-sdk-android/issues/1610 and https://github.com/microsoft/appcenter-sdk-android/issues/1645. It was fixed in https://github.com/microsoft/appcenter-sdk-android/pull/1622 and released in 4.5.3.
Based on your stack trace it looks like the version of AppCenter SDK is prior this fix ( < 4.5.3). Please check the versions of your app for these crashes. There should not be a version which uses SDK 4.5.3 or higher.
Hi @DmitriyKirakosyan As I have written, we use appcenter sdk 5.0.0 Preview 1... So, this is seems there is a regression
Version 5.0.0-preview.1 uses Android native SDK of version 4.5.5.
From your call stack:
com.microsoft.appcenter.distribute.Distribute.registerReceiver Distribute.java:612
com.microsoft.appcenter.distribute.Distribute.onActivityResumed Distribute.java:550
These lines are not relevant to the appcenter android sdk code of version 4.5.5. So, I'm confused how you ended up having this call stack with version 5.0.0-preview.1.
Have you ever published your app with AppCenter DotNet SDK of version 4.5.1 or lower?
Have you tried to identify the testers who face this crash? You can use setUserId API for that. Is it possible to contact them and ask to gather the app logs? Make sure you enabled verbose logging and published the app with this change.
I close this issue because of inactivity. Please feel to reopen it, in case problem still persist, or you have any questions.
Description
We see crashed of our app because of appcenter sdk
Repro Steps
Please list the steps used to reproduce your issue.
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:612 com.microsoft.appcenter.distribute.Distribute.onActivityResumed Distribute.java:550 android.app.Application.dispatchActivityResumed Application.java:430 android.app.Activity.dispatchActivityResumed Activity.java:1400 android.app.Activity.onResume Activity.java:1966 androidx.fragment.app.FragmentActivity.onResume FragmentActivity.java:434 android.app.Instrumentation.callActivityOnResume Instrumentation.java:1491 android.app.Activity.performResume Activity.java:8280 android.app.ActivityThread.performResumeActivity ActivityThread.java:4923 android.app.ActivityThread.handleResumeActivity ActivityThread.java:4972 android.app.servertransaction.ResumeActivityItem.execute ResumeActivityItem.java:60 android.app.servertransaction.ActivityTransactionItem.execute ActivityTransactionItem.java:45 android.app.servertransaction.TransactionExecutor.executeLifecycleState TransactionExecutor.java:176 android.app.servertransaction.TransactionExecutor.execute TransactionExecutor.java:97 android.app.ActivityThread$H.handleMessage ActivityThread.java:2345 android.os.Handler.dispatchMessage Handler.java:106 android.os.Looper.loopOnce Looper.java:233 android.os.Looper.loop Looper.java:344 android.app.ActivityThread.main ActivityThread.java:8210 java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:584 com.android.internal.os.ZygoteInit.main ZygoteInit.java:1034
Details
AppCenter.LogLevel = LogLevel.Verbose
before your call toAppCenter.Start(...)
and include the logs here: