Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github connection fails after following all the steps #6

Closed
ralfschimmel opened this issue Nov 6, 2012 · 13 comments
Closed

Github connection fails after following all the steps #6

ralfschimmel opened this issue Nov 6, 2012 · 13 comments
Assignees
Labels

Comments

@ralfschimmel
Copy link

After following all the required steps I can login on strider on heroku. When clicking connect to Github I get the Github auth page, after clicking Allow i get:

Express
500 Error: Step getCode of github is promising: code ; however, the step returns nothing. Fix the step by returning the expected values OR by returning a Promise that promises said values.
at Object.Step.exec (/app/node_modules/everyauth/lib/step.js:69:11)
at RouteTriggeredSequence.materializedMethods.start (/app/node_modules/everyauth/lib/stepSequence.js:39:39)
at RouteTriggeredSequence.routeHandler (/app/node_modules/everyauth/lib/routeTriggeredSequence.js:16:13)
at nextMiddleware (/app/node_modules/connect/lib/middleware/router.js:175:25)
at param (/app/node_modules/connect/lib/middleware/router.js:183:17)
at pass (/app/node_modules/connect/lib/middleware/router.js:191:11)
at Object.router (/app/node_modules/connect/lib/middleware/router.js:197:7)
at next (/app/node_modules/connect/lib/http.js:204:15)
at Promise.everyauth.middleware.connect.router.modules (/app/node_modules/everyauth/index.js:43:11)
at Promise.addBack (/app/node_modules/mongoose/lib/promise.js:128:8)

@ghost ghost assigned niallo Nov 6, 2012
@niallo
Copy link
Member

niallo commented Nov 6, 2012

Hi,

For Github OAuth to be happy, all the URLs must match - the URLs in the config.js and the Github OAuth application. Common culprits for mismatch are the protocol (http vs https).

Please verify they all match up.

@ralfschimmel
Copy link
Author

They seem to match:

config.js contains:

// Server URL on the Internet
var sm = exports.strider_server_name = "https://strider-topicus.herokuapp.com/";

And Github app contains:

https://dl.dropbox.com/u/6675617/Screen%20Shot%202012-11-06%20at%2011.46.42%20.png

@ralfschimmel
Copy link
Author

Tested both http and https on all vars

@niallo
Copy link
Member

niallo commented Nov 6, 2012

Can you try removing the trailing slash in the server name and seeing if that fixes it?

e.g.

var sm = exports.strider_server_name = "https://strider-topicus.herokuapp.com";

If that solves the issue, we can patch Strider to be less brittle in this regard.

@ralfschimmel
Copy link
Author

Indeed, that is the problem. I will not close it, seems to me you should fix this :-)

btw. now it works like a charm, first build + deploy is a fact, awesome work

@niallo
Copy link
Member

niallo commented Nov 6, 2012

Yep, will definitely fix. Acknowledge the setup process is more annoying than it could be. I am working to improve this (web-based installer).

Glad Strider is working for you!

@acreeger
Copy link
Contributor

This seems to be a redirect_uri_mismatch - is fixing this as simple as stripping the trailing slash where it is used in auth.js?

@niallo
Copy link
Member

niallo commented Jan 25, 2013

Probably. Can you check the value of exports.strider_server_name in config.js on Heroku? (heroku run cat config.js or similar)

@acreeger
Copy link
Contributor

Not sure I follow you... The contents of config.js in heroku is identical to what is commited to the repo. When the github connection breaks, strider_server_name has a trailling slash, and when I remove it, all is good.

I'm pretty sure I'm missing your point 😄

@niallo
Copy link
Member

niallo commented Jan 25, 2013

I removed the trailing slash from config.js in master a moment ago. The web installer should write a value without a trailing slash, too.

So I just wanted to verify that was indeed the cause of your problem. Thanks for confirming!

@acreeger
Copy link
Contributor

Ahh, got it. By the way, I used the manual install process (just so I could learn how this is all working). I'm just about to do a pull request that simply does a .replace(/\/+$/,"") to kill trailing slashes on line 115 in auth.js - this will handle the situation when someone changes the config manually. Or is that not a good idea?

@niallo
Copy link
Member

niallo commented Jan 25, 2013

👍 +1 Yeah, I think that change definitely makes sense

@acreeger
Copy link
Contributor

Ok, testing it out. Keep your eye out for a pull request.

On 25 January 2013 00:15, niallo notifications@github.com wrote:

+1 Yeah, I think that change definitely makes sense


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-12691722.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants