microsoft / appcenter-sdk-android

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

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference #1598

Closed BaloghTamas closed 2 years ago

BaloghTamas commented 2 years ago

Description

We had received multiple crashes, with the following crashlog:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference

com.microsoft.appcenter.ingestion.models.StartServiceLog.read StartServiceLog.java:76
com.microsoft.appcenter.ingestion.models.json.DefaultLogSerializer.readLog DefaultLogSerializer.java:51
com.microsoft.appcenter.ingestion.models.json.DefaultLogSerializer.deserializeLog DefaultLogSerializer.java:64
com.microsoft.appcenter.persistence.DatabasePersistence.getLogs DatabasePersistence.java:499
com.microsoft.appcenter.channel.DefaultChannel.triggerIngestion DefaultChannel.java:480
com.microsoft.appcenter.channel.DefaultChannel.access$400 DefaultChannel.java:50
com.microsoft.appcenter.channel.DefaultChannel$GroupState$1.run DefaultChannel.java:890
android.os.Handler.handleCallback Handler.java:938

Based on that it seems something is wrong with the code here as it assumes IS_ONE_COLLECTOR_ENABLED is part of the JSON, but it is not.

Repro Steps

I am not able to reproduce this issue, but we see crash report with that

Details

  1. Which SDK version are you using? 4.4.1
  2. Which OS version did you experience the issue on? Not relevant
  3. What device version did you see this error on? Were you using an emulator or a physical device? Not relevant
  4. What third party libraries are you using? Many, not relevant
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here: This happens in production, where we don't log verbose severity, and in debug we are not able to repro.
BaloghTamas commented 2 years ago

Looks like this is fixed in 4.4.2 https://github.com/microsoft/appcenter-sdk-android/pull/1585/files, closing this issue