idpaterson / alfred-wunderlist-workflow

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

XML error from Wunderlist workflow (Wunderlist API is down) #136

Closed william-gill closed 8 years ago

william-gill commented 8 years ago

Hi, I'm getting an XML error back from the service when trying to add a new task via the workflow. See here.

It was working previously, and stopped working this morning. cheers

csteinlehner commented 8 years ago

I get this also sometimes (randomly at it seems). Most of the times if I try again, it works. Of course a little bit annoying, because if I don't see that there is this error, the todo is lost.

aetjansen commented 8 years ago

Same here. I get an XML error notification when I enter a task using the workflow. It worked fine until this morning indeed.

More specifically, this is what I get in the notification (screenshot): <?xml version="1.0" encoding="utf-8"?>...

Just an xml header, I know, but maybe it helps locating the source of the issue? And different from what william-gill is reporting, as the notification I see literally ends with the three dots I typed above :-)

idpaterson commented 8 years ago

Thanks for reporting, I'll first check out whether this is related in any way to macOS Sierra or the Wunderlist API.

idpaterson commented 8 years ago

This indeed seems to be an API problem. Looking at the debugger (beetle icon in Alfred's page for the workflow) I see the following:

[2016-09-21 06:23:43][ERROR: action.script] 2016-09-21 06:23:43,294 workflow     ERROR    No JSON object could be decoded
Traceback (most recent call last):
  File "/Users/ian/Projects/wunderlist-swift/dist/workflow/workflow/workflow.py", line 2178, in run
    func(self)
  File "alfred-wunderlist-workflow.py", line 16, in main
    route(wf.args)
  File "/Users/ian/Projects/wunderlist-swift/dist/workflow/wunderlist/handlers/route.py", line 77, in route
    handler.commit(command, modifier)
  File "/Users/ian/Projects/wunderlist-swift/dist/workflow/wunderlist/handlers/new_task.py", line 163, in commit
    completed=task.completed)
  File "/Users/ian/Projects/wunderlist-swift/dist/workflow/wunderlist/api/tasks.py", line 82, in create_task
    info = req.json()
  File "/Users/ian/Projects/wunderlist-swift/dist/workflow/requests/models.py", line 826, in json
    return complexjson.loads(self.text, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

I don't see any issues over at the Wunderlist API bug tracker yet, going to do some digging.

aetjansen commented 8 years ago

If it helps, I am not on Sierra yet. To me it occurred while running OSX 10.11.6, using the latest version of your workflow on Alfred v3.1.1 [737] and Wunderlist 3.4.4 (40).

idpaterson commented 8 years ago

HTTP/1.1 503 Service Unavailable: Back-end server is at capacity

This will continue to be a problem until Wunderlist gets it under control. Meanwhile it is a good opportunity to work on making the workflow fail more informatively.

For anyone experiencing this problem, trying again later may work. Alfred makes that a bit easier by storing recent queries – in case you don't already using this feature the up arrow can be used to recall past task entries: past queries

You can also track Wunderlist's response to this issue on their status page

idpaterson commented 8 years ago

I'll have to patch alfred-workflow in order to get the error to show as text rather than that XML blob. Thanks everyone for reporting and checking back in!

The error would have instead looked like this: server error

I don't think there is a way in Alfred 2 to conditionally show something like Large Type to make this more obvious but it would be possible in Alfred 3. However, Large Type seems pretty ridiculous, filling my entire screen with this: error

An error sound might work better and support both Alfred 2 and 3.

aetjansen commented 8 years ago

Thank you for your quick response. A more meaningful error would be handy, maybe include a reference to Wunderlist's status url?

idpaterson commented 8 years ago

I like the idea of linking to the Wunderlist status page, that would help to identify whether the problem is on Wunderlist or the local network. Alfred will not allow me to do anything fancy when you actually submit the task (only a few lines of text for the notification) but I could trigger Alfred to show up again with more information about the error and a link to the status page. I'll give that some thought. It is infrequent enough that I don't want to put too much effort into it but like @csteinlehner mentioned it is currently easy to not notice the error and lose that task.

idpaterson commented 8 years ago

Well, I did not anticipate having multiple days of downtime otherwise probably would have pushed out a quick fix to avoid showing the error for others. I may consider working on the idea proposed by @aetjansen this evening (it is morning now) if Wunderlist is still down.

idpaterson commented 8 years ago

Wunderlist is back online. I will close this issue tomorrow if it looks like the team has permanently resolved the API issues and open a new one for the improved error handling work.

william-gill commented 8 years ago

Thanks for working on this and keeping us up to date! I can also confirm the workflow is now working again as expected. :)

idpaterson commented 8 years ago

139 will track the improved error handling. For 0.6.2 I patched alfred-workflow to show the correct text for errors rather than XML code.

csteinlehner commented 8 years ago

After updating to 0.6.2 I always get the XML error as notification, but the Task gets created.

idpaterson commented 8 years ago

Can you see what the full error message is in the workflow's debugging screen in Alfred?

csteinlehner commented 8 years ago

unfortunately there is nothing in the debug log. I just have this notification bildschirmfoto 2016-09-26 um 14 17 08

idpaterson commented 8 years ago

Got it, thanks. A few people have downloaded 0.6.2 already so I'm going to push out the fix as 0.6.3 =\

idpaterson commented 8 years ago

0.6.3 is up