Hopefully this will help some poor soul before they spend months and months as I did trying unsuccessfully to resolve this issue. I have a 2019 iMac 8 Core i9 and here is my story:
Auto-unlock worked perfectly since inception up until the April 2023 13.3 Ventura update. When the next few Ventura releases failed to fix the issue I spent dozens of hours over the course of the next 3 or 4 months scouring the internet for any possible solution. You name I did it... dozens of times, over-and-over-and-over, rebooting devices, signing out of iCloud accounts, resetting bluetooth modules, setting up alternate WiFi networks, deleting keychain entries and deleting related finder files. Any sporadic success was short lived and would break again after the very next reboot. I even reinstalled the operating system via Recovery Console, all to no avial.
--------------
My specific error code in terminal was 138. Here is how to see your specific error code(s):
Step 1: Enter this in Terminal:
log stream --predicate 'category == "AutoUnlock" AND eventMessage contains "fail with error"'
Step 2: Attempt an Auto-Unlock
Terminal reported the following error after every failed Auto-Unlock:
sharingd: [com.apple.sharing:AutoUnlock] Client ack'd did fail with error: Error Domain=SFAutoUnlockErrorDomain Code=138 "Ranging Timeout: Couldn’t Find Peer" UserInfo={NSLocalizedDescription=Ranging Timeout: Couldn’t Find Peer}
--------------
**The fix..... reset NVRAM/PRAM. On my 2019 iMac, simply hold down Option, Command, P, and R at startup**
Here are the detailed steps I took, I am not sure all were necessary but the NVRAM/PRAM reset in Step #5 was definitely necessary:
- Disable "Use apple Watch to Unlock" in settings.
- Delete the numerous keychain files: "autounlock" and "auto unlock"
- Deleted the (2) files in ~/Library/Sharing/AutoUnlock.
- Shutdown
- Startup while holding (Option, Command, P, and R) to reset the NVRAM/PRAM.
- Enable "Use apple Watch to Unlock" in Settings.
- Test Auto-Unlock and if still not working, one final shut down and restart was necessary and Auto-Unlock remained persistent!!
Let me know if this helped anyone.