Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
DataStore Component used:
DataStore Version used: 1.0.0 Devices/Android versions reproduced on: Tecno/12
If this is a bug in the library, we would appreciate if you could attach:
java.lang.Throwable: androidx.datastore.preferences.PreferencesProto$PreferenceMap cannot be cast to androidx.datastore.preferences.protobuf.GeneratedMessageLite$ExtendableMessage at androidx.datastore.preferences.protobuf.ExtensionSchemaLite.getMutableExtensions(ExtensionSchemaLite.java:60) at androidx.datastore.preferences.protobuf.MessageSetSchema.mergeFromHelper(MessageSetSchema.java:243) at androidx.datastore.preferences.protobuf.MessageSetSchema.mergeFrom(MessageSetSchema.java:227) at androidx.datastore.preferences.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:1531) at androidx.datastore.preferences.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:1670) at androidx.datastore.preferences.PreferencesProto$PreferenceMap.parseFrom(PreferencesProto.java:192) at androidx.datastore.preferences.PreferencesMapCompat$Companion.readFrom(PreferencesMapCompat.kt:31) at androidx.datastore.preferences.core.PreferencesSerializer.readFrom(PreferencesSerializer.kt:46) at androidx.datastore.core.SingleProcessDataStore.readData(SingleProcessDataStore.kt:381) at androidx.datastore.core.SingleProcessDataStore.readDataOrHandleCorruption(SingleProcessDataStore.kt:359) at androidx.datastore.core.SingleProcessDataStore.readAndInit(SingleProcessDataStore.kt:322) at androidx.datastore.core.SingleProcessDataStore.readAndInitOrPropagateFailure(SingleProcessDataStore.kt:311) at androidx.datastore.core.SingleProcessDataStore.handleRead(SingleProcessDataStore.kt:261) at androidx.datastore.core.SingleProcessDataStore.access$getFile(SingleProcessDataStore.kt:76) at androidx.datastore.core.SingleProcessDataStore.access$handleRead(SingleProcessDataStore.kt:76) at androidx.datastore.core.SingleProcessDataStore$actor$3.invokeSuspend(SingleProcessDataStore.kt:239) at androidx.datastore.core.SingleProcessDataStore$actor$3.invoke(SingleProcessDataStore.kt) at androidx.datastore.core.SingleProcessDataStore$actor$3.invoke(SingleProcessDataStore.kt) at androidx.datastore.core.SimpleActor$offer$2.invokeSuspend(SimpleActor.kt:122) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(TaskImpl.kt:103) 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)
We tried to replicate the issue on Samsung, Pixel, and Emulator but were not successful. We then attempted to add breakpoints in the library to better understand the issue. During our investigation, we observed that on the user's device, the GeneratedMessageLite is generating a MessageSetSchema instead of a MessageSchema. This anomaly might have led to the encountered issue. It's worth mentioning that on our own devices, the variable isMessageSetWireFormat was set to "false," and we experienced MessageSchema being generated without any issue.
Could you look into this issue and help us out? I'd be grateful if you could extend your assistance and support towards solving this problem.