Android Question Again error with firebase-auth FirebaseAuth after SDK update

Alex Guerrero

Member
Licensed User
Hi, I updated the SDK libraries a few moments ago and I was presented with the following error:


error_auth.png

B4X:
Sub Service_Create
    auth.Initialize("auth") ' <---------- line error
End Sub

B4X:
*** Service (starter) Create ***
FirebaseAuth initialized
Error occurred on line: 31 (Starter)
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.firebase.auth.FirebaseAuth.addAuthStateListener(com.google.firebase.auth.FirebaseAuth$AuthStateListener)' on a null object reference
    at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:57)
    at com.tugaraje.tuapp.starter._service_create(starter.java:206)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:357)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at com.tugaraje.tuapp.starter.onCreate(starter.java:56)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2898)
    at android.app.ActivityThread.-wrap4(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5459)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

I am using B4A 8.30 release this week, android-27 and targetSdkVersion = "26".

To continue working, change version 16.0.1 to 15.1.0 in the file installed-components.txt
com.google.firebase\:firebase-auth=15.1.0 <----
 
Top