signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.63k stars 6.15k forks source link

[Bug][Notifications] Signal freezes device completely when receiving a message containing media when screen is OFF #12306

Closed x2k13 closed 1 year ago

x2k13 commented 2 years ago

Signal version: 5.40.4.1 Android OS: Android 11/crDroid 7.19 Device: Samsung Galaxy S5 (SM-G900F) Rooted: No

Bug description As the title says already, upon receiving a message containing media when screen is OFF leads to a full freeze of the device, without any way to unlock it other than force-reboot/removing the battery, which is pretty annoying when it happens a few times a day. The only way to prevent this is to disable notifications for Signal system-wide, but that's not how a messenger should work, right? 🙂

Thanks in advance for looking into this. I would have provided a log, but when the freeze occurs, even Matlog/Logcat crashes and stops recording the log, so the useful info doesn't get recorded at all.

Steps to reproduce See above

Edit: added URL to log file https://debuglogs.org/android/5.40.4/65c687a50e08e5ed955375d7b55f6442726faa0ab3c58c72dc482c131c9b5dda

alex-signal commented 2 years ago

Thanks in advance for looking into this. I would have provided a log, but when the freeze occurs, even Matlog/Logcat crashes and stops recording the log, so the useful info doesn't get recorded at all.

Signal will log into a database, so those logs aren't lost! If you can upload a debug log and add it to your description it'd be a great help.

x2k13 commented 2 years ago

Thanks in advance for looking into this. I would have provided a log, but when the freeze occurs, even Matlog/Logcat crashes and stops recording the log, so the useful info doesn't get recorded at all.

Signal will log into a database, so those logs aren't lost! If you can upload a debug log and add it to your description it'd be a great help.

Added the URL to the log to the description, thanks for the hint! I hope this helps.

cody-signal commented 2 years ago

Are the images you are receiving large or of a specific type? Does it happen with every image? Did this start happening recently or has this been a problem for awhile? Did you recently update crDroid?

While this isn't a fix, but can get you running again, you can change the notification setting for "Show" to be just the name only and then it won't try to show image previews.

x2k13 commented 2 years ago

Are the images you are receiving large or of a specific type? Does it happen with every image? Did this start happening recently or has this been a problem for awhile? Did you recently update crDroid?

While this isn't a fix, but can get you running again, you can change the notification setting for "Show" to be just the name only and then it won't try to show image previews. Yes, this has been a problem for a while, but I waited to report it, because it could have been fixed by the next updates automagically, but that didn't happen.

I really can't say if it's acertain type or size of images, but the ones I receive are usually .jpeg and .png, but just regular 72 ppi.

crDroid (which is a fork of LineageOS 18.1) is receiving monthly updates (monthly patch from Google), and I'm always on the latest version, for obvious reasons. But the problem existed since I installed Signal and there have been at least 3 updates since.

Addition to my OP: I found out that it's not only attached media, but links and their preview as well. I followed your advice and set the notification settings to just show names, no crashes since then. At least now I can unlock my phone and the app without a hard crash.

cody-signal commented 2 years ago

Thanks for the extra details. This is tough one and seems to be very OS specific. We put a fix in recently to use different ways of providing the data to the OS but it seems some don't like it.

JohnnyMT commented 2 years ago

A friend and I are also experiencing this issue 1-2 times a week. This started a few months back, but we also had it with screen on. Signal version: 5.44.5 Android OS: 10 Device: Honor 20 YAL-L21 Rooted: No

I have an debug log one week ago, after the hard reboot: https://debuglogs.org/android/5.43.7/af8b8f344d128a571999008cb8929d74cd83dbb1763160d13bd08345465d89d0

cody-signal commented 2 years ago

Thanks for the details @JohnnyMT, could you provide some of the file sizes of the media you observe this occurring with? Roughly ballpark is good enough.

vanMacG commented 2 years ago

For me, this happens only on some random images/media... (see #11828). I have the same device as op (Samsung Galaxy S5 (SM-G900F), but with stock LineageOS.

JohnnyMT commented 2 years ago

Thanks for the details @JohnnyMT, could you provide some of the file sizes of the media you observe this occurring with? Roughly ballpark is good enough.

Just had the issue again, 523kb image. Debug log: https://debuglogs.org/android/5.45.6/4131e77733a821a86d5347fa4ed6168858232617506c6c0645449d2bd0a25ac4

JohnnyMT commented 2 years ago

@cody-signal and it was definitely with screen on

vanMacG commented 2 years ago

Last time I had the issue, was also with screen on and I observed something interesting: I was in another app when receiving a messge with an image, got a notification popup at the top of my screen. This notification freezed but I was still able to navigate and interact with the open app. Some seconds after, a system pop-up saying "system UI" is not responding anymore, and I had to restart. So it's really "only" system UI (and signal) crashing. PS: image size was 492,9 kB.

cody-signal commented 2 years ago

I have another hopeful fix coming in 5.48 that'll drop into beta later this week. Please try it out when it's available in your preferred channel (beta or prod).

vanMacG commented 2 years ago

I have another hopeful fix coming in 5.48 that'll drop into beta later this week. Please try it out when it's available in your preferred channel (beta or prod).

@cody-signal Did the fix made it into 5.48? I had another crash on friday...

vanMacG commented 2 years ago

And yesterday once again... Image size is 363,8 kB. Curioz fact: I had signal desktop running as well. And after some time the watched status from desktop got synced to the phone. After notification was gone, the phone was recovered and didn't need a restart.

greyson-signal commented 2 years ago

Can you provide a log that's taken after it happens?

vanMacG commented 2 years ago

Sure: log Message arrived at 2022-10-03 17:46

vanMacG commented 2 years ago

I see that one minute later, I received another message with a different person... Maybe this also helped "recover" the notification...?

cody-signal commented 2 years ago

@vanMacG I assume you're running a custom rom, which one?

I can't reproduce this, and this point I don't know how it could be happening with all the changes we've made.

vanMacG commented 2 years ago

I'm using LineageOS 18.1 (without google but microG). Does it make sense to continue posting signal-logs when this issue occurs? Maybe system-logs would help more?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been closed due to inactivity.