B4A Library FirebaseAuth - Authenticate your users

Status
Not open for further replies.

Rajesh Krishnan

Member
Licensed User
Hey Erel,
Following the steps uv given for the user authentication, on executing the firebase example gives an error telling package name doesnt match. But how would we get the package name without once running the code.
 

itgirl

Active Member
Licensed User
Longtime User
running the example using my own google-json and after changing the package name i get this error
B4X:
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 339)
android.content.res.Resources$NotFoundException: String resource ID #0x0
    at android.content.res.Resources.getText(Resources.java:1334)
    at android.content.res.Resources.getString(Resources.java:1428)
    at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:64)
    at natchcenter.com.refuni.main._activity_create(main.java:339)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
    at natchcenter.com.refuni.main.afterFirstLayout(main.java:102)
    at natchcenter.com.refuni.main.access$000(main.java:17)
    at natchcenter.com.refuni.main$WaitForLayout.run(main.java:80)
    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:5951)
    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:1400)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

any one has an idea whats going on ?

with mainfest set to
B4X:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="25"/>

testing on Galaxy S4 with android 5
 

itgirl

Active Member
Licensed User
Longtime User
I don't recommend you to set the targetSdkVersion to 25. There might be side effects that you are unaware of.

It looks like a problem with google-services.json. Try to download it again.
actually it was 23 but i tried 25 to see if the error goes away , i tried to download google-services.json 3 times and the error still exists. by the way in the same project i have firebase FCM and firebase ads working like a charm just auth lib causes this error
B4X:
auth.Initialize("auth")
.
also i tried uninstall and reinstall
 

itgirl

Active Member
Licensed User
Longtime User
The json file downloaded is missing required fields.

It should include this field: "client_type": 3

Try to make a few changes in Firebase console and download a new json file.

If it doesn't help then try to create a new Firebase project.
Automated json file from firebase console is always buggy for me, changes to a project not always take effect in google-services.json but it always works after 2nd or 3rd download but with this auth didnt work even 4th download :/ can i edit the file manually and add the missing fields?
 

itgirl

Active Member
Licensed User
Longtime User
Confirmed , for further help any one whos facing the same issue as the one mentioned in #63 you MUST delete the whole project not the app and re create it in order to work , it's a bug reported many times in FireBase

Happy coding
 

desof

Well-Known Member
Licensed User
Longtime User
Why does this happen with Facebook that some emails are not displayed?

 

Intiwhiz

Member
Licensed User
Dear @Erel,

I have trouble while compile the program, it show picture below

Your assistance really appriciated

Thanks
 

Attachments

  • 3rr0r.png
    30 KB · Views: 303

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Phone sign-in method is now enabled .
Can we have a library or this one source code ?
Thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…