Android Question firebase error

elitevenkat

Active Member
Licensed User
Longtime User
the b4a firebase app was running fine in my windows 7 pc (same code still runs in w7). when i try to run the same in windows 10 system i get this error.
running b4a7.8



Logger connected to: samsung SM-G615F
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
--------- beginning of system
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
firebasemessaging_service_create (java line: 163)
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.firebase.iid.FirebaseInstanceId.zza(java.lang.String)' on a null object reference
at com.google.firebase.messaging.FirebaseMessaging.subscribeToTopic(Unknown Source)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:126)
at com.eoos.android.firebasemessaging._service_create(firebasemessaging.java:163)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at com.eoos.android.firebasemessaging.onCreate(firebasemessaging.java:55)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3534)
at android.app.ActivityThread.-wrap6(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1732)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
--------- beginning of crash
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The point is that - with the newest SDK Components - you need to use the new Library available at that link because the Manifest Macro
I guess it should work in 7.8. too.

You can easily check:
- Make backup of firebaseanalytics library (internal Library folder)
- Download the new and put it into the INTERNAL Library folder (NOT Additional libs)
- Check the Firebaseintegration from the tutorial again (follow the "For older versions" Snippets)
https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/
I think the integration-code for the manifest needs a change...

- Check if you get the same message
 
Upvote 0
Top