babylonhealth/certificate-transparency-android

NullPointerException in LogListJsonParserV2.parseJson

ikeed opened this issue · 2 comments

ikeed commented

Our Android users are having an intermittent issue with the following stack trace:

We're using v0.3.0 of your lib. Please let me know what other info would be of interest to you.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference at libcore.reflect.TypeVariableImpl.hashCode(TypeVariableImpl.java:47) at java.util.HashMap.hash(HashMap.java:338) at java.util.HashMap.containsKey(HashMap.java:595) at java.util.HashSet.contains(HashSet.java:203) at com.google.gson.internal.$Gson$Types.resolve(.java:346) at com.google.gson.internal.$Gson$Types.resolve(.java:381) at com.google.gson.internal.$Gson$Types.resolve(.java:337) at com.google.gson.internal.$Gson$Types.getSupertype(.java:283) at com.google.gson.internal.$Gson$Types.getCollectionElementType(.java:302) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:52) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.Gson.fromJson(Gson.java:926) at com.google.gson.Gson.fromJson(Gson.java:892) at com.google.gson.Gson.fromJson(Gson.java:841) at com.google.gson.Gson.fromJson(Gson.java:813) at com.babylon.certificatetransparency.internal.loglist.parser.LogListJsonParserV2.parseJson(LogListJsonParserV2.java:36) at com.babylon.certificatetransparency.internal.loglist.parser.RawLogListToLogListResultTransformer.transformSuccess(RawLogListToLogListResultTransformer.java:51) at com.babylon.certificatetransparency.internal.loglist.parser.RawLogListToLogListResultTransformer.transform(RawLogListToLogListResultTransformer.java:35) at com.babylon.certificatetransparency.internal.loglist.LogListDataSourceFactory$create$2.invoke(LogListDataSourceFactory.java:49) at com.babylon.certificatetransparency.internal.loglist.LogListDataSourceFactory$create$2.invoke(LogListDataSourceFactory.java:29) at com.babylon.certificatetransparency.datasource.DataSource$oneWayTransform$1.get(DataSource.java:113) at com.babylon.certificatetransparency.datasource.DataSource$oneWayTransform$1$get$1.invokeSuspend(DataSource.java:11) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:241) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:594) at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.java:60) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:740)

I suspect this is an issue on our end but any help you can provide would be greatly appreciated.

I've been unable to reproduce this although I do note the same stack trace from Gson, google/gson#1778, so the bug may sit outside the library.

I still want to look for a work around so any additional data you have such as devices affected, OS version etc would be most useful.