# Button in vcard message does nothing if import fails \[Unhandled Rejection: either contactId or email needs to be set\]

**URL:** <https://forum.delta.chat/t/button-in-vcard-message-does-nothing-if-import-fails-unhandled-rejection-either-contactid-or-email-needs-to-be-set/5153>\
**Category:** Uncategorized\
**Tags:** desktop, user-interface, bug\
**Created:** [May 1, 2026, 9:06pm UTC](https://forum.delta.chat/t/button-in-vcard-message-does-nothing-if-import-fails-unhandled-rejection-either-contactid-or-email-needs-to-be-set/5153 "2026-05-01T21:06:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian](https://forum.delta.chat/user_avatar/forum.delta.chat/ian/32/3164_2.png) [@ian](https://forum.delta.chat/u/ian)\
**Post date:** [May 1, 2026, 9:06pm UTC](https://forum.delta.chat/t/button-in-vcard-message-does-nothing-if-import-fails-unhandled-rejection-either-contactid-or-email-needs-to-be-set/5153/1 "2026-05-01T21:06:53Z")

</div>

v2.49.1. I attach a vcard that has specific errors described in a separate issue:

> [@Failed to import vcard if key also signed by unknown issuer](https://support.delta.chat/t/failed-to-import-vcard-if-key-also-signed-by-unknown-issuer/5152/1):
>
> v2.49.1 I have fetched a standard public key of a peer using WKD. The key seems to contain additional signatures along with the mandatory self-signature. Creating a vcard out of this key and the email address will result in a non-working contact. I would expect Delta Chat to work out of the box on such a key by ignoring unknown signatures. Cleaning the key with gpg --edit-key fixes this by removing everything but the self-signature. The resulting file will then work with Delta Chat. core/event…

I click on the button in the message. Nothing happens. I expected it to either work (open a chat) or to open a window telling me about any possible errors in the file. If the file format is unsupported in some way, we may even want to hide this button and show it as a raw file attachment.

`core/event WARNING	""	1	"/build/source/src/contact.rs:390: import_vcard_contact() failed for XXXXXX@XXXXXX.XXXXXX: Failed to import public key from vCard: Attempt to import broken public key: verify_certification: No matching issuer_key_id or issuer_fingerprint for Key ID: KeyId(XXXXXXXXXXXXXXXX)"`

`renderer ERROR	".../resources/app/src/App.tsx:125:10"	"Unhandled Rejection: either contactId or email needs to be set"	{"isTrusted":true}	{"stack":"Error: either contactId or email needs to be set\n at createChatByContactId (.../resources/app/src/backend/chat.ts:84:13)\n at l (.../resources/app/src/components/message/VCard.tsx:46:26)","message":"either contactId or email needs to be set"}`

---

<div class="post-metadata">

**Author:** ![WofWca](https://forum.delta.chat/user_avatar/forum.delta.chat/wofwca/32/1702_2.png) [@WofWca](https://forum.delta.chat/u/WofWca)\
**Post date:** [May 2, 2026, 9:10am UTC](https://forum.delta.chat/t/button-in-vcard-message-does-nothing-if-import-fails-unhandled-rejection-either-contactid-or-email-needs-to-be-set/5153/2 "2026-05-02T09:10:11Z")

</div>

This is the relevant code

> <https://github.com/deltachat/deltachat-desktop/blob/54358ad415a3b7dfa78b886f5cac166dc2df0201/packages/frontend/src/components/message/VCard.tsx#L42-L46>

Maybe [helper function for user visible errors on exception in async action · Issue #3883 · deltachat/deltachat-desktop · GitHub](https://github.com/deltachat/deltachat-desktop/issues/3883) would be a good enough solution here.
