Android Question Firebase Notifications error

Multiverse app

Active Member
Licensed User
After I updated to FirebaseNotifications v1.21, I get the following error-

*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
firebasemessaging_subscribetotopics (java line: 193)
java.lang.NoSuchMethodError: No virtual method subscribeToTopic(Ljava/lang/String;)Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in /data/app/com.multiverse.jarvis--jD2eZqBgk4cxZaIifQD9Q==/base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at com.multiverse.jarvis.firebasemessaging._subscribetotopics(firebasemessaging.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1154)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)




This is everything related to Firebase declared in the manifest-
B4X:
'************ Firebase Ads ************
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
'************ Firebase Ads (end) ************

'************ Google Play Services Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
'************ Google Play Services Base (end) ************

'************ Firebase Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'************ Firebase Base (end) ************

'************ Firebase Notifications ************
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
'************ Firebase Notifications (end)************

'************ Firebase Auth ************
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
'************ Firebase Auth (end) ************

'************ Firebase Analytics ************
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
'************ Firebase Analytics (end) ************

Am i missing something here?
 

Multiverse app

Active Member
Licensed User
firebase-messaging version should be 17.0.0

Make sure to clean the project (Ctrl + P) after you update the SDK.
still same

I also get

starter_service_create (java line: 681)
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.multiverse.jarvis.starter._service_create(starter.java:681)
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.multiverse.jarvis.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3542)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1786)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)


At-
B4X:
Sub Service_Create
'For firebase notifications
   CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
End Sub
 
Top