idpaterson / alfred-wunderlist-workflow

Unbelievably fast task entry in Wunderlist with due dates, reminders, and recurrence
297 stars 8 forks source link

Stuck on "Preparing workflow" #90

Closed malmaud closed 8 years ago

malmaud commented 8 years ago

Hi, Thanks for this great workflow! I recently reinstalled set it up on a new computer with OS X 10.11.2 and Alfred 2.8.1. When I type "wl" at the Alfred prompt, I see "Preparing workflow" indefinitely (screenshot attached). Any advice would be appreciated.

screen shot 2016-01-07 at 8 04 32 am
idpaterson commented 8 years ago

That's a new one... Can you please open Alfred to the Workflows tab and click the Bug icon on the Wunderlist workflow page? That will show an error log with a Copy button. Just launch the workflow again after opening that debug screen and paste back whatever messages it shows.

malmaud commented 8 years ago

The output is actually blank, even as a try typing "wl" in the Alfred prompt. I double-checked the log info for a different workflow just to make sure the general logging functionality works, and it does.

screen shot 2016-01-07 at 10 28 41 am
idpaterson commented 8 years ago

Are there any python processes running? I see you have the Kill Process workflow so kill python in Alfred to see the list.

Open up the Terminal and check python --version then let's take a look at the following in Terminal:

