Messages.app notification only shows contact number instead of contact names on macOS
I managed to fix this by going to System Preferences > Language & Region. I changed the default language from English (UK) to English (Canada) and quit System Preferences. I then changed the default back to English (UK) and then quit System Preferences again. I then restarted macOS.
I have absolutely no idea why that works. From the number of similar posts on the internet proposing different solutions, I suspect there are multiple possible issues leading to the same problem. However, this it worked for me on macOS Big Sur 11.0.1. Unfortunately I can't find the link describing this solution to give credit but if anyone does find it do link in.
Hope this helps you.
I did a bit of digging and uncovered a fairly unobtrusive workaround for this. YMMV, but it worked for me. Tested on macOS 11.4.
By restarting a few system agents, the bug appears to go into remission. This leads me to believe that the root cause is some sort of timing issue or race condition that happens during boot.
Until a proper fix exists, I welcome anyone to try this script (also at luckman212/imessage-number-fix)
#!/usr/bin/env bash
declare -a xpcArr=(
gui/$UID/com.apple.AddressBook.abd
gui/$UID/com.apple.AddressBook.AssistantService
gui/$UID/com.apple.AddressBook.ContactsAccountsService
gui/$UID/com.apple.AddressBook.SourceSync
gui/$UID/com.apple.assistant_service
gui/$UID/com.apple.assistantd
gui/$UID/com.apple.CallHistorySyncHelper
gui/$UID/com.apple.ContactsAgent
gui/$UID/com.apple.iCloudNotificationAgent
gui/$UID/com.apple.imagent
gui/$UID/com.apple.imautomatichistorydeletionagent
gui/$UID/com.apple.notificationcenterui.agent
gui/$UID/com.apple.telephonyutilities.callservicesd
gui/$UID/com.apple.usernoted
gui/$UID/com.apple.UserNotificationCenterAgent
user/$UID/com.apple.imdpersistence.IMDPersistenceAgent
)
for d in "${xpcArr[@]}"; do
echo -n "restarting $d"
read -r PID < <(launchctl kickstart -kp "$d")
if [ -n "$PID" ]; then
echo " ✔ [$PID]"
else
echo " ✘"
fi
done