Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't pass null for argument 'pathString' in child() #32

Open
nicoe222 opened this issue May 20, 2018 · 2 comments
Open

Can't pass null for argument 'pathString' in child() #32

nicoe222 opened this issue May 20, 2018 · 2 comments

Comments

@nicoe222
Copy link

Can't pass null for argument 'pathString' in child()

i've been following your tutorial and i got this error on my firebasemethod.java

any idea? thanks

@thealpha
Copy link

His @nicoe222 @mitchtabian Is no longer going to fix this project , I have faced lot of bugs and fixed it , you can say whats your problem I ll give you another solution

@purnendrasingh
Copy link

hey @thealpha @nicoe222 i am facing same issue.
User authentication gets successful but writing to database fails after pressing register button on register activity (Lecture 26,Insert new User Data).
it show:-
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.purnendra.insta_clone_app, PID: 17974
java.lang.NullPointerException: Can't pass null for argument 'pathString' in child()
at com.google.firebase.database.DatabaseReference.child(Unknown Source)
at com.google.firebase.database.DataSnapshot.child(Unknown Source)
at com.purnendra.insta_clone_app.Utils.FireBaseMethods.checkIfUserNameExists(FireBaseMethods.java:59)
at com.purnendra.insta_clone_app.Login.RegisterActivity$2$1.onDataChange(RegisterActivity.java:150)
at com.google.firebase.database.zzp.onDataChange(Unknown Source)
at com.google.android.gms.internal.firebase_database.zzfc.zza(Unknown Source)
at com.google.android.gms.internal.firebase_database.zzgx.zzdr(Unknown Source)
at com.google.android.gms.internal.firebase_database.zzhd.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

Problem is at:-
for (DataSnapshot ds:dataSnapshot.child(userID).getChildren())
in Firebasemethod.
from
if (fireBaseMethods.checkIfUserNameExists(userName, dataSnapshot))
RegisterActivity.

It would be great if you could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants