0

It crashes when the login button is pressed. Plz guide how to solve this Problem

The app shows this error

com.google.firebase.database.DatabaseException: 
  at com.google.firebase.database.core.utilities.encoding.CustomClassMapper$BeanMapper.<init> (CustomClassMapper.java)
  at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.loadOrCreateBeanMapperForClass (CustomClassMapper.java:12)
  at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertBean (CustomClassMapper.java)
  at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.deserializeToClass (CustomClassMapper.java)
  at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertToCustomClass (CustomClassMapper.java)
  at com.google.firebase.database.DataSnapshot.getValue (DataSnapshot.java)
  at com.usama.usamamart.LoginActivity$4.onDataChange (LoginActivity.java)
  at com.google.firebase.database.Query$1.onDataChange (Query.java:7)
  at com.google.firebase.database.core.ValueEventRegistration.fireEvent (ValueEventRegistration.java)
  at com.google.firebase.database.core.view.DataEvent.fire (DataEvent.java:2)
  at com.google.firebase.database.core.view.EventRaiser$1.run (EventRaiser.java)
  at android.os.Handler.handleCallback (Handler.java:888)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:213)
  at android.app.ActivityThread.main (ActivityThread.java:8178)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • You might also take into consideration checking this [answer](https://stackoverflow.com/questions/60719791/firebase-firestore-variable-name-changed/60719948#60719948). – Alex Mamo Jun 28 '21 at 16:54

1 Answers1

0

Most likely you have not configured ProGuard correctly to ignore your data classes, that you use to read data from the database.

It's hard to say precisely what you did wrong, given the lack of details in your question, so the best I can recommend is to read the documentation on configuring ProGuard.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • I am sure that I have configured it correctly. The App was working well on the emulator but it caused login problem as I published it. Now it crases as I hit on login button. – Digital Passion Jun 28 '21 at 15:01