cd ~/Library/Application\ Support/Alfred\ 2/Alfred.alfredpreferences/workflows/*/wunderlist/..
/usr/bin/env python -O alfred-wunderlist-workflow.py ""

Let me know what you see for those commands.

malmaud commented 8 years ago
~/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49> /usr/bin/env python -O alfred-wunderlist-workflow.py ""
11:46:01 workflow.py:1498 DEBUG    No data stored for `prefs`
11:46:01 workflow.py:1974 DEBUG    Workflow version : 0.5.2
11:46:01 workflow.py:1389 DEBUG    Reading settings from `/Users/malmaud/Library/Application Support/Alfred 2/Workflow Data/com.ipaterson.alfred.wunderlist/settings.json` ...
11:46:01 workflow.py:2235 DEBUG    Update check not due
^C
11:46:09 workflow.py:1498 DEBUG    No data stored for `auth`
11:46:09 workflow.py:1612 DEBUG    Loading cached data from : /Users/malmaud/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/__workflow_update_status.cpickle
11:46:09 workflow.py:2183 DEBUG    update_data : {u'available': False}
<?xml version="1.0" encoding="utf-8"?>
<items><item valid="yes"><title>Please log in</title><subtitle>Authorize Alfred Wunderlist Workflow to use your Wunderlist account</subtitle><icon>icons/dark/account.png</icon></item></items>11:46:09 workflow.py:2165 DEBUG    Set last run version : 0.5.2
11:46:09 workflow.py:2010 DEBUG    Workflow finished in 8.113 seconds.
~/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49> python --version
Python 2.7.11 :: Anaconda 2.4.0 (x86_64)
~/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49>
idpaterson commented 8 years ago

Thanks for the info and for your patience! I'm still scratching my head a bit on this issue but now we're getting somewhere. It looks like everything is okay with Python and the workflow is returning valid data but the above response got stuck after "Update check not due" forcing you to press Ctrl+C to continue. Is that correct? Can you try running in debug mode instead:

/usr/bin/env python -dv alfred-wunderlist-workflow.py ""

That might give some insight into where it hangs. If the debug log stops please press return a few times before Ctrl+C so that I can see where the hang occurred.

malmaud commented 8 years ago

Ya, that's right. Here's the debug log:

~/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49> /usr/bin/env python -dv alfred-wunderlist-workflow.py ""
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /Users/malmaud/anaconda/lib/python2.7/site.pyc matches /Users/malmaud/anaconda/lib/python2.7/site.py
import site # precompiled from /Users/malmaud/anaconda/lib/python2.7/site.pyc
# /Users/malmaud/anaconda/lib/python2.7/os.pyc matches /Users/malmaud/anaconda/lib/python2.7/os.py
import os # precompiled from /Users/malmaud/anaconda/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /Users/malmaud/anaconda/lib/python2.7/posixpath.pyc matches /Users/malmaud/anaconda/lib/python2.7/posixpath.py
import posixpath # precompiled from /Users/malmaud/anaconda/lib/python2.7/posixpath.pyc
# /Users/malmaud/anaconda/lib/python2.7/stat.pyc matches /Users/malmaud/anaconda/lib/python2.7/stat.py
import stat # precompiled from /Users/malmaud/anaconda/lib/python2.7/stat.pyc
# /Users/malmaud/anaconda/lib/python2.7/genericpath.pyc matches /Users/malmaud/anaconda/lib/python2.7/genericpath.py
import genericpath # precompiled from /Users/malmaud/anaconda/lib/python2.7/genericpath.pyc
# /Users/malmaud/anaconda/lib/python2.7/warnings.pyc matches /Users/malmaud/anaconda/lib/python2.7/warnings.py
import warnings # precompiled from /Users/malmaud/anaconda/lib/python2.7/warnings.pyc
# /Users/malmaud/anaconda/lib/python2.7/linecache.pyc matches /Users/malmaud/anaconda/lib/python2.7/linecache.py
import linecache # precompiled from /Users/malmaud/anaconda/lib/python2.7/linecache.pyc
# /Users/malmaud/anaconda/lib/python2.7/types.pyc matches /Users/malmaud/anaconda/lib/python2.7/types.py
import types # precompiled from /Users/malmaud/anaconda/lib/python2.7/types.pyc
# /Users/malmaud/anaconda/lib/python2.7/UserDict.pyc matches /Users/malmaud/anaconda/lib/python2.7/UserDict.py
import UserDict # precompiled from /Users/malmaud/anaconda/lib/python2.7/UserDict.pyc
# /Users/malmaud/anaconda/lib/python2.7/_abcoll.pyc matches /Users/malmaud/anaconda/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /Users/malmaud/anaconda/lib/python2.7/_abcoll.pyc
# /Users/malmaud/anaconda/lib/python2.7/abc.pyc matches /Users/malmaud/anaconda/lib/python2.7/abc.py
import abc # precompiled from /Users/malmaud/anaconda/lib/python2.7/abc.pyc
# /Users/malmaud/anaconda/lib/python2.7/_weakrefset.pyc matches /Users/malmaud/anaconda/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /Users/malmaud/anaconda/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /Users/malmaud/anaconda/lib/python2.7/copy_reg.pyc matches /Users/malmaud/anaconda/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /Users/malmaud/anaconda/lib/python2.7/copy_reg.pyc
# /Users/malmaud/anaconda/lib/python2.7/traceback.pyc matches /Users/malmaud/anaconda/lib/python2.7/traceback.py
import traceback # precompiled from /Users/malmaud/anaconda/lib/python2.7/traceback.pyc
# /Users/malmaud/anaconda/lib/python2.7/sysconfig.pyc matches /Users/malmaud/anaconda/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /Users/malmaud/anaconda/lib/python2.7/sysconfig.pyc
# /Users/malmaud/anaconda/lib/python2.7/re.pyc matches /Users/malmaud/anaconda/lib/python2.7/re.py
import re # precompiled from /Users/malmaud/anaconda/lib/python2.7/re.pyc
# /Users/malmaud/anaconda/lib/python2.7/sre_compile.pyc matches /Users/malmaud/anaconda/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /Users/malmaud/anaconda/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /Users/malmaud/anaconda/lib/python2.7/sre_parse.pyc matches /Users/malmaud/anaconda/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /Users/malmaud/anaconda/lib/python2.7/sre_parse.pyc
# /Users/malmaud/anaconda/lib/python2.7/sre_constants.pyc matches /Users/malmaud/anaconda/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /Users/malmaud/anaconda/lib/python2.7/sre_constants.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_locale.so", 2);
import _locale # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_locale.so
# /Users/malmaud/anaconda/lib/python2.7/_sysconfigdata.pyc matches /Users/malmaud/anaconda/lib/python2.7/_sysconfigdata.py
import _sysconfigdata # precompiled from /Users/malmaud/anaconda/lib/python2.7/_sysconfigdata.pyc
# /Users/malmaud/anaconda/lib/python2.7/_osx_support.pyc matches /Users/malmaud/anaconda/lib/python2.7/_osx_support.py
import _osx_support # precompiled from /Users/malmaud/anaconda/lib/python2.7/_osx_support.pyc
# zipimport: found 110 names in /Users/malmaud/anaconda/lib/python2.7/site-packages/setuptools-18.8.1-py2.7.egg
import encodings # directory /Users/malmaud/anaconda/lib/python2.7/encodings
# /Users/malmaud/anaconda/lib/python2.7/encodings/__init__.pyc matches /Users/malmaud/anaconda/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /Users/malmaud/anaconda/lib/python2.7/encodings/__init__.pyc
# /Users/malmaud/anaconda/lib/python2.7/codecs.pyc matches /Users/malmaud/anaconda/lib/python2.7/codecs.py
import codecs # precompiled from /Users/malmaud/anaconda/lib/python2.7/codecs.pyc
import _codecs # builtin
# /Users/malmaud/anaconda/lib/python2.7/encodings/aliases.pyc matches /Users/malmaud/anaconda/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /Users/malmaud/anaconda/lib/python2.7/encodings/aliases.pyc
# /Users/malmaud/anaconda/lib/python2.7/encodings/utf_8.pyc matches /Users/malmaud/anaconda/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /Users/malmaud/anaconda/lib/python2.7/encodings/utf_8.pyc
Python 2.7.11 |Anaconda 2.4.0 (x86_64)| (default, Dec  6 2015, 18:57:58)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
import wunderlist # directory /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist
import wunderlist # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/__init__.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/__init__.pyc
import wunderlist.handlers # directory /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers
import wunderlist.handlers # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers/__init__.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers/__init__.pyc
import wunderlist.handlers.route # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers/route.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers/route.pyc
import wunderlist.auth # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/auth.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/auth.pyc
import wunderlist.util # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/util.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/util.pyc
import workflow # directory /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow
import workflow # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/__init__.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/__init__.pyc
# /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/workflow.pyc matches /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/workflow.py
import workflow.workflow # precompiled from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/workflow.pyc
# /Users/malmaud/anaconda/lib/python2.7/__future__.pyc matches /Users/malmaud/anaconda/lib/python2.7/__future__.py
import __future__ # precompiled from /Users/malmaud/anaconda/lib/python2.7/__future__.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/binascii.so", 2);
import binascii # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/binascii.so
# /Users/malmaud/anaconda/lib/python2.7/string.pyc matches /Users/malmaud/anaconda/lib/python2.7/string.py
import string # precompiled from /Users/malmaud/anaconda/lib/python2.7/string.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/strop.so", 2);
import strop # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/strop.so
# /Users/malmaud/anaconda/lib/python2.7/plistlib.pyc matches /Users/malmaud/anaconda/lib/python2.7/plistlib.py
import plistlib # precompiled from /Users/malmaud/anaconda/lib/python2.7/plistlib.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/datetime.so", 2);
import datetime # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/datetime.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/cStringIO.so", 2);
import cStringIO # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/cStringIO.so
# /Users/malmaud/anaconda/lib/python2.7/subprocess.pyc matches /Users/malmaud/anaconda/lib/python2.7/subprocess.py
import subprocess # precompiled from /Users/malmaud/anaconda/lib/python2.7/subprocess.pyc
import gc # builtin
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/time.so", 2);
import time # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/time.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/select.so", 2);
import select # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/select.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/fcntl.so", 2);
import fcntl # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/fcntl.so
# /Users/malmaud/anaconda/lib/python2.7/pickle.pyc matches /Users/malmaud/anaconda/lib/python2.7/pickle.py
import pickle # precompiled from /Users/malmaud/anaconda/lib/python2.7/pickle.pyc
import marshal # builtin
# /Users/malmaud/anaconda/lib/python2.7/struct.pyc matches /Users/malmaud/anaconda/lib/python2.7/struct.py
import struct # precompiled from /Users/malmaud/anaconda/lib/python2.7/struct.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_struct.so", 2);
import _struct # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_struct.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/unicodedata.so", 2);
import unicodedata # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/unicodedata.so
# /Users/malmaud/anaconda/lib/python2.7/shutil.pyc matches /Users/malmaud/anaconda/lib/python2.7/shutil.py
import shutil # precompiled from /Users/malmaud/anaconda/lib/python2.7/shutil.pyc
# /Users/malmaud/anaconda/lib/python2.7/fnmatch.pyc matches /Users/malmaud/anaconda/lib/python2.7/fnmatch.py
import fnmatch # precompiled from /Users/malmaud/anaconda/lib/python2.7/fnmatch.pyc
# /Users/malmaud/anaconda/lib/python2.7/collections.pyc matches /Users/malmaud/anaconda/lib/python2.7/collections.py
import collections # precompiled from /Users/malmaud/anaconda/lib/python2.7/collections.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_collections.so", 2);
import _collections # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_collections.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/operator.so", 2);
import operator # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/operator.so
# /Users/malmaud/anaconda/lib/python2.7/keyword.pyc matches /Users/malmaud/anaconda/lib/python2.7/keyword.py
import keyword # precompiled from /Users/malmaud/anaconda/lib/python2.7/keyword.pyc
# /Users/malmaud/anaconda/lib/python2.7/heapq.pyc matches /Users/malmaud/anaconda/lib/python2.7/heapq.py
import heapq # precompiled from /Users/malmaud/anaconda/lib/python2.7/heapq.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/itertools.so", 2);
import itertools # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/itertools.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_heapq.so", 2);
import _heapq # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_heapq.so
import thread # builtin
import pwd # builtin
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/grp.so", 2);
import grp # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/grp.so
import json # directory /Users/malmaud/anaconda/lib/python2.7/json
# /Users/malmaud/anaconda/lib/python2.7/json/__init__.pyc matches /Users/malmaud/anaconda/lib/python2.7/json/__init__.py
import json # precompiled from /Users/malmaud/anaconda/lib/python2.7/json/__init__.pyc
# /Users/malmaud/anaconda/lib/python2.7/json/decoder.pyc matches /Users/malmaud/anaconda/lib/python2.7/json/decoder.py
import json.decoder # precompiled from /Users/malmaud/anaconda/lib/python2.7/json/decoder.pyc
# /Users/malmaud/anaconda/lib/python2.7/json/scanner.pyc matches /Users/malmaud/anaconda/lib/python2.7/json/scanner.py
import json.scanner # precompiled from /Users/malmaud/anaconda/lib/python2.7/json/scanner.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_json.so", 2);
import _json # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_json.so
# /Users/malmaud/anaconda/lib/python2.7/json/encoder.pyc matches /Users/malmaud/anaconda/lib/python2.7/json/encoder.py
import json.encoder # precompiled from /Users/malmaud/anaconda/lib/python2.7/json/encoder.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/cPickle.so", 2);
import cPickle # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/cPickle.so
# /Users/malmaud/anaconda/lib/python2.7/tempfile.pyc matches /Users/malmaud/anaconda/lib/python2.7/tempfile.py
import tempfile # precompiled from /Users/malmaud/anaconda/lib/python2.7/tempfile.pyc
# /Users/malmaud/anaconda/lib/python2.7/io.pyc matches /Users/malmaud/anaconda/lib/python2.7/io.py
import io # precompiled from /Users/malmaud/anaconda/lib/python2.7/io.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_io.so", 2);
import _io # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_io.so
# /Users/malmaud/anaconda/lib/python2.7/random.pyc matches /Users/malmaud/anaconda/lib/python2.7/random.py
import random # precompiled from /Users/malmaud/anaconda/lib/python2.7/random.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/math.so", 2);
import math # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/math.so
# /Users/malmaud/anaconda/lib/python2.7/hashlib.pyc matches /Users/malmaud/anaconda/lib/python2.7/hashlib.py
import hashlib # precompiled from /Users/malmaud/anaconda/lib/python2.7/hashlib.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_hashlib.so", 2);
import _hashlib # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_hashlib.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_random.so", 2);
import _random # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_random.so
import logging # directory /Users/malmaud/anaconda/lib/python2.7/logging
# /Users/malmaud/anaconda/lib/python2.7/logging/__init__.pyc matches /Users/malmaud/anaconda/lib/python2.7/logging/__init__.py
import logging # precompiled from /Users/malmaud/anaconda/lib/python2.7/logging/__init__.pyc
# /Users/malmaud/anaconda/lib/python2.7/weakref.pyc matches /Users/malmaud/anaconda/lib/python2.7/weakref.py
import weakref # precompiled from /Users/malmaud/anaconda/lib/python2.7/weakref.pyc
# /Users/malmaud/anaconda/lib/python2.7/threading.pyc matches /Users/malmaud/anaconda/lib/python2.7/threading.py
import threading # precompiled from /Users/malmaud/anaconda/lib/python2.7/threading.pyc
# /Users/malmaud/anaconda/lib/python2.7/atexit.pyc matches /Users/malmaud/anaconda/lib/python2.7/atexit.py
import atexit # precompiled from /Users/malmaud/anaconda/lib/python2.7/atexit.pyc
# /Users/malmaud/anaconda/lib/python2.7/logging/handlers.pyc matches /Users/malmaud/anaconda/lib/python2.7/logging/handlers.py
import logging.handlers # precompiled from /Users/malmaud/anaconda/lib/python2.7/logging/handlers.pyc
# /Users/malmaud/anaconda/lib/python2.7/socket.pyc matches /Users/malmaud/anaconda/lib/python2.7/socket.py
import socket # precompiled from /Users/malmaud/anaconda/lib/python2.7/socket.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_socket.so", 2);
import _socket # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_socket.so
# /Users/malmaud/anaconda/lib/python2.7/functools.pyc matches /Users/malmaud/anaconda/lib/python2.7/functools.py
import functools # precompiled from /Users/malmaud/anaconda/lib/python2.7/functools.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_functools.so", 2);
import _functools # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_functools.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_ssl.so", 2);
import _ssl # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_ssl.so
import xml # directory /Users/malmaud/anaconda/lib/python2.7/xml
# /Users/malmaud/anaconda/lib/python2.7/xml/__init__.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/__init__.py
import xml # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/__init__.pyc
import xml.etree # directory /Users/malmaud/anaconda/lib/python2.7/xml/etree
# /Users/malmaud/anaconda/lib/python2.7/xml/etree/__init__.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/etree/__init__.py
import xml.etree # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/etree/__init__.pyc
# /Users/malmaud/anaconda/lib/python2.7/xml/etree/cElementTree.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/etree/cElementTree.py
import xml.etree.cElementTree # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/etree/cElementTree.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_elementtree.so", 2);
# /Users/malmaud/anaconda/lib/python2.7/copy.pyc matches /Users/malmaud/anaconda/lib/python2.7/copy.py
import copy # precompiled from /Users/malmaud/anaconda/lib/python2.7/copy.pyc
# /Users/malmaud/anaconda/lib/python2.7/xml/etree/ElementTree.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/etree/ElementTree.py
import xml.etree.ElementTree # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/etree/ElementTree.pyc
# /Users/malmaud/anaconda/lib/python2.7/xml/etree/ElementPath.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/etree/ElementPath.py
import xml.etree.ElementPath # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/etree/ElementPath.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/pyexpat.so", 2);
import pyexpat # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/pyexpat.so
import _elementtree # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_elementtree.so
import wunderlist.config # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/config.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/config.pyc
import wunderlist.icons # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/icons.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/icons.pyc
import wunderlist.models # directory /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/models
import wunderlist.models # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/models/__init__.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/models/__init__.pyc
import wunderlist.models.preferences # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/models/preferences.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/models/preferences.pyc
import xml.parsers # directory /Users/malmaud/anaconda/lib/python2.7/xml/parsers
# /Users/malmaud/anaconda/lib/python2.7/xml/parsers/__init__.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/parsers/__init__.py
import xml.parsers # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/parsers/__init__.pyc
# /Users/malmaud/anaconda/lib/python2.7/xml/parsers/expat.pyc matches /Users/malmaud/anaconda/lib/python2.7/xml/parsers/expat.py
import xml.parsers.expat # precompiled from /Users/malmaud/anaconda/lib/python2.7/xml/parsers/expat.pyc
# /Users/malmaud/anaconda/lib/python2.7/encodings/ascii.pyc matches /Users/malmaud/anaconda/lib/python2.7/encodings/ascii.py
import encodings.ascii # precompiled from /Users/malmaud/anaconda/lib/python2.7/encodings/ascii.pyc
12:06:28 workflow.py:1498 DEBUG    No data stored for `prefs`
import workflow.update # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/update.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/update.pyc
# /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/web.pyc matches /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/web.py
import workflow.web # precompiled from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/workflow/web.pyc
# /Users/malmaud/anaconda/lib/python2.7/mimetypes.pyc matches /Users/malmaud/anaconda/lib/python2.7/mimetypes.py
import mimetypes # precompiled from /Users/malmaud/anaconda/lib/python2.7/mimetypes.pyc
# /Users/malmaud/anaconda/lib/python2.7/urllib.pyc matches /Users/malmaud/anaconda/lib/python2.7/urllib.py
import urllib # precompiled from /Users/malmaud/anaconda/lib/python2.7/urllib.pyc
# /Users/malmaud/anaconda/lib/python2.7/base64.pyc matches /Users/malmaud/anaconda/lib/python2.7/base64.py
import base64 # precompiled from /Users/malmaud/anaconda/lib/python2.7/base64.pyc
# /Users/malmaud/anaconda/lib/python2.7/urlparse.pyc matches /Users/malmaud/anaconda/lib/python2.7/urlparse.py
import urlparse # precompiled from /Users/malmaud/anaconda/lib/python2.7/urlparse.pyc
# /Users/malmaud/anaconda/lib/python2.7/ssl.pyc matches /Users/malmaud/anaconda/lib/python2.7/ssl.py
import ssl # precompiled from /Users/malmaud/anaconda/lib/python2.7/ssl.pyc
# /Users/malmaud/anaconda/lib/python2.7/textwrap.pyc matches /Users/malmaud/anaconda/lib/python2.7/textwrap.py
import textwrap # precompiled from /Users/malmaud/anaconda/lib/python2.7/textwrap.pyc
# /Users/malmaud/anaconda/lib/python2.7/contextlib.pyc matches /Users/malmaud/anaconda/lib/python2.7/contextlib.py
import contextlib # precompiled from /Users/malmaud/anaconda/lib/python2.7/contextlib.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_scproxy.so", 2);
import _scproxy # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_scproxy.so
# /Users/malmaud/anaconda/lib/python2.7/urllib2.pyc matches /Users/malmaud/anaconda/lib/python2.7/urllib2.py
import urllib2 # precompiled from /Users/malmaud/anaconda/lib/python2.7/urllib2.pyc
# /Users/malmaud/anaconda/lib/python2.7/httplib.pyc matches /Users/malmaud/anaconda/lib/python2.7/httplib.py
import httplib # precompiled from /Users/malmaud/anaconda/lib/python2.7/httplib.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/array.so", 2);
import array # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/array.so
# /Users/malmaud/anaconda/lib/python2.7/mimetools.pyc matches /Users/malmaud/anaconda/lib/python2.7/mimetools.py
import mimetools # precompiled from /Users/malmaud/anaconda/lib/python2.7/mimetools.pyc
# /Users/malmaud/anaconda/lib/python2.7/rfc822.pyc matches /Users/malmaud/anaconda/lib/python2.7/rfc822.py
import rfc822 # precompiled from /Users/malmaud/anaconda/lib/python2.7/rfc822.pyc
# /Users/malmaud/anaconda/lib/python2.7/bisect.pyc matches /Users/malmaud/anaconda/lib/python2.7/bisect.py
import bisect # precompiled from /Users/malmaud/anaconda/lib/python2.7/bisect.pyc
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/_bisect.so", 2);
import _bisect # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/_bisect.so
dlopen("/Users/malmaud/anaconda/lib/python2.7/lib-dynload/zlib.so", 2);
import zlib # dynamically loaded from /Users/malmaud/anaconda/lib/python2.7/lib-dynload/zlib.so
12:06:28 workflow.py:1974 DEBUG    Workflow version : 0.5.2
12:06:28 workflow.py:1389 DEBUG    Reading settings from `/Users/malmaud/Library/Application Support/Alfred 2/Workflow Data/com.ipaterson.alfred.wunderlist/settings.json` ...
12:06:28 workflow.py:2235 DEBUG    Update check not due

^Cimport wunderlist.handlers.login # from /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers/login.py
# wrote /Users/malmaud/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.C037B68D-8A28-46B1-8B28-DECC32EA7A49/wunderlist/handlers/login.pyc
12:06:58 workflow.py:1498 DEBUG    No data stored for `auth`
12:06:58 workflow.py:1612 DEBUG    Loading cached data from : /Users/malmaud/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/__workflow_update_status.cpickle
12:06:58 workflow.py:2183 DEBUG    update_data : {u'available': False}
<?xml version="1.0" encoding="utf-8"?>
<items><item valid="yes"><title>Please log in</title><subtitle>Authorize Alfred Wunderlist Workflow to use your Wunderlist account</subtitle><icon>icons/dark/account.png</icon></item></items>12:06:58 workflow.py:2165 DEBUG    Set last run version : 0.5.2
12:06:58 workflow.py:2010 DEBUG    Workflow finished in 30.172 seconds.
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] functools
# cleanup[1] _bisect
# cleanup[1] sysconfig
# cleanup[1] xml
# cleanup[1] _json
# cleanup[1] zipimport
# cleanup[1] encodings
# cleanup[1] array
# cleanup[1] encodings.ascii
# cleanup[1] math
# cleanup[1] workflow
# cleanup[1] exceptions
# cleanup[1] xml.etree
# cleanup[1] itertools
# cleanup[1] __future__
# cleanup[1] _collections
# cleanup[1] xml.parsers
# cleanup[1] operator
# cleanup[1] _heapq
# cleanup[1] sre_constants
# cleanup[1] wunderlist
# cleanup[1] _scproxy
# cleanup[1] _warnings
# cleanup[1] _functools
# cleanup[1] wunderlist.handlers
# cleanup[1] _codecs
# cleanup[1] pwd
# cleanup[1] _osx_support
# cleanup[1] copy
# cleanup[1] _sysconfigdata
# cleanup[1] _struct
# cleanup[1] keyword
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] site
# cleanup[1] contextlib
# cleanup[1] pyexpat
# cleanup[1] strop
# cleanup[1] grp
# cleanup[1] wunderlist.models
# cleanup[1] wunderlist.handlers.login
# cleanup[1] _weakref
# cleanup[1] _weakrefset
# cleanup[1] wunderlist.models.preferences
# cleanup[1] encodings.utf_8
# cleanup[1] wunderlist.handlers.route
# cleanup[1] workflow.update
# cleanup[1] wunderlist.auth
# cleanup[1] wunderlist.util
# cleanup[1] xml.parsers.expat
# cleanup[1] workflow.web
# cleanup[1] mimetypes
# cleanup[1] zlib
# cleanup[1] urllib2
# cleanup[1] wunderlist.icons
# cleanup[1] random
# cleanup[1] wunderlist.config
# cleanup[1] workflow.workflow
# cleanup[1] subprocess
# cleanup[1] httplib
# cleanup[1] bisect
# cleanup[1] signal
# cleanup[1] urlparse
# cleanup[1] plistlib
# cleanup[1] urllib
# cleanup[1] mimetools
# cleanup[1] hashlib
# cleanup[1] select
# cleanup[1] json
# cleanup[1] unicodedata
# cleanup[1] pickle
# cleanup[1] json.decoder
# cleanup[1] _hashlib
# cleanup[1] _random
# cleanup[1] shutil
# cleanup[1] datetime
# cleanup[1] gc
# cleanup[1] tempfile
# cleanup[1] xml.etree.cElementTree
# cleanup[1] ssl
# cleanup[1] json.encoder
# cleanup[1] rfc822
# cleanup[1] fcntl
# cleanup[1] json.scanner
# cleanup[1] marshal
# cleanup[1] textwrap
# cleanup[1] fnmatch
# cleanup[1] io
# cleanup[1] _io
# cleanup[1] base64
# cleanup[1] string
# cleanup[1] abc
# cleanup[1] binascii
# cleanup[2] heapq
# cleanup[2] struct
# cleanup[2] pyexpat.errors
# cleanup[2] collections
# cleanup[2] xml.etree.ElementTree
# cleanup[2] logging.handlers
# cleanup[2] threading
# cleanup[2] pyexpat.model
# cleanup[2] cStringIO
# cleanup[2] atexit
# cleanup[2] re
# cleanup[2] UserDict
# cleanup[2] codecs
# cleanup[2] _locale
# cleanup[2] logging
# cleanup[2] socket
# cleanup[2] thread
# cleanup[2] traceback
# cleanup[2] os
# cleanup[2] _sre
# cleanup[2] posixpath
# cleanup[2] errno
# cleanup[2] _socket
# cleanup[2] os.path
# cleanup[2] cPickle
# cleanup[2] weakref
# cleanup[2] sre_parse
# cleanup[2] copy_reg
# cleanup[2] sre_compile
# cleanup[2] linecache
# cleanup[2] _abcoll
# cleanup[2] genericpath
# cleanup[2] stat
# cleanup[2] _ssl
# cleanup[2] warnings
# cleanup[2] _elementtree
# cleanup[2] types
# cleanup[2] xml.etree.ElementPath
# cleanup[2] time
# cleanup sys
# cleanup __builtin__
# cleanup ints: 741 unfreed ints
# cleanup floats: 47 unfreed floats
idpaterson commented 8 years ago

I wonder if alfred-workflow is blocking on trying to access the auth token from the keychain. Are there any security prompts lingering on your desktop?

Try security find-generic-password -s com.ipaterson.alfred.wunderlist -a oauth_token -g, it should just immediately fail with security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

malmaud commented 8 years ago

That actually doesn't fail, but immediately produces output:

~> security find-generic-password -s com.ipaterson.alfred.wunderlist -a oauth_token -g
keychain: "/Users/malmaud/Library/Keychains/login.keychain"
class: "genp"
attributes:
    0x00000007 <blob>="com.ipaterson.alfred.wunderlist"
    0x00000008 <blob>=<NULL>
    "acct"<blob>="oauth_token"
    "cdat"<timedate>=0x32303135313230313032343934325A00  "20151201024942Z\000"
    "crtr"<uint32>=<NULL>
    "cusi"<sint32>=<NULL>
    "desc"<blob>=<NULL>
    "gena"<blob>=<NULL>
    "icmt"<blob>=<NULL>
    "invi"<sint32>=<NULL>
    "mdat"<timedate>=0x32303135313230313032343934325A00  "20151201024942Z\000"
    "nega"<sint32>=<NULL>
    "prot"<blob>=<NULL>
    "scrp"<sint32>=<NULL>
    "svce"<blob>="com.ipaterson.alfred.wunderlist"
    "type"<uint32>=<NULL>
password: "[elided]"
idpaterson commented 8 years ago

Interesting, had you used the workflow in the past? Perhaps try deleting the old token security delete-generic-password -s com.ipaterson.alfred.wunderlist -a oauth_token

idpaterson commented 8 years ago

I tried setting up a fake oauth token and couldn't get the workflow to hang so I'm going to look for other potential issues.

idpaterson commented 8 years ago

I found a report of what sounds like the same issue on the alfred-workflow project. @resamsel seemed to resolve the issue by deleting the workflow data and cache. Would you please try the following?

mv ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist.bak
mv ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist.bak

If that happens resolve the issue, would you be willing to email the backup files so that I can follow up with the author of alfred-workflow if I can find the problem?

adius commented 8 years ago

I'm having the same issue and so far none of your tips helped =(

malmaud commented 8 years ago

I never got it resolved either - I ended up just switching to the built-in 'quick add' wunderlist feature.

idpaterson commented 8 years ago

@adius and @malmaud, since I haven't been able to reproduce the issue let's try a few tests that will more clearly identify whether the keychain access is the issue. The attached workflow includes three commands that test the keychain with slightly different behavior.

To use this, please download and install the test workflow, then type the following in Alfred. The following is the expected output in Alfred for each test.

Test 1

test1 test 1 test1 apple apple test1 screen shot 2016-02-03 at 8 15 22 am

Test 2

test2 test2

No user input on this one.

Test 3

Same as test 1 but with the command test3.

If it hangs

If a test hangs you will see "Waiting..." rather than what is shown above. If we're particularly lucky, some but not all of these tests will hang. If they all hang then it at least confirms the problem is related to the keychain, but if none hang it suggests that the problem may lie elsewhere.

waiting

What are these tests?

The three tests attempt the following:

  1. Get the value for a keychain item that has not yet been set and allow the user to set it
  2. Set the value for a keychain item, then retrieve that value
  3. Set the value for a keychain item, then retrieve a different value and allow the user to set it

Thank you for taking the time to report and debug the issue!

idpaterson commented 8 years ago

@adius and @malmaud can you please try the simple test above in case it leads to a solution for other people who might be experiencing this problem?

adius commented 8 years ago

Sorry, but I think I can't help you anymore. It suddenly worked again for me. Not sure what caused this. Maybe a restart (but I already restarted it before and it didn't change anything then) I might have been logged out of the keychain, which would make a lot of sense, but I'm not sure. Thanks for you help anyway!

idpaterson commented 8 years ago

Thanks, I am at least glad to hear that it is not permanent. I encountered a similar issue yesterday where a settings.json.lock file was preventing the workflow from starting, but I think that was due to force-killing the workflow's python process.

georgebashi commented 8 years ago

I just hit the same bug. I ran the test workflow and got the correct output for Test 1 and Test2. For test 3 however, it said Current value: app. I tried running test3 foobar, and now it says Current value: foob. I can reproduce this most of the time. Interestingly, it seems to be when I type quickly and hit enter; if I pace myself and give it time to "catch up" it will work correctly. I have no idea if this is related, but I thought it was interesting nonetheless :)

After running these tests, my wl now reports no such column: t1.list_id. If I re-install the original workflow, it goes back to being stuck on Preparing workflow.

Let me know how else I can help - I managed to enter 5 whole tasks before it broke, and it was a glorious experience!

idpaterson commented 8 years ago

@georgebashi thanks, that observation with the truncated words is just a consequence of how Alfred handles script filters. I came up with a workaround for the workflow but didn't bother for the test.

Sorry about the no such column bug as well, the test workflow was built in the middle of preparing 0.6.0 so it did not support database migration yet. Do you have the same problem with 0.6.0-alpha.3? Sounds like the keychain may not be the issue. Before updating, can you paste the results of ls -la ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/ from the terminal as well as ls -la ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist/ - Thanks

idpaterson commented 8 years ago

Another thing to check: open up the Keychain Access app and search com.ipaterson. You should see a few keys in there from the tests, but look for the one with account oauth_token. Can you send a screenshot of the Access Control tab if it looks any different than this?

access control tab

karthikb351 commented 8 years ago

I'm facing the same issue :(

idpaterson commented 8 years ago

I really need feedback on the above questions in order to proceed with this, @karthikb351 and @georgebashi can you paste the results of ls -la ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/ from the terminal as well as ls -la ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist/ and also check the Keychain Access as described above the screenshot in my last comment? Thanks, I would greatly appreciate anyone who can stick with me for a few days to debug this

karthikb351 commented 8 years ago

Sure, I can be around for a while.

From ls -la ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/ from the terminal as well as ls -la ~/Library/Caches/com.runningwithcrayons.Alfred-2/W

s -la ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/
total 0
drwxr-xr-x   2 karthikbalakrishnan  staff   68 Feb 25 19:48 .
drwxr-xr-x  10 karthikbalakrishnan  staff  340 Feb 25 19:48 ..

From ls -la ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist/

drwxr-xr-x  4 karthikbalakrishnan  staff    136 Feb 25 19:48 .
drwxr-xr-x  5 karthikbalakrishnan  staff    170 Feb 25 19:48 ..
-rw-r--r--  1 karthikbalakrishnan  staff      0 Feb 25 20:06 __workflow_update_check.argcache
-rw-r--r--  1 karthikbalakrishnan  staff  45373 Feb 25 20:06 com.ipaterson.alfred.wunderlist.log

Contents of cat ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist/com.ipaterson.alfred.wunderlist.log

20:06:47 workflow.py:1654 DEBUG    No data stored for `prefs`
20:06:47 workflow.py:1654 DEBUG    No data stored for `prefs`
20:06:47 workflow.py:2142 DEBUG    Workflow version : 0.5.3
20:06:47 workflow.py:1545 DEBUG    Reading settings from `/Users/karthikbalakrishnan/Library/Application Support/Alfred 2/Workflow Data/com.ipaterson.alfred.wunderlist/settings.json` ...
20:06:47 workflow.py:2399 INFO     Checking for update ...
20:06:47 background.py:188 DEBUG    Command arguments cached to `/Users/karthikbalakrishnan/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/__workflow_update_check.argcache

Contents of cat ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.ipaterson.alfred.wunderlist/__workflow_update_check.argcache

(empty)

Looks like your settings.json is absent.

karthikb351 commented 8 years ago

The test workflow you provided hangs at test2 and test3, so it looks like bug has to do with keychain access, as you guessed.

But the values seem to be set in the keychain image

What else can I do?

idpaterson commented 8 years ago

Intriguing... the logs from 0.5.3 are very weird. Terminating at Command arguments cached to suggests that there may have been some sort of exception writing the argcache file, because there are other debug statements right after that.

Do the Access Control tabs of those keychain screens look the same as the one I posted above? Also were the logs from the actual version 0.5.3, or had you already downloaded the test version (the wl workflow is broken in the test version).

idpaterson commented 8 years ago

I've tried just about every angle I can think of on this and have only found one way to reliably get the workflows to hang. In some cases, especially on laptops, the default keychain may be set to automatically lock when the machine sleeps or after a certain period of time to ensure that your password is entered before the keychain can be used again.

If for any reason that password prompt (pictured below) or any other prompt from Keychain Access is ignored, the workflow will hang. Keychain Access needs to prompt you again in order to continue, but there is only one prompt at a time and it is still waiting for feedback on the first one.

security prompt

That said, it does not seem to be easy to ignore these popups since they sit in the middle of the screen over all other windows, so I have no confidence that this is related. Possibly an issue with multiple screens where the prompt appears offscreen, VNC, or some sort of window manager app misbehaving? This is just a thought, but I wanted to point it out since it is the only way that I have been able to get the workflow to hang with 100% repeatability.

idpaterson commented 8 years ago

Can any of you who had a problem with this check your Python version? parsedatetime 2.0 was released yesterday and an incompatibility with Python 2.6 was brought to light. I suspect that it would throw an exception rather than hang the workflow but again, I'm grasping at straws on this one.

python --version
pathikb commented 8 years ago

I just ran into this issue after adding a few tasks to my list.

python --version says: Python 2.7.10

Anything else you want me to try?

pathikb commented 8 years ago

On further debugging, I saw multiple instances of Python running. I killed them all and tried again. Still doesn't work.

I tried running the python script directly. I, unfortunately, removed the keychain entry while debugging and the script now complains about "authorization missing". So, I deleted the workflow folder in Application Support/ Alfred 2 folder and it seems to be working fine now.

So, to summarize: this issue is very likely related to multiple python processes running in background. When I killed them all and re-tried, it worked fine. (ofcourse auth was my mistake)

pathikb commented 8 years ago

Sorry for making multiple comments, but I ran into the issue again. I think it should be very easy for you to reproduce this. Just try to create multiple tasks using "wl " very quickly, one after the other. After creating 5-6 tasks, it (the python process) will get stuck.

The only way to fix this is to kill all open python process, remove the workflow directory in Application Support ( rm -r com.ipaterson.alfred.wunderlist ) and try again.

idpaterson commented 8 years ago

@pathikb I wasn't able to reproduce that by entering tasks quickly but will try again later from a faster machine. Would you please check whether there are any *.lock files in the workflow data directory once your workflow gets stuck?

pathikb commented 8 years ago

There is one settings.json.lock file

idpaterson commented 8 years ago

Perfect, that is what I had run into two weeks ago on my faster computer. I haven't been able to gather enough info from all the reports here and based on initial contributors clearing their workflow data and still having problems I'm not sure if it is the entirety of the issue, but that's a good place to start.

Can you check whether just deleting that file fixes the Preparing Workflow message? If not, try killing the hung processes. This is certainly related to how Alfred processes the script filter since each keystroke has the potential to kill a running process (otherwise there were issues with the results not matching the text you've typed in the last ~200ms).

I will need to see whether it is safe to delete that lock file. Likely a better solution will be to issue a pull request against Alfred-workflow to use its @uninterruptible decorator to ensure that lockfiles are deleted and the associated file changes completed to avoid corrupt settings files.

pathikb commented 8 years ago

Indeed, you are right. Just deleting the settings.json.lock fixes the Preparing Workflow message.

idpaterson commented 8 years ago

Okay great! I am not going to push an official release that deletes the settings.json file since a more robust fix should be possible, but until this is fixed anyone affected can try modifying their workflow in Alfred to use the following code in the wl script filter. Just double-click the wl script filter in the Alfred Workflows tab and paste the following (adjusting the path if necessary):

export LC_CTYPE="$(defaults read -g AppleLocale).UTF-8"
echo "{query}" > .query
rm -r ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/*.lock
/usr/bin/env python -O alfred-wunderlist-workflow.py "{query}"

The settings.json file does not store anything specific to Wunderlist and your preferences (except the new Prerelease updates channel preference) are all stored elsewhere. It is used internally by Alfred-workflow to keep track of workflow versions and a few settings that are not used by the Wunderlist workflow. The data store that the workflow uses for its preferences is guarded as an uninterruptible operation, so I believe that applying the same concept to the settings file should be a good solution.

rm lock file

pathikb commented 8 years ago

Sounds good. Seems like a decent workaround for now. Thanks

idpaterson commented 8 years ago

Thank you for following up, this one has been tough to rein in.

chrislopresto commented 8 years ago

@idpaterson The wl script workaround worked for me as well. The workflow suddenly stopped working for me earlier this week. I just now got around to some Sat afternoon debugging, found this issue... voila, fixed.

I'm a software guy, and yours is the Alfred workflow I always reference as the gold standard. I'd be happy to help test/troubleshoot things going forward.

Thanks for the fine, fine work.

idpaterson commented 8 years ago

@chrislopresto thank you for the kind words, I'm glad you are enjoying the workflow and were able to resolve this issue. Please check out the latest 0.6.0-alpha release if you are interested in testing a lot of new functionality!

mattwkelly commented 8 years ago

I had the same issue.

python --version Python 2.7.10

Pasting the lines above fixed it for me: export LC_CTYPE="$(defaults read -g AppleLocale).UTF-8" echo "{query}" > .query rm -r ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/*.lock /usr/bin/env python -O alfred-wunderlist-workflow.py "{query}"

Thanks!

idpaterson commented 8 years ago

Thanks for the feedback, please download the latest 0.5.4 release which includes the proper fix to ensure that the lock file does not get stuck. You will not need the rm line after version 0.5.4.

The alpha release has not been updated with this fix yet since I'm in the middle of some code cleanup and waiting for my patch to officially get merged into alfred-workflow. So if you're adventurous and want to test the new task search and due features in 0.6.0-alpha before I get the next update out later this week, just paste the rm line after downloading as shown above.

grobgl commented 8 years ago

The issue persists for me in version 0.5.4. I tried all of the suggestions above but that didn't seem to fix it. Same with the 0.6.0-alpha.

idpaterson commented 8 years ago

@grobgl let's try a bit of debugging. I feel like there may have been a few separate causes to the hang throughout the course of this issue so first let's start by identifying the one that was intentionally fixed to see if it is still affecting you meaning that the fix is invalid.

Do you have a settings.json.lock file in ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/? Go ahead and paste the result of

ls -la ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/

Had you been able to use the workflow a few times before it got hung up?

grobgl commented 8 years ago

Haven't been able to get it to run at all. This is what I get:

MacBook:~ Georg$ ls -la ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/
total 0
drwxr-xr-x  2 Georg  staff   68 10 Mar 16:27 .
drwxr-xr-x  6 Georg  staff  204 10 Mar 16:27 ..
idpaterson commented 8 years ago

Thanks, this is one of the other cases that came up but I was not able to reach the user again for follow-up. Are you willing to stick around for awhile to help debug this? What you're seeing would not have been addressed by the fix in 0.5.4 for the more common cause of getting stuck on "Preparing workflow," but since someone else was in your situation as well I want to do what I can to fix it. Thanks for reporting!

grobgl commented 8 years ago

I'll be around, sure.

idpaterson commented 8 years ago

Thanks, I'm going to need to walk through some of the alfred-workflow library code to see what would have possibly gotten hung before (or during) writing any files to that directory.

Until I get a bearing on that, do you have multiple screens, or is there any other chance that a Keychain Access prompt is stuck open somewhere? That can happen when your keychain is locked and the OS needs to prompt you to unlock it when the workflow checks your Wunderlist auth token. I think it's unlikely since that would probably be on top of other windows, but it's the one weird case where I had a 100% repeatable experience getting stuck on Preparing workflow.

grobgl commented 8 years ago

I do not use a second screen. I closed all running applications which didn't help either. However, I then rebooted and it allowed me to authorise after that. All good now.

idpaterson commented 8 years ago

Well, that's good. Just let me know here if it happens again. Note that the 0.6.0-alpha does not yet have the settings.json.lock fix yet, so check earlier comments on how to workaround that first.