Open qoqobolo opened 4 months ago
07-09 16:13:52.365 2540 5134 W AwareLog: KillShrinker: AbnormProcInfo kill pid=26187 07-09 16:13:52.365 1031 1047 I AwareLog: IAWARE_PROC_KILL 07-09 16:13:52.365 1031 1047 I AwareLog: Sending signal. PID: 26187 SIG: 9 07-09 16:13:52.369 2540 5134 W AwareLog: KillShrinker: AbnormProcInfo kill pid=26218
The app is getting killed, Sig 9
@cammellos @churik Hi! I tried to reproduce this bug but without success. I tested it on Android 13 with medium battery charge, during the transition to low battery, and with low battery charge.
I've also tried to reproduce this issue and was unable to get the same error. I tested on a Pixel 7a running Android 14, and I even enabled battery saver mode with the "extreme battery saver" settings that will pause apps, and I was still able to receive notifications.
Perhaps there are some other ways that will cause Android to stop the background task for notifications? I'm not sure how that's possible, but I can try looking into other ways for that to happen if the current reproduction steps don't cause this glitch atm.
might be related to https://github.com/status-im/status-mobile/issues/20985 https://github.com/status-im/status-mobile/issues/20930#issuecomment-2440078108
07-09 16:13:52.664 1624 2727 W ActivityManager: Scheduling restart of crashed service im.status.ethereum/.pushnotifications.ForegroundService in 1000ms
...
07-09 16:13:53.702 1624 1959 I ActivityManager: Start proc 28347:im.status.ethereum/u0a1253 for service {im.status.ethereum/im.status.ethereum.pushnotifications.ForegroundService}
07-09 16:13:53.710 28347 28347 E libc : Access denied finding property "persist.device_config.runtime_native.use_app_image_startup_cache"
07-09 16:13:53.711 28347 28347 E status.ethereu: LoadAppImageStartupCache enabled : 1
07-09 16:13:53.704 28347 28347 W status.ethereu: type=1400 audit(0.0:72405): avc: denied { read } for pid=28347 name="u:object_r:device_config_runtime_native_prop:s0" dev="tmpfs" ino=1
07-09 16:13:53.712 28347 28347 I status.ethereu: Reinit property: dalvik.vm.checkjni= false
07-09 16:13:53.712 28347 28347 I status.ethereu: ReInitProperties: persist.vm.debug.dumpapi= false
07-09 16:13:53.715 28347 28347 E status.ethereu: Not starting debugger since process cannot load the jdwp agent.
To ensure the app doesn’t get killed while in the background, we need to disable battery optimization for the app. I'm not sure, but we will likely also need to show a popup explaining why we need this permission and might also have to justify it when publishing the app.
Interestingly, we can manually simulate the doze standby mode for testing this bug, as detailed here: Testing Doze.
I'm not sure, but we will likely also need to show a popup explaining why we need this permission and might also have to justify it when publishing the app.
Bug Report
Problem
I tried to reproduce the issue with the proposed preconditions: mobile network, low battery, Android device, enabled push notifications, and restored Status user with the Status community.
I was able to reproduce the case when the app was killed/crashed while in the background although push notifications were enabled. The steps I tried were:
Expected behavior: the app is opened without password/biometrics
Actual behavior: you need to enter the password/use biometrics which means that the app was killed. The notification background service is stopped until login.
However, the app also behaved the same way a couple of times without receiving messages - I just left it in the background for a while and locked the screen, but when I opened it I was asked for a password to log into the app.
Also, the issue did not always reproduce - in about half of the attempts.
Logs
bckgrncrash12.log
Additional Information