Skip to content

InvalidProtocolBufferException: Protocol message tag had invalid wire type. #5320

Open
@kobayashikanata

Description

@kobayashikanata

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: _ Android Studio Electric Eel | 2022.1.1 ____
  • Firebase Component: _crashlytics,analytics (Database, Firestore, Storage, Functions, etc)
  • Component version: com.google.firebase:firebase-bom:32.2.2_

[REQUIRED] Step 3: Describe the problem

On play console crash details I can see about 200+ user has this crash. Please tell me how to fix it?
Android-OS-Version: 7,8,11,13
AGP: 7.3.1
Google-services: 4.3.15
Firebase-Bom: 32.2.2

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Relevant Code:


Exception java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: androidx.datastore.core.CorruptionException: Unable to parse preferences proto.
  at android.app.ActivityThread.installProvider (ActivityThread.java:8215)
  at android.app.ActivityThread.installContentProviders (ActivityThread.java:7746)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7566)
  at android.app.ActivityThread.access$1500 (ActivityThread.java:301)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2177)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:246)
  at android.app.ActivityThread.main (ActivityThread.java:8653)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Caused by androidx.datastore.core.CorruptionException: Unable to parse preferences proto.
  at androidx.datastore.preferences.PreferencesMapCompat$Companion.readFrom (PreferencesMapCompat.kt:33)
  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$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:106)
  at kotlinx.coroutines.internal.LimitedDispatcher.run (LimitedDispatcher.kt:42)
  at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:95)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:570)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:750)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:677)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:664)
Caused by androidx.datastore.preferences.protobuf.InvalidProtocolBufferException: Protocol message tag had invalid wire type.
  at androidx.datastore.preferences.protobuf.GeneratedMessageLite.parsePartialFrom (GeneratedMessageLite.java:1537)
  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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions