Android Question Firebase Auth can't initialize

tsteward

Well-Known Member
Licensed User
Longtime User
I have FBase crashlytics and push messages working but I cannot get login with Google using FBase auth to initialise
I get the attached error below
On searching this in the forum the solution is to update kotlin-stdlib-1.7.21. I can find and download this jar file but where do I put it?

Error occurred on line: 205 (B4XMainPage)
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:462)
at android.content.res.Resources.getString(Resources.java:555)
at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:82)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:22)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:275)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:150)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.keywords.Common$15.run(Common.java:1804)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
 

aeric

Expert
Licensed User
Longtime User
So far the only reference I can find to kotlin-stdlib1.6.10 is in OkHttp which I don't use. Unless another library requests that one
It is used by OkHttpUtils2.

edit:
That's it!
I try adding OkHttpUtils2 library in the project. I got the error.

I replace the dependsOn value for OkHttp.xml with
B4X:
<dependsOn>kotlin-stdlib-1.7.21</dependsOn>
Refresh the Libraries Manager with rightclick and it compiles.

Perhaps we should make a wish to Erel to update the OkHttp library.
 

Attachments

  • OkHttp.xml
    15.1 KB · Views: 39
Last edited:
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
So I changed OkHTTP to use 1.7.21 and no longet get the error caused by two Kotlin references Yay
but auth.initialize still creates error unfortnatly

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Device locale: en
Found 221 strings.
*** mainpage: B4XPage_Appear
** Activity (main) Resume **
Error occurred on line: 205 (B4XMainPage)
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:462)
at android.content.res.Resources.getString(Resources.java:555)
at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:82)
at lishi.assistand.tony.stewardgmail.com.b4xmainpage$ResumableSub_B4XPage_Created.resume(b4xmainpage.java:3851)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:275)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:150)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.keywords.Common$15.run(Common.java:1804)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
auth.initialize
 

Attachments

  • 2.png
    2.png
    77 KB · Views: 38
Upvote 0

aeric

Expert
Licensed User
Longtime User
I check my project, I initialized it in Starter service.

Starter.bas:
Sub Process_Globals
    Public auth As FirebaseAuth
End Sub

Sub Service_Create
    auth.Initialize("auth")
    'facebook.Initialize
End Sub
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
I check my project, I initialized it in Starter service.

Starter.bas:
Sub Process_Globals
    Public auth As FirebaseAuth
End Sub

Sub Service_Create
    auth.Initialize("auth")
    'facebook.Initialize
End Sub
Same problem. I'm wondering if there is a problem with firebase setup but surely it has not even connected at that point? Has it?
Logger connected to: Google Pixel 8 Pro
--------- beginning of main
*** Service (starter) Create ***
Error occurred on line: 35 (Starter)
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:462)
at android.content.res.Resources.getString(Resources.java:555)
at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:82)
at lishi.assistand.tony.stewardgmail.com.starter._service_create(starter.java:1321)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at lishi.assistand.tony.stewardgmail.com.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4912)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2407)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
** Service (starter) Start **
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Can you share your Manifest Editor?

Do you have something like this?
B4X:
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
 
Upvote 0
Top