Open MoOx opened 8 years ago
Same error here, I've tracked it down to that line yielding an empty string, I don't know why...
I might add that it worked on another machine yesterday, I'm trying it inside cloud9 now and it doesn't.
So I don't know if it's the same problem for you but I had to revoke my existing token to make it work again. I also logged henrahmagix/github-oauth-prompt#11 to track the source of the problem. It's going to be a problem for people switching computers often, I don't see an alternative.
So.... Any tips for this error, gents? [two factor related]
SyntaxError: Unexpected token c
at Object.parse (native)
at ###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\lib\github-oauth-prompt.js:115:32
at Object.proto.sendError (###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\node_modules\github\api\v3.0.0\index.js:32:13)
at ###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\node_modules\github\api\v3.0.0\authorization.js:119:29
at ClientRequest.<anonymous> (###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\node_modules\github\index.js:770:17)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:256:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
@henrahmagix
+1 create this simple go script to do it for me but you need to generate your personal oauth token https://github.com/ecasilla/github_labelmaker
@jaygeek's error seems to be the error response is no longer a JSON-parseable string, but probably just a regular string.
@Marsup If you or anyone else has time to look into and make a pull-request (with tests) for https://github.com/henrahmagix/github-oauth-prompt/issues/11 I'll be happy to review.
Apologies all for missing this and https://github.com/henrahmagix/github-oauth-prompt/issues/11
I am getting @jaygeek's error too. Is there any word on how to fix that?
It seems github api has changed maybe, and the node-github
version is really old.
I have forgotten why I use http to request github.
I was having 2-factor auth problems as well.
A friend of mine mentioned that he had a .github-labels
file in his home directory with a GitHub token. I created Personal Access Token on GitHub for public repo access and pasted that token in the .github-labels
file.
Then the app worked just fine.
See https://github.com/popomore/github-labels/pull/37 to use a personal access token
It seems it should work but it didn't for me (and error is not clear enough)
Any idea what am I doing wrong?