MacOS – Why would Preview “want to use” the (unused) login Keychain just to execute hotkeys

keychainmacospasswordpreviewSecurity

I've asked the related question in security SE: Why does not updating a MacOS keychain password cause applications to become troublesome? and the answer there explains that keychain is used by various applications to store "sensitive data such as credentials, certificates and the like… passwords…" and goes on to explain that a total list of all possibilities is beyond the scope of the question.

Background:

I changed my password by using recovery mode. I'd changed it yesterday, then it suddenly appeared to stop working.

As I continued, I received the message (photo of screen shown below):

The system was unable to unlock your login keychain.

Since I don't use my keychain at all, and since I did not understand the implications of each choice, I just selected Continue Login.

Once I was using my computer again, I have a persisting sequence of dialogue boxes that will not go away. They seem to interfere strongly, rendering other applications unresponsive (beachballing) until I cycle through them once or twice by clicking Cancel three or six times. Preview is particularly difficult to use now.

For example, I have found that when I open multiple images in Preview, I can move easily between them through cursor operations on the sidebar, but as soon as I try to use the arrow keys preview freezes and beachballs until I click through the keychain dialogues again. Same for other menu items like close and save.

I have similar behavior for other apps. For example when TextEdit has an .rtf document that contains links, trying to use hotkeys to save will also trigger a dialogue box, but I'll ask primarily about Preview to keep it simple.

QUESTION: Why specifically would Preview access the keychain when I use keyboard shortcuts, but not cursor clicks or menu items for the same operations? Any thoughts why this (sometimes) happens with TextEdit as well?


enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Best Answer

Short answer: It doesn't.

Long answer: There are plenty of reasons why this may occur. I discuss a couple of scenarios below.

If you recently changed your password, I would recommend reading this support article from Apple.

The password of your macOS user account might not match the password of your login keychain. Either create a new login keychain or update it with your new password.

If this is not the scenario for you, or if that article does not solve your problem, there are other probable scenarios. Sometimes, after updates, the Keychain may become corrupted. Using Keychain Repair from the Keychain App, you can easily fix this problem. I would refer to this answer for more information.

I have been personally facing this issue since El Capitan, and only recently fixed this issue. When El Capitan was released, this bug was introduced to some users using FileVault. Disabling FileVault and re-enabling solves this problem as well.

For additional solutions, I would refer to other answers left in similar questions: