com.google.firebase.database.DatabaseException

tip

Firebase Database considers public fields and JavaBean-like getters and setters when serializing/deserializing JSON. A public field with a getter and a setter may cause this exception. Try to change to private or removing getter and setter.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Firebase Parsing Error
    via Stack Overflow by Hannes
    ,
  • App crash on Feed
    via GitHub by MrThiago
    ,
    • com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type com.brueller.model.PostModel at com.google.android.gms.internal.zzaix.zzd(Unknown Source) at com.google.android.gms.internal.zzaix.zzb(Unknown Source) at com.google.android.gms.internal.zzaix.zza(Unknown Source) at com.google.firebase.database.DataSnapshot.getValue(Unknown Source) at com.firebase.ui.database.FirebaseRecyclerAdapter.parseSnapshot(FirebaseRecyclerAdapter.java:147) at com.firebase.ui.database.FirebaseRecyclerAdapter.getItem(FirebaseRecyclerAdapter.java:136) at com.firebase.ui.database.FirebaseRecyclerAdapter.onBindViewHolder(FirebaseRecyclerAdapter.java:176) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5471) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5504) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4741) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4617) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1994) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1390) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1353) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:574) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3028) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2906) at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1482) at android.support.v7.widget.RecyclerView.access$400(RecyclerView.java:147) at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4037) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:886) at android.view.Choreographer.doCallbacks(Choreographer.java:698) at android.view.Choreographer.doFrame(Choreographer.java:630) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:872) at android.os.Handler.handleCallback(Handler.java:743) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:5639) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:805) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)

    Users with the same issue

    malhobayyeb
    8 times, last one,
    Unknown visitor1 times, last one,
    Eduvm
    9 times, last one,