Closed akshuu closed 8 years ago
I'm going to work on this issue now. plan to create shared-trips under user-trips:userId
done
@qianqian121 i just got a crash when I clicked the "Friends trip". I clicked the "yellowstone" trip (which is urs) and I got a crash.
4.920 7526-8063/com.grp10.codepath.travelmemo I/qtaguid: Tagging socket 85 with tag 3000110100000000{805310721,0} uid -1, pid: 7526, getuid(): 10717 09-01 23:13:44.930 7526-7526/com.grp10.codepath.travelmemo D/AndroidRuntime: Shutting down VM 09-01 23:13:44.930 7526-7526/com.grp10.codepath.travelmemo E/UncaughtException: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.grp10.codepath.travelmemo.firebase.Trip.getIsFavorite()' on a null object reference at com.grp10.codepath.travelmemo.activities.ViewTripActivity$2.onDataChange(ViewTripActivity.java:219) at com.google.firebase.database.Query$1.onDataChange(Unknown Source) at com.google.android.gms.internal.zzaie.zza(Unknown Source) at com.google.android.gms.internal.zzaje.zzcta(Unknown Source) at com.google.android.gms.internal.zzajh$1.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7224) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 09-01 23:13:44.940 7526-7596/com.grp10.codepath.travelmemo I/FA: Tag Manager is not found and thus will not be used 09-01 23:13:44.960 7526-8065/com.grp10.codepath.travelmemo I/qtaguid: Untagging socket 79 09-01 23:13:45.020 7526-8063/com.grp10.codepath.travelmemo I/qtaguid: Untagging socket 40 09-01 23:13:45.130 7526-7526/com.grp10.codepath.travelmemo D/FirebaseCrashApiImpl: throwable java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.grp10.codepath.travelmemo.firebase.Trip.getIsFavorite()' on a null object reference 09-01 23:13:45.180 7526-7526/com.grp10.codepath.travelmemo E/AndroidRuntime: FATAL EXCEPTION: main Process: com.grp10.codepath.travelmemo, PID: 7526 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.grp10.codepath.travelmemo.firebase.Trip.getIsFavorite()' on a null object reference at com.grp10.codepath.travelmemo.activities.ViewTripActivity$2.onDataChange(ViewTripActivity.java:219) at com.google.firebase.database.Query$1.onDataChange(Unknown Source) at com.google.android.gms.internal.zzaie.zza(Unknown Source) at com.google.android.gms.internal.zzaje.zzcta(Unknown Source) at com.google.android.gms.internal.zzajh$1.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7224) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 09-01 23:13:45.180 7721-7721/com.grp10.codepath.travelmemo:background_crash I/FirebaseCrashReceiverServiceImpl: FirebaseCrashReceiverServiceImpl created by ClassLoader com.google.android.chimera.container.internal.DelegateLastPathClassLoader[DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/0000000b/DynamiteModulesC_GmsCore_prodmnc_xxhdpi_release.apk"],nativeLibraryDirectories=[/data/user/0/com.google.android.gms/app_chimera/m/0000000b/n/armeabi-v7a, /data/user/0/com.google.android.gms/app_chimera/m/0000000b/n/armeabi, /vendor/lib, /system/lib]]] 09-01 23:13:45.180 7721-7721/com.grp10.codepath.travelmemo:background_crash D/FirebaseCrashReceiverServiceImpl: onCreate 09-01 23:13:45.180 7721-8276/com.grp10.codepath.travelmemo:background_crash D/FirebaseCrashReceiverServiceImpl: Saving crash 09-01 23:13:45.250 7721-7721/com.grp10.codepath.travelmemo:background_crash I/FirebaseCrashSenderServiceImpl: FirebaseCrashSenderServiceImpl created by ClassLoader com.google.android.chimera.container.internal.DelegateLastPathClassLoader[DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/0000000b/DynamiteModulesC_GmsCore_prodmnc_xxhdpi_release.apk"],nativeLibraryDirectories=[/data/user/0/com.google.android.gms/app_chimera/m/0000000b/n/armeabi-v7a, /data/user/0/com.google.android.gms/app_chimera/m/0000000b/n/armeabi, /vendor/lib, /system/lib]]] 09-01 23:13:4
if the trip owner is the logged in user, then we should show the trip in my trips, else if he is traveller , then they should be in the Friends trip