Open akrtanner opened 1 year ago
Hmmm....wondering about the context of the user in the scheduler. KIM saves the Keep token in the Windows credential locker using the keyring python lib once you've logged in. However, it seems when the system is rebooted the user context in the scheduler (which would be different that your user account I assume) can't find the credential locker value of the key. Do you know if the task starts up before you've logged in on Windows under your account?
Take a look at this thread @akrtanner https://www.reddit.com/r/sysadmin/comments/jrpuoc/windows_credential_manager_issue_retrieving/
@djsudduth that sounds like the same issue for sure. I'm the only user on this machine so I don't log in as such, but I did have the "run task as soon as possible after a scheduled start is missed" option checked in Task Scheduler settings so perhaps it was running right away on startup before the key could be found. After trying a few options it's now working fine, but I'm unable to replicate the issue even when I try to. Fingers crossed.
@akrtanner - ok! I will leave this open for now. Let me know if it pops up again in the next 2 weeks or so. If I don't hear anything I'll close this issue. (But, I will add some documentation on schedulers for this)
@akrtanner - can you describe specifically what you did to fix this issue? I want to make sure I add the correct instructions. PS - does it matter that the batch mode has std output to the terminal? Would a silent mode help you at all?
@djsudduth still getting the issue, but not every time I restart. Have tried unchecking "run task as soon as possible after a scheduled start is missed" in Task Scheduler and will let you know how I go. I don't know whether a silent mode would help at this stage.
@akrtanner - checking in a year later. Did you discover any fixes to this?
@akrtanner - any updates?? Otherwise I'll close this.
Using Windows task scheduler to automatically run the script regularly (in batch mode). Works fine (as long as "run with highest privileges" is checked) but after restarting the computer it asks for the password again. It then won't even accept it, saying "invalid Google username or password" before shutting down. However if I then run the script manually it works fine, and if I refresh the task in the scheduler then it goes back to working normally without requesting the password again.
Summary: I've got the script working fine, but it fails with Windows Scheduler after a system restart.