microsoft / appcenter-sdk-android

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

NullPointerException with StartServiceLog causes crash #1584

Closed alvindizon closed 2 years ago

alvindizon commented 2 years ago

Description

We updated the app from 4.3.1 to 4.4.1, and during the course of or testing we noticed that the app crashes during login. We couldn't reproduce this in other devices though, only in a Pixel 3a that's on Android 12. We tried it in an emulator but we couldn't reproduce it.

Repro Steps

Please list the steps used to reproduce your issue.

  1. Enter email and login
  2. App crashes

I apologise if details are scarce but I'd just like to bring this to your attention, as we have logs from the error that may provide some insight on your end.

Details

  1. Which SDK version are you using?
    • 4.4.1
  2. Which OS version did you experience the issue on?
    • Android 12
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • Pixel 3a (physical device)
  4. What third party libraries are you using?
    • Auth0 for login, Sentry for logging errors, etc.
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
    at com.microsoft.appcenter.ingestion.models.StartServiceLog.read(StartServiceLog.java:76)
    at com.microsoft.appcenter.ingestion.models.json.DefaultLogSerializer.readLog(DefaultLogSerializer.java:51)
    at com.microsoft.appcenter.ingestion.models.json.DefaultLogSerializer.deserializeLog(DefaultLogSerializer.java:64)
    at com.microsoft.appcenter.persistence.DatabasePersistence.getLogs(DatabasePersistence.java:499)
    at com.microsoft.appcenter.channel.DefaultChannel.triggerIngestion(DefaultChannel.java:480)
    at com.microsoft.appcenter.channel.DefaultChannel.access$400(DefaultChannel.java:50)
    at com.microsoft.appcenter.channel.DefaultChannel$GroupState$1.run(DefaultChannel.java:890)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.os.HandlerThread.run(HandlerThread.java:67)
AnastasiaKubova commented 2 years ago

Hi! Thanks for getting in touch with us! I will label this as a bug.

AnastasiaKubova commented 2 years ago

Hi! The fix has been released, so I'm going to close this issue. Feel free to reopen it if you will have additional questions.

alvindizon commented 2 years ago

Thanks @AnastasiaKubova , the fix solved the issue that we faced with the Pixel 3a device.