Android Question Latest SDK update breaks FirebaseAuth Library

Discussion in 'Android Questions' started by johndb, May 26, 2018.

  1. johndb

    johndb Active Member Licensed User

    I did my regular SDK update which included several Firebase updates.
    Firebase authentication which worked perfectly fine prior to the update is now broken.

    Before someone asks ... B4A 8.0 Target SDK 26, previous fully updated with B4A 8.0 update recommendations. Note: My app worked well before the SDK update.

    The following error occurs during the initialization of a FirebaseAuth instance.

    Code:
    *** Service (starter) Create ***
    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.scsoftwarestudios.aicalc.antennas.starter._service_create(starter.java:
    459)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:710)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:342)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:249)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    139)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    166)
        at com.scsoftwarestudios.aicalc.antennas.starter.onCreate(starter.java:
    56)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    3339)
        at android.app.ActivityThread.-wrap4(Unknown Source:
    0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1677)
        at android.os.Handler.dispatchMessage(Handler.java:
    106)
        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)
    ** 
    Service (starter) Start **
    Any help would be appreciated.
     
    Last edited: May 26, 2018
  2. KMatle

    KMatle Expert Licensed User

  3. Erel

    Erel Administrator Staff Member Licensed User

    The issue with Firebase Messaging is fixed in v1.21: https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-591400

    The issue with Firebase Auth looks like a bug in the latest version of Firebase Auth SDK (firebase-auth 16.0.1). For now you should use the previous version.

    Open B4A Sdk Manager folder and find: extras\b4a_remote\installed-components.txt
    Open this file, search for com.google.firebase\:firebase-auth=
    Change the version to 15.1.0
     
    Last edited: Jun 17, 2018
  4. Filippo

    Filippo Expert Licensed User

    I do not have this version anymore, where can I download it?
     
  5. inakigarm

    inakigarm Well-Known Member Licensed User

    DonManfred and Filippo like this.
  6. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice