Android Question Crashlytics error report

Bob Spielen

Active Member
Licensed User
Im getting the message from my clients smartphone moto g(6) plus android 9.

Fatal Exception: java.lang.RuntimeException: Unable to instantiate service anywheresoftware.b4a.objects.FirebaseNotificationsService: java.lang.ClassNotFoundException: Didn't find class "anywheresoftware.b4a.objects.FirebaseNotificationsService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/b4a.ptscholle-W_SiSVd9FNuxam67nt1Smw==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.ptscholle-W_SiSVd9FNuxam67nt1Smw==/lib/arm64, /system/lib64, /vendor/lib64]]


at android.app.ActivityThread.handleCreateService(ActivityThread.java:3736)
at android.app.ActivityThread.access$1400(ActivityThread.java:213)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1826)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6923)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
 

Attachments

  • crash1.txt
    1.1 KB · Views: 293
  • Manifest.txt
    4.8 KB · Views: 316
  • Libs.png
    Libs.png
    21.1 KB · Views: 288
Last edited:

Michael2150

Member
Licensed User
It seems to be something with the Firebase Notification Service as the error says. Are you using that in the app and do you have it set up properly?
I had a look at the manifest you added and it seems to me that you didn't setup the Firebase Notifications / Push messages tutorial.

Try reading through this tutorial done by Erel to set up the Firebase Notifications service.

It will show you where to put in these lines to your manifest and set up the service.

B4X:
'============================= FIREBASE =====================================
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'======================== Firebase notifications ============================ 
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
 
Upvote 0

Bob Spielen

Active Member
Licensed User
@Michael2150 Thank you very much for your reply. I followed all the instruction previously...... Must say the only difference I realized in the manifest was the order of the lines of the macros. I fixed and lets see if this was the cause... anyway thanks a lot!!

I tested it and strange that it happens only one time....at the first run after the first installation.....
 
Last edited:
Upvote 0

Michael2150

Member
Licensed User
Sorry Bob I only realized I should've scrolled down a bit more and then I saw those lines. But the error still says " Unable to instantiate service anywheresoftware.b4a.objects.FirebaseNotificationsService: " do you have a service called "FirebaseMessaging" that can be called when the message arrives at the app?
 
Upvote 0

Bob Spielen

Active Member
Licensed User
@Michael2150 "FirebaseMessaging" ? ....Nope, thats new for me. I will check in the forum....
But does Crashlytics send messages to the app?
I wrote on #3 " I tested it and strange that it happens only one time....at the first run after the first installation..... " what could it be.....
 
Last edited:
Upvote 0

Michael2150

Member
Licensed User
No but the error seems to be coming from that. Do you have firebase push notifications set up? Look at my previous link how to set up Firebase Notifications they need a service called "FirebaseMessaging"
Look at step 2 of this tutorial.

Keep in mind I dont know if this is exactly the problem but If you tried to impliment firebase notifications, which I think you did as I can see it in your manifest because you added the "CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)" line then you need that " FirebaseMessaging " service explained in the above mentioned step 2 to handle the Notifications received.
 
Upvote 0
Top