Android Question firebase google auth problem

Tomas Petrus

Active Member
Licensed User
Longtime User
I have 20+ apps in B4A that are using google auth throught firebase
Now with new app I have this issue.

Google auth doesnt work u click but after some point you get Error 10 from the API. So I thought OK maybe there are too many apps in the google-service.json
So to fix this I have created new project and add just this one app but now App doesnt even start I get
this error

1710233075510.png



the same error was solved here
but I dont see the solution there.

any advice ?
 

Tomas Petrus

Active Member
Licensed User
Longtime User
Also if I compare string is JSON in current big project for some app where is everything working with this new app strings there is this part missing:
{
"client_id": "XXX",
"client_type": 1,
"android_info": {
"package_name": "XXX",
"certificate_hash": "XXX"
}
},
 
Last edited:
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
Yes I am sure.
It didn't work with devel local key and then after upload on GPlay store it is signed with Google and it doesnt work even then with google SHA-1.
I thought that i made mistake so i cleaned app on firebase and copied both keys again and even then it is not working..

only difference I see is that package name is a bit shorter then usual it is cz.esol.wogo
Usually the last part is longer then 4 characters...
But I dont see anywhere why this could matter and cause this kind of error...
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
when using original firebase project with 20+apps:
SignInWithGoogle.ResultArrived
ResultArrived Error: com.google.android.gms.common.api.ApiException: 10:
** Activity (main) Resume **
Auth_SignError: (ApiException) com.google.android.gms.common.api.ApiException: 10:
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
when using new project with only this app:
java.lang.RuntimeException: android.content.res.Resources$NotFoundException: String resource ID #0x0
    at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1750)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:240)
    at android.os.Looper.loop(Looper.java:351)
    at android.app.ActivityThread.main(ActivityThread.java:8377)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
    at android.content.res.Resources.getText(Resources.java:475)
    at android.content.res.Resources.getString(Resources.java:572)
    at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:82)
    at cz.esol.wogo.jhrmainpage$ResumableSub_JHRPage_Created.resume(jhrmainpage.java:341)
    at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1748)
    ... 8 more
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
Now creating another new app - exaclty same process like with 20 apps before and also like with the last one the same problem...
may be something has changed on firebase part ? like the google services json is little different for newly created apps ?
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
View attachment 151793

The error happens because the oauth_client is missing from your configuration file. It is missing because you haven't enabled Google sign-in option.
thanks erel, this is correct for the new project I tried... to solve the problem with
but the original problem in original firebase project with 20+ apps have this already enabled otherwise the auth in previous apps could work and it is working, just last 2 apps have this problem...

with API 10 error
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
If you find it then why don't you post it and let me create a new project with all the settings???
I am not sure if I understand, I just found out that new project doesnt have this enabled, thanks to your comment. I originally missed that settings on new project... my bad..

I will try those new 2 apps to configure to use the new project with google auth enabled and we will see if it works..

I am just asking what could be the problem with the original project ... that those 2 new apps cannot authenticate .. google auth in the project is obviously enabled and older apps working without problem.

This is the orriginal error that I am trying to solve with the new project..and I dont understand the cause of it...

thanks
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
Confirmation:
one firebase project can sucesfully hold only aprox 20 apps. even if now they let you create 30 apps in one project the apps exceding number 20 will have authentication problems with google if u are using it.

The only solution I find out and it is working is to create new project with google signing enabled and use it for new apps ...
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Confirmation:
one firebase project can sucesfully hold only aprox 20 apps. even if now they let you create 30 apps in one project the apps exceding number 20 will have authentication problems with google if u are using it.

The only solution I find out and it is working is to create new project with google signing enabled and use it for new apps ...
I create a new project for each app - except that if I have an app that's released on Android & iOS, I will put them both in the same project. I find it easier from an admin POV.

- Colin.
 
Upvote 0
Top