justynth / Friend_Builder

1 stars 4 forks source link

[Bug] App crashing after clicking save in profile #153

Closed Nazat95 closed 6 years ago

Nazat95 commented 6 years ago

Description: The app crashes when I press"SAVE" in Profile. After installing it the first time I opened the app and signed in. Then pressed EDIT under Description. Without changing anything when I press SAVE the app crashes.

Device: Nexus 6P running 8.1.1 (API 27)

wzheng23 commented 6 years ago

Can you recreate the bug from the sign up stage up until the save button click?

wzheng23 commented 6 years ago

You can post screenshots where necessary and we will get to the bottom of this.

Nazat95 commented 6 years ago

Hello, this is the link to the video for this bug: https://drive.google.com/file/d/1JMyWcxuljrN6XLpWP1109Vy4EVV8QUGf/view?usp=sharing

btackett3 commented 6 years ago

W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Fallback D/AndroidRuntime: Shutting down VM

              --------- beginning of crash

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.cse442.friend_builder, PID: 3116 java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.android.gms.common.api.GoogleApi.zzb(com.google.android.gms.common.api.internal.zzdd)' on a null object reference at com.google.android.gms.internal.zzdvv.zzb(Unknown Source:4) at com.google.android.gms.internal.zzdwc.setFirebaseUIVersion(Unknown Source:12) at com.google.firebase.auth.FirebaseAuth.setFirebaseUIVersion(Unknown Source:2) at com.firebase.ui.auth.AuthUI.(AuthUI.java:211) at com.firebase.ui.auth.AuthUI.getInstance(AuthUI.java:247) at com.firebase.ui.auth.AuthUI.getInstance(AuthUI.java:235) at com.cse442.friend_builder.LoginActivity$2.onAuthStateChanged(LoginActivity.java:305) at com.google.firebase.auth.zzi.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

btackett3 commented 6 years ago

That's on a fresh device. It seems to stop crashing if you change an interest, save, then edit - save without doing anything.

btackett3 commented 6 years ago

I think I may have found the exact problem. When the user edits, then saves, a new user object is created. If the location isn't found, two of the parameters in the constructor are given bad inputs. I will make a pull request soon.

btackett3 commented 6 years ago

Actually, that doesn't seem to have solved it.