Jump to content

Workflow - unable to run task


Recommended Posts

Hey everybody,

 

 

last week i tried to sync my Alfred settings for the first time.

Since then i am getting this error below when i try to run a workflow command.

 

I have tried to wait long enough to the settings are really synced.

I tried to install alfred new.

I tried to work without syncing.

I tried a new account on my mac.

 

But nothing helped. Vero and Andrew from Alfred tried to help me a lot, but without success.

 

Andrew mentioned that i could have something to do with PHP, because these 3 workflows i have tested are all using PHP.

I installed a new PHP version with Homebrew some time ago. I am not sure if the problems started right afterwards, but it could be.

 

Workflows i tested: color, caniuse, domainr

 

http://coding.smashingmagazine.com/2013/10/25/hidden-productivity-secrets-with-alfred/

 

I tested the example workflow "open iMG in Safari" and there everything is working.

 

It is really strange, because before the syncing everything worked fine.

 

Does anyone has any tips? I just want to use Alfred again. I need it everyday in workflow.

Thanks and cheers

 

Christoph

 

 

 

alfred_error.png

alfred_sync.png

Link to post

Drop to a terminal and do a 'which php' and see which version its using by default. See if it's /usr/bin/php, thats the default.

 

Another thing you could do is to open the folder for those workflows and try to run them from the command line and see if they work properly that way. For instance, with Tyler's colors workflow, open the folder where the files are stored (right click on the workflow in Alfred and select "Show in Finder", then you can select a file, press Cmd+Opt+\ and select "Open Terminal Here"). Once you are at a prompt where the files are, try running if manually like this:

php -f colors.php -- 'ffffff' 'hex'

It should return some XML that would have been the results provided back to Alfred. Did this work as expected? Were there any additional errors? You should received ONLY xml back. If there is anything else, report back what it is. If the result of 'which php' was something other than /usr/bin/php, then try running the same command above by specifying that original version instead of whatever the current is. You can do this by specifying the full path to it.. so, in the command above, instead of just typing 'php ...' do '/usr/bin/php -f colors.php .....'

 

Let us know what the outcome of this stuff is

Link to post

Hey,

 

thx for trying to help. In the screenshot you can see that i get XML back and the PHP version and location.

 

I noticed that the errors are different now. I am not sure if this is because of my new installations of Alfred. The posix_spawn error i get with the workflows "caniuse" and "encode". The workflow "color" ist not working, but i do not get an error. The triggers are just doing nothing. And the "dash" workflow is working now.They are all from here: http://coding.smashingmagazine.com/2013/10/25/hidden-productivity-secrets-with-alfred/

 

Thx and cheers

Christoph

 

phpcolor.png

Link to post

I haven't tested Colors on PHP v5.5.6. I'm running v5.4.17. From your screenshot, though, it appears to be working as expected.

 

Perhaps there's an issue with your '/usr/bin/php' installation? Try running the same commands as before, but use '/usr/bin/php' instead of 'php'.

 

Also, just for kicks, I made a custom build of Colors that uses '/usr/local/bin/php' instead of the 'php' alias. This will not work on most systems! However, since you have a custom PHP installation, it should work.

Link to post

I haven't tested Colors on PHP v5.5.6. I'm running v5.4.17. From your screenshot, though, it appears to be working as expected.

 

Perhaps there's an issue with your '/usr/bin/php' installation? Try running the same commands as before, but use '/usr/bin/php' instead of 'php'.

 

Also, just for kicks, I made a custom build of Colors that uses '/usr/local/bin/php' instead of the 'php' alias. This will not work on most systems! However, since you have a custom PHP installation, it should work.

 

Thanks for pitching in and helping with this Tyler

Link to post

Thx Tyler!

 

So the other color workflow you proved did work! So this has something to do with my new PHP location?

 

But the commands with /usr/bin/php not, if i die it the way you meant it. (see screenshot) Did i do something wrong with the install of the new php? Should there still be the old PHP version in /usr/bin/php ?

 

Thx a lot for your held and time!

 

Cheers Christoph

 

alfred_php.png

Link to post

Hey,

 

i guess this makes finally sense. I installed a newer php version with homebrew. It looks like Homebrew's installation folder is the /usr/local/bin folder.

I tried to create the symlink but that did not work. I also saw through the Homebrew doctor, that there was a slash too much in my PATH. Stillt not sure what the exact problem was, but probably all of that together. I would like to reinstall PHP. Any recommendations for that? Do you use Homebrew too?

Is it better to install PHP in /usr/bin/ or is it no problem when i use a symlink? I would like to reinstall PHP to clean the mess i have made.

 

Thx a lot!

Christoph

 

UPDATE:

 

i reinstalled PHP now with Homebrew. But i had no change to change the directory. So php55 is now again in the /usr/local/bin/php folder.

Maybe i did the symlink before wrong?

 

ln -s /usr/local/bin/php /usr/bin/php

 

Right?

Thx Christoph

Edited by christophrumpel
Link to post

Hey,

 

i guess this makes finally sense. I installed a newer php version with homebrew. It looks like Homebrew's installation folder is the /usr/local/bin folder.

I tried to create the symlink but that did not work. I also saw through the Homebrew doctor, that there was a slash too much in my PATH. Stillt not sure what the exact problem was, but probably all of that together. I would like to reinstall PHP. Any recommendations for that? Do you use Homebrew too?

Is it better to install PHP in /usr/bin/ or is it no problem when i use a symlink? I would like to reinstall PHP to clean the mess i have made.

 

Thx a lot!

Christoph

 

UPDATE:

 

i reinstalled PHP now with Homebrew. But i had no change to change the directory. So php55 is now again in the /usr/local/bin/php folder.

Maybe i did the symlink before wrong?

 

ln -s /usr/local/bin/php /usr/bin/php

 

Right?

Thx Christoph

 

I don't use homebrew. I'm working off my (limited) experience with symlinking and the command line, as well as some good old Google searching ;).

 

That said, I did find a question on Ask Ubuntu about this. Seems that the only difference between your code and theirs is sudo. I guess I would try

sudo ln -s /usr/local/bin/php /usr/bin/php
Edited by Tyler Eich
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...