gharlan / alfred-github-workflow

GitHub Workflow for Alfred
MIT License
2.89k stars 146 forks source link

Recently stopped working #27

Closed chrisrichards closed 10 years ago

chrisrichards commented 10 years ago

This workflow has recently stopped working for me. Turning on debug in Alfred shows the following after entering 'gh ' in Alfred:

Starting debug for 'GitHub commands'

[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row (null), Col (null): 'Document is empty' in XML:
Warning: Invalid argument supplied for foreach() in /Users/chrisr/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6BFDEAD2-8BDD-4CFA-A750-E7C344C74653/search.php on line 173

Warning: Invalid argument supplied for foreach() in /Users/chrisr/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6BFDEAD2-8BDD-4CFA-A750-E7C344C74653/search.php on line 206
<?xml version="1.0"?>
<items><item uid="56dfe8cbd30155d0d328f3d777767991" autocomplete=" my " valid="no"><icon>icon.png</icon><title>my &#x2026;</title><subtitle>Dashboard, settings, and more</subtitle></item></items>
cynipe commented 10 years ago

same problem for me, too.

geckotang commented 10 years ago

I have same problem and I think https://github.com/command_bar/ is dead.

gharlan commented 10 years ago

Yes, GitHub has removed the command bar and the workflow has used the same (unofficial) api. So I have to use the official api now, which is not so smart for this use case. I'm not sure when I will have the time for rebuilding the workflow, sorry.

gesa commented 10 years ago

I wonder if this could be forked and rewritten using https://github.com/github/hub ?

Gowiem commented 10 years ago

@gesa That sounds like it would be awesome idea. Do you (or any one else here) have any interest in teaming up to do that? I could get behind working on a project like this as long as it is written in pretty much anything other than PHP :grin:

gesa commented 10 years ago

I know a decent amount of JavaScript (node), but I don't know really if I'd have the time/experience to organize this. I might be able to contribute though. Mostly I'm a front-end dev with chronic scope creep.

Sent from my iPhone

On Aug 26, 2014, at 1:36 PM, Matt Gowie notifications@github.com wrote:

@gesa That sounds like it would be awesome idea. Do you (or any one else here) have any interest in teaming up to do that? I could get behind working on a project like this as long as it is written in pretty much anything other than PHP

\ Reply to this email directly or view it on GitHub.

wolph commented 10 years ago

Here's a similar script that still works: https://github.com/willfarrell/alfred-github-workflow

But... I'd rather have this script working again, with the caching and all it's much nicer :)

gharlan commented 10 years ago

An update is available. The workflow is using the official api now (with OAuth).

At the moment some commands are disabled, but they will come back soon. I also have to resolve some issues and to make improvements. But feel free to update and to test the current state.

wolph commented 10 years ago

It breaks with a parse error for me on line 166:

$repos = [];
$urls = ['/user/starred', '/user/subscriptions', '/user/repos'];

Replacing that with this helps for the parse errors but it still won't work:

$repos = array();
$urls = array('/user/starred', '/user/subscriptions', '/user/repos');

So... we login using oauth but it redirects you to http://localhost:2233/?access_token=...&token_type=bearer&scope=repo (where nothing is running) and the server.php script gives me FAILURE!%

Manually setting the token (and storing it) makes the login work (I just modified server.php to set the $_GET variable but through alfred I don't get any results.

gharlan commented 10 years ago

Ok, added back PHP 5.3 compatibility. But you have to call gh > login <access_token> manually. With PHP 5.4 (bundled with OS X 10.9+) the PHP built-in webserver is used and the access_token is saved automatically (via redirect to localhost:2233).

Gowiem commented 10 years ago

@gharlan Awesome! Psyched to have this working again, so thanks for putting in the time.

rianrainey commented 10 years ago

@gharlan++

gesa commented 10 years ago

@gharlan you're my superhero.

wolph commented 10 years ago

Awesome, works again. Thanks for the quick fix @gharlan!

The first few times it's really slow for me but after that it works fine.

boneskull commented 10 years ago

Glad I found this issue. After OAuth authorization, my browser goes to a blank page at:

http://localhost:2233/?access_token=<token>&token_type=bearer&scope=repo

Pasting the token from this URL into gh > login works.

yock commented 10 years ago

I'm also having this issue, and it seems that there might not be a server listening on port 2233 in some cases. I'm trying to work out of I did something to disable it or if this is something that needs turned on.

gharlan commented 10 years ago

@boneskull and @yock Which OS X and PHP version (in terminal php -v)?

With PHP 5.3 it is not possible to start the server. But then you shouldn't be redirected to localhost. I will check it again.

yock commented 10 years ago

I'm on Mavericks, and PHP is version 5.4.

On Tue, Sep 2, 2014 at 12:28 PM, Gregor Harlan notifications@github.com wrote:

@boneskull and @yock Which OS X and PHP version (in terminal php -v)?

With PHP 5.3 it is not possible to start the server. But then you shouldn't be redirected to localhost. I will check it again.

Reply to this email directly or view it on GitHub: https://github.com/gharlan/alfred-github-workflow/issues/27#issuecomment-54178854

boneskull commented 10 years ago

5.4.24

gharlan commented 10 years ago

I'm on Mavericks, and PHP is version 5.4.

..

5.4.24

hmm strange, don't know why the server does not start for you. I will try to improve the process when I have more free time.

gharlan commented 10 years ago

There are still some things which can be improved, but I will close the issue for now since the workflow is working again. Please open new issues for still existing bugs.

steveoh commented 10 years ago

The lastest update broke me. The one prior was working.

gharlan commented 10 years ago

-> #29