Bug description
When sharing a single contact from the AOSP/GrapheneOS Contacts app to Signal via Android's share menu (ACTION_SEND with text/x-vcard MIME type), Signal reports the file as invalid and does not send the contact.
Steps to reproduce:
- Open Contacts app on GrapheneOS (stock AOSP-based contacts app)
- Open any contact
- Tap Share > choose Signal
- Signal shows "invalid file" or silently fails to attach the contact
Expected: The contact is shared as a vCard attachment in the Signal conversation.
Actual: Signal rejects the file as invalid.
Key observation: Sharing the same contact to SMS/MMS apps works perfectly. The vCard data itself is valid. The issue appears to be in how Signal resolves the shared content URI.
Likely root cause: The Contacts app shares a content://com.android.contacts/contacts/as_vcard/ URI. Signal's ShareRepository.resolve() calls contentResolver.openInputStream() and contentResolver.query() on this URI. If Signal does not have READ_CONTACTS permission (common on GrapheneOS, where users often deny this or use Contact Scopes), the URI read fails with a SecurityException that Signal catches silently, resulting in ResolvedShareData.Failure.
Additionally, the ContactsProvider returns NULL for the SIZE column on vCard URIs (OpenableColumns.SIZE maps to "NULL" in sContactsVCardProjectionMap). If Signal's size validation treats zero/null size as invalid, this would also cause rejection.
Note: A complementary fix has been submitted on the GrapheneOS Contacts side to explicitly add FLAG_GRANT_READ_URI_PERMISSION to the share intent (GrapheneOS/platform_packages_apps_Contacts#25). However, Signal should also handle this case gracefully, as other apps using the same AOSP share pattern will have the same issue.
Related issues
Device
Pixel (GrapheneOS)
Android version
15
Signal version
Latest from accrescent/GitHub releases
Bug description
When sharing a single contact from the AOSP/GrapheneOS Contacts app to Signal via Android's share menu (ACTION_SEND with
text/x-vcardMIME type), Signal reports the file as invalid and does not send the contact.Steps to reproduce:
Expected: The contact is shared as a vCard attachment in the Signal conversation.
Actual: Signal rejects the file as invalid.
Key observation: Sharing the same contact to SMS/MMS apps works perfectly. The vCard data itself is valid. The issue appears to be in how Signal resolves the shared content URI.
Likely root cause: The Contacts app shares a
content://com.android.contacts/contacts/as_vcard/URI. Signal'sShareRepository.resolve()callscontentResolver.openInputStream()andcontentResolver.query()on this URI. If Signal does not haveREAD_CONTACTSpermission (common on GrapheneOS, where users often deny this or use Contact Scopes), the URI read fails with aSecurityExceptionthat Signal catches silently, resulting inResolvedShareData.Failure.Additionally, the ContactsProvider returns
NULLfor theSIZEcolumn on vCard URIs (OpenableColumns.SIZEmaps to"NULL"insContactsVCardProjectionMap). If Signal's size validation treats zero/null size as invalid, this would also cause rejection.Note: A complementary fix has been submitted on the GrapheneOS Contacts side to explicitly add
FLAG_GRANT_READ_URI_PERMISSIONto the share intent (GrapheneOS/platform_packages_apps_Contacts#25). However, Signal should also handle this case gracefully, as other apps using the same AOSP share pattern will have the same issue.Related issues
Device
Pixel (GrapheneOS)
Android version
15
Signal version
Latest from accrescent/GitHub releases