Android Question FirebaseAuthEx Error

yiankos1

Active Member
Licensed User
Good morning.
I use @DonManfred lib "FirebaseAuthEx - Extends FirebaseAuth functionality".
When i run this code from a service:
B4X:
authX.createUserWithEmailAndPassword(user_email,user_password)
i get this error:
B4X:
Error occurred on line: 163 (Starter)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
    at de.donmanfred.FirebaseAuthExWrapper.createUserWithEmailAndPassword(FirebaseAuthExWrapper.java:142)
    at com.dreamon.seeida.starter._registercheck_result(starter.java:425)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at anywheresoftware.b4a.BA$2.run(BA.java:360)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5942)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
** Activity (login) Pause, UserClosed = true **
** Service (starter) Destroy **

when i run it from Activity module, everything works fine.
Any ideas?
 
Last edited:

DonManfred

Expert
Licensed User
Seems that this method needs to be called from an Activity.
You can use CallSubDelayed to call a sub in your activity which then sends the request.

PD: Unfortunately i lost the source from this lib (my HDD crash a few months ago) so i can not change anything.
 
Upvote 0

yiankos1

Active Member
Licensed User
Seems that this method needs to be called from an Activity.
You can use CallSubDelayed to call a sub in your activity which then sends the request.

PD: Unfortunately i lost the source from this lib (my HDD crash a few months ago) so i can not change anything.
Thank you for the answer. I did that way too, but i thought if there was any other way fixing this. Such a pity for your hdd... keep up the good work Don.
 
Upvote 0

yiankos1

Active Member
Licensed User
yes, lost a lot of sources. sh** happens ;)
Maybe i´ll do another one.
I´m playing with the ui bindings.. But nothing useable at the moment
As i see at github, it is more simplified the whole process with ui bindings. Thank you in advance.
 
Upvote 0
Top