status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.89k stars 984 forks source link

App is killed/crashed while in the background with enabled push notifications #20697

Open qoqobolo opened 2 months ago

qoqobolo commented 2 months ago

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:

  1. Have the device on mobile network
  2. Recover the Status user
  3. Enable push notifications
  4. Add User2 to contacts
  5. Kill the app
  6. Lock the device screnn
  7. Start sending messages from Device1 to Status User
  8. Wait for 3-10 mins
  9. Unlock the device with Status User
  10. Open the app

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

cammellos commented 2 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

Horupa-Olena commented 1 month ago

@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.