alfred-mstodo-workflow
alfred-mstodo-workflow copied to clipboard
PassWordNotFound error
Thank you for your work on this plugin!
I am experiencing some form of authentication issue, possibly related to the refreshing of tokens. The plugin, which was working previously, now returns an error "Error in Workflow 'Microsoft ToDo".
I am attaching output from the debugging console. I've previously managed to resolve this issue by calling _td-full-reset
and re-authenticating. This seems to happen approx every two weeks.
[11:47:13.176] Microsoft ToDo[Script Filter] Queuing argument ''
[11:47:13.443] Microsoft ToDo[Script Filter] Script with argv '(null)' finished
[11:47:13.446] ERROR: Microsoft ToDo[Script Filter] Code 1: .
2021-01-29 11:47:13,369 workflow ERROR
Traceback (most recent call last):
File "[deleted]/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC2B9BB1-5C52-48FD-8747-71D533C446FA/workflow/workflow.py", line 2073, in run
func(self)
File "alfred-mstodo-workflow.py", line 17, in main
route(wf.args)
File "[deleted]/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC2B9BB1-5C52-48FD-8747-71D533C446FA/mstodo/handlers/route.py", line 18, in route
logged_in = is_authorised()
File "[deleted]/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC2B9BB1-5C52-48FD-8747-71D533C446FA/mstodo/auth.py", line 57, in is_authorised
return resolve_oauth_token(refresh_token=workflow().get_password(config.KC_REFRESH_TOKEN))
File "[deleted]/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC2B9BB1-5C52-48FD-8747-71D533C446FA/workflow/workflow.py", line 2445, in get_password
account, '-g')
File "[deleted]/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC2B9BB1-5C52-48FD-8747-71D533C446FA/workflow/workflow.py", line 2813, in _call_security
raise PasswordNotFound()
PasswordNotFound
Interesting - There may be a race condition / uncaught exception in refreshing the auth tokens for the application. Can you let me know
- what you were doing prior to this occurring?
- what items are in your apple keychain when you search for
alfred.mstodo
after this occurs? in normal operation there should be two items, one anoauth_token
and one arefresh_token
I'll check the keychain next time this happens and get back to you.
I can't say I was doing anything special in terms of steps to reproduce. Basically the plugin works as normal for some time (might be around 14 days) and then stops working when I try to add a ToDo at some point.
I'm getting the same error. I fix it by deleting the two items from the keychain and re-doing the login flow.
Auth has been refactored in release 0.2.0 which should resolve this issue