idpaterson / alfred-wunderlist-workflow

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

Issues with installation #26

Closed Muurtegel closed 10 years ago

Muurtegel commented 10 years ago

I seem to be having issues to install the workflow. I have imported the download into Alfred and I have Enabled Access for Assistive Devices. But Alfredapp doesn't respond to the commands as it should.

When I enter wl and press enter, it opens Wunderlist and creates a new task. When I enter wl and press the spacebar, the command is not recognized and Alfredapp suggests to search for 'wl' on google/amazon/wikipedia instead.

The wllist command seems to work perfectly though.

Do I have to perform any additional actions to use the workflow? The readme explains that the workflow is based on the qWorkflow library. Do I have to install this library?

I'm looking forward to using this wonderful workflow!

Thank you, Maarten

p.s. I'm using the latest version of Wunderlist 2 and Alfred 2 on OSX Mavericks

idpaterson commented 10 years ago

Thanks I'll get back to you this evening after investigating. I am currently waiting for feedback from Wunderlist on some questions that will determine the course of the project over the next few versions.

Are you on the latest Mavericks or an older OS version? You won't need to install anything; hopefully I haven't broken the workflow but that may be the case.

Muurtegel commented 10 years ago

Thanks for the (very) quick reply!

Yes, I'm on OSX Mavericks. I just downloaded Wunderlist this afternoon, so it should be the latest version. Alfred is also updated to the latest version.

Let me know if you need any more information.

idpaterson commented 10 years ago

Wow so Mavericks has a very serious AppleScript bug that is corrupting the workflow's settings file. As soon as the user's Wunderlist lists are cached, Mavericks zeroes out the workflow's preferences leaving a blank, invalid file. The same thing happens in a simple test script with any list and others have reported it as an OS bug.

Working on a fix now.

idpaterson commented 10 years ago

Please download the 0.201 release here or pull in the update using alleyoop if you use it.

Does that fix the problem for you?

Muurtegel commented 10 years ago

Unfortunately not, I get the same behaviour as before.

idpaterson commented 10 years ago

Rats, sorry about that. Can you try deleting the workflow settings file manually? I am on mobile now and don't have the exact path but I think it is located at something like ~/Library/Application Support/Alfred 2/Workflow Data/com.github.ipaterson.wunderlist/settings.plist

If that file comes back on the next wl and is completely empty then the same problem is still lingering.

If that doesn't help, try opening the Console to see if there is an error message every time you try to use the wl command.

Muurtegel commented 10 years ago

No problem at all, I'm amazed how fast you're trying to fix this.

The settings.plist seems to return rather empty indeed:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>listsUpdatedDate</key>
    <date>1999-12-31T23:00:00Z</date>
</dict>
</plist>

Also, this is the error I found in the console:

14/11/13 11:33:21,099 Alfred 2[277]: [ERROR] Script XML Parse Error occured Error Domain=NSXMLParserErrorDomain Code=4 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)" UserInfo=0x60800047d2c0 {NSXMLParserErrorColumn=1, NSXMLParserErrorLineNumber=1, NSXMLParserErrorMessage=Document is empty
}
idpaterson commented 10 years ago

Yesh I guess we're not in December of 1999. Bizarre! The same thing is happening for me now; this is a different issue but certainly related. Previously when the plist was empty it was zero bytes blank file completely empty.

I believe that I have fixed this second problem, but before releasing it to the world I'll have you try it out. Please follow these steps to test before updating to make sure we're seeing the same thing:

  1. Quit Wunderlist and use the wl command: command should error out
  2. Open Wunderlist and use the wl command: you should see your lists in Alfred
  3. Download and install the update here
  4. Quit Wunderlist and use the wl command: Wunderlist should open automatically and you should see your lists in Alfred

If all that is correct, the problem was that I omitted the procedure that launches Wunderlist and waits for it to initialize before trying to pull data from the Wunderlist UI when improving the speed of feedback for version 0.2.

Muurtegel commented 10 years ago

It works exactly as you described and after the lists show up perfectly now. I did run into another bug now. I'm not sure if it's related to the update or that it was already there, but here it goes:

Alfred seems to crash/close with the wl command when Wunderlist is running without a window, but with the focus on another app. Here is how you can reproduce it:

  1. Close the Wunderlist window with CMD+W
  2. Open a random app (I tried Firefox and iMessage, seems to be the same for both)
  3. Run alfred with the wl command

The Wunderlist app will gain focus (it turns up in the OSX menu at the top of the screen) and alfredapp will close. I didn't get any error messages in the console though.

p.s. thanks for the great workflow though. I think I'm going to use this a lot! And thanks for the great (and very fast) help with these errors.

idpaterson commented 10 years ago

Thanks for the report, glad to hear it's working now.

idpaterson commented 10 years ago

This needs some finesse before the update goes live, I need to make the launching of Wunderlist conditional. I recall now that the original intention was to avoid focusing Wunderlist unless absolutely necessary. "Absolutely necessary" in this case would mean only if there is no cached list info. You'll probably notice Alfred closing more often than not when you try to use wl which is not supposed to happen.

Normally the list info is updated whenever it is older than 30 seconds, but that process will cause Alfred to be dismissed if Wunderlist is not already on the screen, so it's best left for once you've actually added the task since Wunderlist will be focused and Alfred dismissed anyway. I noticed a few other timing issues as well when running through the tests so I'll spend some time to get this right before releasing.

idpaterson commented 10 years ago

Thanks again for all your help, would you mind a bit more testing? I am hopeful that the upcoming 0.202 release will fix your original problems, along with #27 and #28. As mentioned in my last reply, the original fix to this particular issue was not ideal.

You can download the update here, just let me know with a reply in each issue if it looks good!

Your issues have been added as test cases and I created a tool to automate testing which will make releases a lot simpler and quicker for me.

Muurtegel commented 10 years ago

No problem at all, thank you for updating the workflow!

This issue seems to be resolved. The 'wl' command works fine now.

idpaterson commented 10 years ago

Perfect, thanks! That was fast - thanks for checking the others too. Sounds like it's release time.