You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug 🐛 InsightsEventDOMapper is crashing when obfuscating with R8 due to the Kotlinx Serializer. I have managed to workaround it by adding the following Proguard rules:
-keep,includedescriptorclasses class com.algolia.instantsearch.insights.internal.data.local.model.InsightsEventDO$$serializer { *; }
-keepclassmembers class com.algolia.instantsearch.insights.internal.data.local.model.InsightsEventDO {
*** Companion;
}
-keepclasseswithmembers class com.algolia.instantsearch.insights.internal.data.local.model.InsightsEventDO {
kotlinx.serialization.KSerializer serializer(...);
}
I believe the fix should be to change the serialization calls in InsightsEventDOMapper to pass InsightsEventDO.serializer() as the first parameter.
Environment:
Library version: 3.3.0
Additional context
Stack trace:
Fatal Exception: kotlinx.serialization.SerializationException: Serializer for class 'b' is not found.
Mark the class as @Serializable or provide the serializer explicitly.
at kotlinx.serialization.internal.Platform_commonKt.serializerNotRegistered(Platform.common.kt:91)
at kotlinx.serialization.internal.PlatformKt.platformSpecificSerializerNotRegistered(Platform.kt:29)
at kotlinx.serialization.SerializersKt__SerializersKt.serializer(Serializers.kt:60)
at kotlinx.serialization.SerializersKt.serializer(Serializers.kt:1)
at com.algolia.instantsearch.insights.internal.data.local.mapper.InsightsEventDOMapper.map(InsightsEventDOMapper.kt:20)
at com.algolia.instantsearch.insights.internal.data.local.InsightsPrefsRepository.asJsonString(InsightsPrefsRepository.kt:21)
at com.algolia.instantsearch.insights.internal.data.local.InsightsPrefsRepository.append(InsightsPrefsRepository.kt:16)
at com.algolia.instantsearch.insights.internal.cache.InsightsEventCache.save(InsightsEventCache.kt:11)
at com.algolia.instantsearch.insights.internal.InsightsController.track(InsightsController.kt:180)
at com.algolia.instantsearch.insights.internal.InsightsController.clicked(InsightsController.kt:173)
at com.algolia.instantsearch.insights.internal.InsightsController.clickedObjectIDsAfterSearch(InsightsController.kt:115)
at com.algolia.instantsearch.insights.HitsAfterSearchTrackable$DefaultImpls.clickedObjectIDsAfterSearch$default(HitsAfterSearchTrackable.kt:57)
The text was updated successfully, but these errors were encountered:
tbra91
added a commit
to tbra91/instantsearch-android
that referenced
this issue
Aug 15, 2023
Describe the bug 🐛
InsightsEventDOMapper
is crashing when obfuscating with R8 due to the Kotlinx Serializer. I have managed to workaround it by adding the following Proguard rules:I believe the fix should be to change the serialization calls in
InsightsEventDOMapper
to passInsightsEventDO.serializer()
as the first parameter.Environment:
Additional context
Stack trace:
The text was updated successfully, but these errors were encountered: