Just a public service announcement as I stumbled across this last night and it left me scratching my head and thinking my own code was borked.
Xojo 2026r2.1 has a bug, #81846 - KeyChain.AddPassword Exception, where if you use KeyChain.AddPassword, even if the keychain item doesn’t exist, an exception is thrown:
-25299: The specified item already exists in the keychain.
Fortuitously it does indeed create the keychain item. But one side effect is that the keychain item Label text is truncated.
Kudos to @Javier_Menendez for quickly reviewing and fixing.
Just mentioning so that the macOS devs amongst us don’t wander down any rabbit holes but also so that you can keep an eye out for a future version of Xojo that fixes this.
My original bug was a crash. I only see the additional exception with 2026r2.1 which I already handle.
Sorry as I probably shouldn’t have let folks try to put together the pieces, but I did this on purpose because I didn’t want to speculate (wrongly?).
So with that said and being up front that this is all speculation and might not be related to any kind of facts or reality…
- #81846 - KeyChain.AddPassword Exception is occurring in 2026r2.1
- At least for me, the sample project worked fine for 2026r1
- #81446 - Hard crash when creating keychain entry was occurring in < 2026r2
- 2026r2 was the target release for the fix for this issue
- This theoretically means that fixing #81446 could have been the reason why #81846 is now happening under 2026r2.1
- I didn’t do a deep dive across all the keychain bugs in the tracker, but #81446 did pop up and is one of maybe several possibilities
Regarding the exception, that was my point in filing the ticket. The exception is bogus and shouldn’t be raised. No Xojo dev should have to work around this.
That is true. But your problem is a bit more narrow than the PSA implies which is what I wanted to say.
Maybe my own communications skills are lacking but I’m genuinely open to improving them.
What do you recommend I should have posted instead? Maybe I should have phrased something differently? Or maybe this shouldn’t be labeled as a “PSA” and if not, what criteria should be used to determine this?
Just to clarify: both issues were on my side (both fixed now).
Deeply sorry for the inconvenience, guys. 
Thank you both for pointing these out, much appreciated.
No need to apologize, stuff happens. And thanks again for the speedy fixes.
Keychain related items are PSA. This bug is not quite that bad. There is a workaround for the exception. Not sure about the problem with the truncated label.
Noted. My own perspective of a PSA is likely skewed. In my part of the world PSAs are commonplace and nearly always don’t involve serious danger. Many would consider where I live quite weird.