macOS: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. (errSecItemNotFound -25300)
A lookup in the macOS keychain found no matching item, or access to it was denied.
The specified item could not be found in the keychainsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychainerrSecItemNotFound -25300OSStatus -25300User interaction is not allowed. errSecInteractionNotAllowed -25308 Meaning
Check the service/account names used in security find-generic-password -s SERVICE -a ACCOUNT, make sure you search the right keychain (login vs System), and that the item wasn't removed. For CI keychains, unlock with security unlock-keychain first and set a search list.
Common causes
- Item never saved or removed
- Wrong service/account/label
- Wrong keychain (login/System/custom)
- Keychain locked (CI)
- Access control blocks the calling app
⚡ Quick fix
security find-generic-password -s "service" -a "account" -wsecurity unlock-keychain -p PASS ~/Library/Keychains/login.keychain-db- Add the item again with
security add-generic-password
Detailed fix by platform
macOS
security list-keychainsandsecurity find-generic-password -s NAME
How to diagnose
- Name — Service/account correct?
- Keychain — Which one?
- Lock — Unlocked?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- "x" can't be opened because it is from an unidentified developer macOS: “app” can’t be opened because it is from an unidentified developer
- ActiveModel::ForbiddenAttributesError (strong parameters) Rails: ActiveModel::ForbiddenAttributesError
- Apple could not verify "x" is free of malware macOS: “app” cannot be opened because Apple cannot check it for malicious software / Apple could not verify “app” is free of malware that may harm your Mac
Most viewed in macOS
- Operation not permitted (macOS privacy) macOS: Operation not permitted — Terminal/app lacks Full Disk Access (TCC privacy protection)
- zsh: command not found: brew macOS: zsh: command not found: brew (Homebrew not on PATH on Apple Silicon)
- Homebrew: Permission denied @ dir_s_mkdir Homebrew: Error: Permission denied @ dir_s_mkdir - /usr/local/Cellar / /opt/homebrew is not writable
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026