Skip to content

fix: Duplicate groups makes contact crash#5

Open
lforg37 wants to merge 1 commit intoProtonMail:mainfrom
lforg37:fix-duplicate-contact-group-crash
Open

fix: Duplicate groups makes contact crash#5
lforg37 wants to merge 1 commit intoProtonMail:mainfrom
lforg37:fix-duplicate-contact-group-crash

Conversation

@lforg37
Copy link

@lforg37 lforg37 commented Feb 2, 2026

When some contacts have duplicated groups for the same items, the rendering crashes.

Context, one of my contact has the following (anonymized) VCARD (exported from proton web ui):

BEGIN:VCARD
VERSION:4.0
FN;PREF=1:John Doe
FN;PREF=2:John Doe
TEL;PREF=1:+33666666666
TEL;PREF=2:+33999999999
TEL;PREF=3:+33 1 23 45 67 89
N:;;;;
UID:proton-android-3794338e-4fc7-426f-a6c1-8eabaa54e63f
ITEM1.EMAIL;TYPE=home;PREF=1:abcde@gmail.com
ITEM2.EMAIL;PREF=2:abcde@gmail.com
PRODID;VALUE=TEXT:-//ProtonMail//ProtonMail vCard 1.0.0//EN
ITEM1.CATEGORIES:Family
ITEM2.CATEGORIES:Family
ITEM1.CATEGORIES:Family
ITEM2.CATEGORIES:Family
END:VCARD

Trying to open the detail view for this contact makes the application crash with the following trace:

java.lang.IllegalArgumentException: Key "Family" was already used. If you are using LazyColumn/Row please make sure you provide a unique key for each item.
 at androidx.compose.ui.internal.a.a(Unknown Source:2)
 at androidx.compose.ui.layout.i0.s(Unknown Source:147)
 at ch.protonmail.android.mailcontact.presentation.contactdetails.ui.c.invoke(Unknown Source:332)
 ...
 ```
 
 A support case was open with ID 4403032 to this subject.

When some contacts have duplicated groups for the same items, the
rendering crashed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant