Man… There’s nothing worse than an ugly bug rearing its head in your software. Here’s the down-low regarding the keychain issue…
As best as I can tell, if an entry was made, and then removed for some reason, it would confuse the application that was recently bundled in version 2.0.1 for the purpose of retrieving keychain entries quicker than the standard “Keychain Scripting” application in AppleScript. I’d made the change due to the fact that Keychain Scripting is a piece of unusable code that chokes on itself when dealing with more than just a few keychain entries. I could go into a long diatribe about it, but won’t. I just wish Apple would do something about it…
So, to completely resolve all keychain problems, I’ve removed every single line of keychain related code from Yasu. For those who were overjoyed that it was added, I’m sorry to have to take the candy away from you. But fear not. I will be working on a proper implementation of keychain storage in a future version.
To be completely honest though, I feel really good about removing the option. It was the one area of the application that I never felt very comfortable with, and always thought it had the potential for the unreliability it proved itself to have. Now that it’s gone, Yasu is much faster at authenticating, due to the fact it doesn’t have to search through every keychain key before putting up the authentication dialog.
The moral of the story? Go with your gut. That, and test the heck out of your application, then test the heck out of it again, and finally test it a few more times before testing it again a few more times…






Congratulations, you’ve basically come to the same conclusion as Daniel Jalkut did: http://www.red-sweater.com/blog/170/usable-keychain-scripting
Daniel also made a better keychain scripting code with slightly different scripting terminology to applescript but which you made find as a better solution anyway: http://www.red-sweater.com/blog/downloads/UsableKeychainScripting.dmg
hmmm, that comment does sound a bit sarcastic. that wasn’t the intention at all.
encro,
To be honest – USK was the application that I was bundling in Yasu 2.0.2 for keychain retrieval. In my early tests, it worked superbly. But since Yasu needed to be able to remove and add a keychain entry if a user changed their admin password (which happens often), and since USK wasn’t able to do that, I had to rely on Keychain Scripting to do it instead.
It turns out the combination of the two methods proved to be problematic on some systems, causing some serious keychain corruption for a few users. Since I couldn’t track it down to any one specific thing causing it, I simply chose to remove USK, and all other Keychain Scripting code entirely from Yasu.
I totally agree that Usable Keychain Scripting is a great piece of code for returning keychain items, and Daniel has done an outstanding job with it. He’s a really nice guy too, helping me out with questions as well a pointing out some “gotcha’s” between KS and UKS when I first asked him if I could include it in Yasu.
I’ll be working on a proper implementation of keychain services specifically for Yasu in a future version.