Android Question FireBase RuntimeException

ilan

Expert
Licensed User
Longtime User
hi

i am getting lately some crash reports in my console on android 8 in my firebase service.
i have followed the tutorial (how serviced are working in android 8) and also the firebase tutorial but still get those crashes. the weird thing is that i am not sending any push messages to the devices so it happens i guess on app start where i initialize firebase or something like that.

any ideas why i am getting it?

 

ilan

Expert
Licensed User
Longtime User
1. Are you using B4A v8?

2. Are you starting the starter service yourself?

1, yes i am using b4a 8

2, in starter service create i have this:

B4X:
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics") 'notification test
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Have you set FirebaseMessaging service to be a sticky service? Is there any service that start at boot?

hi erel,

no, i have not set the FireBaseService to as sticky service. as i remember correctly it is not set to a sticky service in the tutorial too. should it be a sticky service?

i have 2 services running, the starter service and the firebaseservice.
i think the starter service starts on boot (i just have not my pc infront of me.)
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
ok then sorry, it is set to false because i have not change anything, i left it as B4A created the Project. So if B4A is creating it with FALSE then it is set to FALSE.

i just saw another crash report.


this is 100% created with b4a 8 because i see the version of the App and it is a new version.

this is how it looks like:

 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Are you using a custom implementation of StartServiceAt, similar to this one: https://www.b4x.com/android/forum/t...estartatexact-not-accurate.65117/#post-412286 ?

no.

i just receive another crash report from firebase (i have not sent any notifications since last week)

maybe it gives more informations:


EDIT: it says app is in background, not allowed to start service ???
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
If you like you can send me the project and I'll try to see what causes it.

the whole project? its a big app that uses lots of lib. i dont want to waste your time

anyway thanks for your great support.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
You can also add Sleep(10000) before starting FirebaseMessaging from the starter service.

Ok when i get to my pc i will look at it closer.

The only thing that should start the service is a notification or the starter service.

If the app is in background and a notification arrives the service should start right? Even if app is in background.

Does it first start the starter service or only the firebaseservice? (I mean a notification)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
If the app is in background and a notification arrives the service should start right? Even if app is in background.
Yes.

Does it first start the starter service or only the firebaseservice? (I mean a notification)
The starter service will be started when the process is started.

A possible cause of this error is the usage of an old FirebaseNotifications.jar. Open the internal libraries folder and check the size of FirebaseNotifications.jar. It should be 9506 bytes.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…