DP-3T / dp3t-sdk-android

The DP3T-SDK for Android
Mozilla Public License 2.0
242 stars 94 forks source link

NullPointerException on TracingErrorsBroadcastReceiver #224

Open m0skit0 opened 3 years ago

m0skit0 commented 3 years ago

Hi, an app developer reported this NPE happening on some devices. It looks like the encrypted preferences could not be created and left as null.

java.lang.RuntimeException: 
  at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:972)
  at android.os.Handler.handleCallback (Handler.java:743)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:150)
  at android.app.ActivityThread.main (ActivityThread.java:5621)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:794)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:684)
Caused by: java.lang.NullPointerException: 
  at org.dpppt.android.sdk.internal.storage.ExposureDayStorage.getExposureDaysInternal (ExposureDayStorage.java:69)
  at org.dpppt.android.sdk.internal.storage.ExposureDayStorage.getExposureDays (ExposureDayStorage.java:85)
  at org.dpppt.android.sdk.DP3T.getStatus (DP3T.java:210)
  at org.dpppt.android.sdk.internal.TracingErrorsBroadcastReceiver.onReceive (TracingErrorsBroadcastReceiver.java:51)
  at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:962)
  at android.os.Handler.handleCallback (Handler.java:743)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:150)
  at android.app.ActivityThread.main (ActivityThread.java:5621)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:794)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:684)