Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secrets disappearing after hibernation #461

Open
ticky opened this issue Mar 24, 2023 · 3 comments
Open

Secrets disappearing after hibernation #461

ticky opened this issue Mar 24, 2023 · 3 comments

Comments

@ticky
Copy link

ticky commented Mar 24, 2023

I was being irresponsible and using the last few watt hours of my battery and my MacBook hibernated to save itself. Helpful!

Upon plugging it in and getting back to where I was I attempted to push to a git remote and… was denied with no applicable public keys.

I opened Secretive only to be greeted with an empty list of secrets!

Not clear if this is an issue with the Secure Enclave in general (I'm on macOS 13.2.1 (22D68) on an M1 MacBook Air) or specific to how Secretive talks to it.

After a reboot, all my secrets (thankfully) reappeared.

Is there anything I can do to try get useful information to debug this if I can repro? I believe I've seen this behaviour before.

@maxgoedjen
Copy link
Owner

Hey @ticky, thanks for the report – this is the first I've heard about it happening after hibernation. We've had a few reports over the years about it specifically happening after updates (#426), and I've experienced that myself, but I've never been able to replicate it synthetically using VMs/etc, and I've tried a bunch.

I've never heard of it on hibernate though – the working theory for the update path is "it's launched at a different part of the startup process when the keychain is still locked, and subsequently fails to load the keys." It sounds plausible that hibernation could do the same thing. We put a speculative fix in #427, but if you're running 2.3.0 and still seeing it, that's probably not doing the trick 😩

@constantin-huetterer
Copy link

Hey @maxgoedjen, thanks for this great tool - i am loving it! 🙂

Just to add another possible cause for this problem: for me this happened during an Active Directory sync of the company laptop. The AD password was synced to a new one in the background. I believe this caused Secretive to show no more keys. Attempting to create a new Secret in this state crashed the Application.

The AD sync doesn't auto-update the password for the keychain as well. After a restart a prompt appears to update the keychain password or create a new one. After updating it, Secretive worked as expected again and all the previous secrets were showing up.

@j-mie
Copy link

j-mie commented Jun 15, 2023

I'm running into this issue too, I am running Version 2.3.0 (1.3763232242) so it does indeed look like the speculative fix isn't working as intended. It's happened a few times for me now, but a restart (although inconvenient) always fixes the problem.

I found this in console shortly after trying to SSH into a host:
image

image image image

and Secretive looks like this:
image

Around the UNIX errors I found this:
image

I also found:
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants