signalapp / Signal-Android

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

Constant crashing due to requireGroupsV2 AssertionError #13756

Open strugee opened 1 month ago

strugee commented 1 month ago

Guidelines

Bug description

The app is constantly crashing. I can open it to the homescreen for a few seconds, and even tap into conversations if there's enough time, but then it force closes.

This seems to have started happening within the last 20-30 minutes or so. Unclear if my device just took an app update from Google Play (Google Play says Signal was updated at 3:34 but I can't tell if this number is respecting my device's 24-hour time display preference - though even if it weren't this would be from over an hour ago).

Receiving group chat messages displays a notification but then also displays a crash dialog.

Screenshots

N/A

Device

Pixel 7

Android version

GrapheneOS 2024102400 based on Android 15

Signal version

7.22.1

Link to debug log

I can't retrieve a debug log due to the nature of the bug. I'll be home with a proper cable to get an adb logcat in an hour or so, but in the meantime here's the stack trace that Android shows when I tap into the crash dialog:

type: crash
osVersion: google/panther/panther:15/AP3A.241005.015/2024102400:user/release-keys
flags: dev options enabled
package: org.thoughtcrime.securesms:147800
process: org.thoughtcrime.securesms
processUptime: 4664 + 383 ms
installer: com.android.vending

java.lang.AssertionError
    at org.thoughtcrime.securesms.groups.GroupId.requireV2(GroupId.java:233)
    at org.thoughtcrime.securesms.database.GroupTable.getGroupSendFullToken(GroupTable.kt:995)
    at org.thoughtcrime.securesms.jobs.SendReadReceiptJob.lambda$onRun$1(SendReadReceiptJob.java:196)
    at org.thoughtcrime.securesms.jobs.SendReadReceiptJob.$r8$lambda$ixFTKruBNmyYZxbkfuQd5ReLg-c(SendReadReceiptJob.java:0)
    at org.thoughtcrime.securesms.jobs.SendReadReceiptJob$$ExternalSyntheticLambda1.create(R8$$SyntheticClass:0)
    at org.whispersystems.signalservice.api.crypto.SealedSenderAccess$Companion.forIndividualWithGroupFallback(SealedSenderAccess.kt:146)
    at org.whispersystems.signalservice.api.crypto.SealedSenderAccess.forIndividualWithGroupFallback(SealedSenderAccess.kt:0)
    at org.thoughtcrime.securesms.crypto.SealedSenderAccessUtil.getSealedSenderAccessFor(SealedSenderAccessUtil.java:57)
    at org.thoughtcrime.securesms.jobs.SendReadReceiptJob.onRun(SendReadReceiptJob.java:195)
    at org.thoughtcrime.securesms.jobs.BaseJob.run(BaseJob.java:31)
    at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:88)
    at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:51)
    at [[ ↑↑ Original Trace ↑↑ ]].(:0)
    at [[ ↓↓ Exception Message ↓↓ ]].(:0)
    at null.(:0)
strugee commented 1 month ago

Note that I'm 99% sure the group I'm getting messages from is a v2 group.

strugee commented 1 month ago

Note that all my unread chats appear to have been marked read - at least AFAICT from the brief bit of homescreen I get. I don't know whether this is related.

strugee commented 1 month ago

Chats being marked read seems to be a local-only phenomenon? My Signal Desktop doesn't show these chats marked read (but that might just be the assertion crashing the app before message read gossip can be sent to other devices).

strugee commented 1 month ago

I've emailed a logcat to support@. Subject line adb logcat for signalapp/Signal-Android#13756 on GitHub. I rebooted to get a fresh log, waited a couple minutes for start-on-boot apps/services to settle, and then opened Signal. Note that I was using Signal Desktop a bit during this period so there may be some logs from that.

strugee commented 1 month ago

I should also mention that the v2 group on the phone (mentioned in the description and in https://github.com/signalapp/Signal-Android/issues/13756#issuecomment-2442751718) is displaying (on the homescreen last-message preview) a message that I sent to it on Signal Desktop, including a read receipt from another group member.

strugee commented 1 month ago

My install is working again, as of the last couple hours. This makes no sense - I haven't changed anything.

cody-signal commented 1 month ago

@strugee thanks for all the debug information. We'll look into it. I'm guessing the job causing the crash aged off and is why things are working again. But we'll still look into why this happened in the first place and hopefully have a decent chance of a fix with your helpful reporting.

strugee commented 3 weeks ago

Just realized I never hit send on a comment here - but sure thing, and thanks for looking into it. I wish I'd noticed exactly when it started working again, but it did seem suspiciously close to exactly 24 hours. I thought it was maybe a backup running for a bit, but I was able to successfully run a backup once it started working again (well, not quite - it ran out of storage, because my phone storage is extremely full generally, but clearly got well into the backup).

Note that all my unread chats appear to have been marked read - at least AFAICT from the brief bit of homescreen I get. I don't know whether this is related.

This change seems to have been permanent, FYI, though messages being marked read did not happen on Signal Desktop.