Inconsistent Vcard Format

I noticed that when sharing contacts as a vcard, sometimes the profile name is not displayed in the vcard (instead, the email address is displayed twice), and sometimes the profile name is displayed (as expected). This seems like a bug to me, but I don’t know how to reproduce the bug. The contacts which I am sharing as vcards have all set their own profile names.

Could it be that you have set the name manually? Manually set names are not exported, only the names that come from the email headers go to vCard to avoid leaking locally-set names when you send a vCard to someone.

No, I have not set the names. The contacts which I am sharing as vcards have all set their own profile names.

I don’t know if this is related, but it also happened to me once that after creating a group, I noticed that the profile name for one group member was not showing on my phone, but appeared to have been reset to the email address. When I asked this person if they had edited their profile name, they replied that they had not, and showed me their phone, where I could see that they still had their profile name set. They then set their profile name a second time, and shortly afterwards I could see their profile name again on my phone. I have not been able to reproduce this behavior, but I would speculate that there might be some rarely used code path which results in profile names being ignored in some situations.