Android Question App crashes- Notificationlistener [Solved]

Multiverse app

Active Member
Licensed User
As mentioned here: https://www.b4x.com/android/forum/t...hes-due-to-starter-service-not-running.91661/ in newer B4A versions, when the app is reopened after a long time, the Starter service fails to start. After the app launch, it takes 5-10 seconds to start the Starter service.
The crashes haven't stopped even after updating to B4A 8.30 (which was supposed to fix them).
If the user interacts with any element before that time (which, they will), the app crashes. without any error log.

More than 4,000 crashes occur every week, and a large number of users are uninstalling the app because of these crashes. This seems to happen in only my biggest project. And so, I cannot replicate the issue.


logs-

B4X:
-Start-                                           '<---- App starts
State: 16842910
State: 16843597
-End-
Yeah, it is!
** Activity (main) Resume **
Starting Intent: no extras
#-auth_TokenAvailable, Success=true
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Starting Intent: no extras
mobile data state: CONNECTED wifi_on: 0 server ip: 10.1.106.168
wifi ip: 127.0.0.1
InternetCommands                                                 '<----------- THE APP CRASHES HERE
Notification internal service created
*** Service (starter) Create ***                             '<----------- THE SERVICE STARTS AFTER THE APP CRASH
FirebaseAuth initialized
** Service (starter) Start **
mobile data state: CONNECTED wifi_on: 0 server ip: 10.1.106.168
wifi ip: 127.0.0.1
mobile data state: CONNECTED wifi_on: 0 server ip: 10.1.106.168
wifi ip: 127.0.0.1
onAuthStateChanged: com.google.firebase.auth.internal.zzj@dbcc5ee
Error getting consent state: java.lang.Exception: Unable to resolve host "adservice.google.com": No address associated with hostname
Consent state: NON_PERSONALIZED
Consent state: NON_PERSONALIZED
EU: false
Voice initialization failed
** Service (notificationservice) Start **
** Service (notificationservice) Start **
** Service (notificationservice) Start **
** Service (notificationservice) Start **
** Service (notificationservice) Start **
** Service (notificationservice) Start **
** Service (notificationservice) Start **
** Service (notificationservice) Start **
Can something be done?
Help will be really appreciated!
 
Last edited:

Erel

Administrator
Staff member
Licensed User
As mentioned here: https://www.b4x.com/android/forum/t...hes-due-to-starter-service-not-running.91661/ in newer B4A versions, when the app is reopened after a long time, the Starter service fails to start.
The issue discussed in that thread was fixed and confirmed to be fixed in v8.30.

Parts of the logs are missing. Where is Activity Create message? The starter service should not be started again until the process is killed.
Are you stopping the starter service? Are you explicitly starting the starter service?
 

Erel

Administrator
Staff member
Licensed User
This is indeed not related to link posted in the first post.
The logs, when a notification message arrives while the process is not running, should look like this:


** Receiver (firebasemessaging) OnReceive **
*** Service (starter) Create ***
** Service (starter) Start **
** Service (firebasemessaging) Create **
** Service (firebasemessaging) Start **
Message arrived
Message data: {body=2, title=2}


The receiver should be the first line.

If it is not then it is likely that you are using an old version of FirebaseNotifications.
The latest version is 1.21. Make sure that there isn't any old copy of FirebaseNotifications in the internal libraries folder.
 

Multiverse app

Active Member
Licensed User
The logs, when a notification message arrives while the process is not running, should look like this:
Hi Erel,
I am sorry, but I do not understand. There was no Firebasenotification sent in the entire runtime. The service is just initialized.
 

DonManfred

Expert
Licensed User
Last edited:
Top