cookie-information / android-release

0 stars 2 forks source link

ConsentPreferences crash #23

Closed Oliver1123 closed 10 months ago

Oliver1123 commented 1 year ago

CookieInformation SDK crashed on application start:

Fatal Exception: java.util.NoSuchElementException: Collection is empty. at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:201) at com.cookieinformation.mobileconsents.storage.ConsentPreferences.getAllConsentChoicesWithType(ConsentPreferences.kt:50) at com.cookieinformation.mobileconsents.storage.ConsentStorage.getAllConsentChoicesWithType(ConsentStorage.kt:124) at com.cookieinformation.mobileconsents.MobileConsentSdk$getSavedConsentsWithType$2.invokeSuspend(MobileConsentSdk.kt:129) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Our assumption is that something is wrong with mapping UUIDs from usersConsentsPreferences with consentsTypePreferences inside the library after the consents were updated in the admin tool.

HannahShulman commented 10 months ago

Hello! My apologies for the late response. This has been fixed in the last version - 2.0.1

Please update the library, and let me know if I can help out with anything else. Thanks