Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

poor error when failing authorization due to lack of email address #25

Closed kfatehi closed 9 years ago

kfatehi commented 9 years ago

There is this error, which is apparently no longer thrown if you set your email address correctly in github.

Code there needs to be inspected and determined if a better error can be thrown, e.g. "You need to enter your email address into Github."

Express
500 TypeError: Cannot read property '0' of undefined
at makeAccount (/Users/Hamid/Developer/strider/node_modules/strider-github/lib/webapp.js:167:28)
at Strategy.validateAuth as _verify
at /Users/Hamid/Developer/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:188:22
at /Users/Hamid/Developer/strider/node_modules/strider-github/node_modules/passport-github/lib/strategy.js:109:5
at passBackControl (/Users/Hamid/Developer/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:126:9)
at IncomingMessage. (/Users/Hamid/Developer/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:143:7)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)

Ref original issue: https://github.com/Strider-CD/strider/issues/599

corradio commented 9 years ago

Why do we even require an email from the github profile? It's kinda bad to have to add it to the (public) profile.

jaredly commented 9 years ago

We use the email address to like you to github commit messages, but it certainly doesn't need to be required

On Fri, Nov 28, 2014, 12:57 AM Olivier Corradi notifications@github.com wrote:

Why do we even require an email from the github profile? It's kinda bad to have to add it to the (public) profile.

— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/25#issuecomment-64865033 .

SamMorrowDrums commented 9 years ago

Fixed this in PR https://github.com/Strider-CD/strider-github/pull/28 was still broken, as the check for existence wasn't thorough enough.

knownasilya commented 9 years ago

Fixed in 9bc4bfa8bcf59f691f08bd45d3be7f868fc735b3

briandela commented 9 years ago

I'm still seeing this on the latest master. I just cloned everything and when I try to connect to github I get:

TypeError: Cannot read property '0' of undefined
   at makeAccount (/Users/brian/outhouse/strider/node_modules/strider-github/lib/webapp.js:167:28)
   at Strategy.validateAuth [as _verify] (/Users/brian/outhouse/strider/node_modules/strider-github/lib/webapp.js:152:26)
   at /Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:188:22
   at /Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/lib/strategy.js:109:5
   at passBackControl (/Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:126:9)
   at IncomingMessage.<anonymous> (/Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:143:7)
   at IncomingMessage.emit (events.js:129:20)
   at _stream_readable.js:908:16
   at process._tickCallback (node.js:355:11)

Any ideas?

knownasilya commented 9 years ago

Do you have a public email set for your github account?

On Fri, Feb 13, 2015 at 1:40 PM, Brian Delahunty notifications@github.com wrote:

I'm still seeing this on the latest master. I just cloned everything and when I try to connect to github I get:

TypeError: Cannot read property '0' of undefined at makeAccount (/Users/brian/outhouse/strider/node_modules/strider-github/lib/webapp.js:167:28) at Strategy.validateAuth as _verify at /Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:188:22 at /Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/lib/strategy.js:109:5 at passBackControl (/Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:126:9) at IncomingMessage. (/Users/brian/outhouse/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:143:7) at IncomingMessage.emit (events.js:129:20) at _stream_readable.js:908:16 at process._tickCallback (node.js:355:11)

Any ideas?

— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/25#issuecomment-74303643 .

Ilya Radchenko Application Developer 617-447-2425 Direct | 617-447-2400 Main Applied Geographics, Inc. 24 School Street, Suite 500 Boston, MA 02108 www.AppGeo.com

This e-mail message and any attachments may contain confidential or legally privileged information. If you are not an intended recipient or otherwise authorized to receive this message, you should not use, copy, distribute, disclose or take any action based on the information contained in this e-mail or any attachments. If you have received this message and material in error, please advise the sender immediately by reply e-mail and delete this message. Thank you on behalf of Applied Geographics, Inc. (AppGeo).

briandela commented 9 years ago

Yep - it's not the same as the login I used for strider (my strider login is a private email on my github but I do have a public email)

email settings 2015-02-13 11-18-55

knownasilya commented 9 years ago

@briandela what version of strider-github are you using?

briandela commented 9 years ago

I did a git clone of it this morning.

briandela commented 9 years ago

I found the issue - github was showing my email as Public when I went to emails, but in another part of my profile it was showing as private. I set everything up as public again and it's working now.

knownasilya commented 9 years ago

nice. I thought we fixed this issue, guess not..

smilledge commented 9 years ago

For anyone else who is having this problem you need to go to https://github.com/settings/profile and select an email under "Public email".

knownasilya commented 9 years ago

@smilledge I added your suggestion to the README, thanks!

ellerbrock commented 7 years ago

yupp, same here. just wanted to get started with strider, cloned the repository, updated all the plugins and then baam 500 Error: You need to enter your email address into Github. to this one too :(

i tried to comment quick and dirty few things out but not too successful (also don't want to spend to much time on this subject).

here a workaround how you can get connected to github:

after changing this i could register strider to github which make me now a happy nerd again :) was already on my way to gave up and opened drone ci :)

in my opinion it would help the project a lot if people can more easy start and play with strider. i would suggest change this breaking things as quick as possible or make it very clear for the user how to get things up. nothing more worse starting with some code and straight run n issues. also i saw for example the plugin list was not updated and you run in an error trying to install the hq plugin (repo doesn't exist anymore). a auto update or update all function would be great. my starting point was to copy all the links and type the same upgrade over and over. this is the part where i in the web world normaly would write a small scrapper or so to automate this :)

by the way, my first starting point was a complet other way. i was happy to see you have a docker image running. first at all i did not find how to log in and find the default user and password somewhere on another site writing about this. this should be very clear for every newcomer. second even after starting docker with all the enviroment variables setup i could not get stuff running that it save the changes in the mongodb so i gave up and came here.

ok so this was a lot complaining and sorry for that. you all working to make a good peace of software and open source it so i just want to help that you not lose all the users to other systems.

i could offer my help to figure out a way to get a current strider version deployed with each stable release. the next thing i would update would be the documentation how to get it quick and easy running. let's be honest the documentation on docker (https://hub.docker.com/r/strider/strider/) hub is quite poor :)

cheerio js friends

knownasilya commented 7 years ago

Thanks for your feedback. We welcome any contributions, especially documentation.

I've started working on a guides website, but have been busy since I became a father 2 days ago.

Feel free to submit a PR for the update all plugins feature. Look in the lib/routes and in strider-cli

ellerbrock commented 7 years ago

hey that are great news, congratulations! all the best wishes to you and your new family. my little git clone is still in alpha version happy inside the belly from mami, spring next year its time or me go afk a while :)

i really was looking forward to play with strider but had quite a hassle and like i wrote was more or less on the way to try drone as alternative to the old heavyweight jenkins we used so far.

one thing i think really important to the project would be to collect in the first place on a central spot where in the setup / installation stuff things are breaking and fix them. i saw so far the problem with the docker image (and would suggest i create a new one if you are ok with this and make a easy to understand documentation how to get strider up in running under 10min).

i would quick try to find and drop the plugin which doesn't exist anymore and make a pull request. the second thing is how to handle the docker image? i have a dockhub account https://hub.docker.com/u/frapsoft/ and since yesterday night a quay.io account too https://quay.io/user/ellerbrock. i need to have a look first what you done so far and how to set things up that they work smooff with your ci / cd system. so i consider you run strider for your own projects as well? its my first contact with strider so i will play on my so much loved 127.0.0.1 dreamland a while first. when things looks good i will come back to you guys with a hopefully working solution ...