Need guru's help, unable to log on fresh 0.8.0 even with local admin



  • Here some other informations, from my iPhone with github (I'm logged on github.com with "remember me") I was connected to my nodebb 8 days ago, and just for fun I refreshed the page today in safari, and guess what it works !!!

    So this confirm that if you already had a token for previous access it still works but as soon you loose it it stop working.

    I've done a test for those interested with a new user (never logged on nodebb) with FB auth (from nodebb login page), after typing login/password on FB redirected page by nodebb, I got the message

    Internal error.
    Oops! Looks like something went wrong!
    /auth/facebook/callback
    Cannot set property 'user' of undefined
    

    and the Browser URL looks like
    https://community.hallard.me/auth/facebook/callback?code=AQCgEqpnX-blablabla-code-very-long-HYNYnhx

    Then from my iPhone (my last working access) gone to users and saw the new user created, that's funny, user is well created but can't log it and as it was a new user in the database so it data should be fresh.

    Hope this helps some to understand better, I'm trying to do my best to give you a maximum of relevant information.


  • Admin

    GitHub plugin was just fixed, please update to the latest version :)



  • @julian
    thank you very much for your help, I'll try this ASAP but I'm not sure it will solve my problem because it's happening with all SSO and worst, with the regular local admin login/password created on 1st nodebb installation



  • @Julian,
    I updated the 3 SSO plugins (github, facebook, google)
    I can now login with local admin (yeah !!!!) and Facebook (double yeahhhh !!!)
    I'm still having problem with github and google, with github the error is now

    Oops! Looks like something went wrong!
    /auth/github/callback
    Cannot read property '0' of undefined
    

    notice it's not more 'user' but '0'.
    Anyway I'm pretty sure it's coming from my account and database , because I'm the same user when I'm login with FB, google or github (same email). And I'm wondering if github auth does not work since I 1st logged with my fb account.
    Also I noticed some field on redis database for my user

    • gplusid
    • fbid
    • githubid
      Can I safely delete them ?
      Is there a way to reset all recorded auth token in the database ?

    Thank you very much for your help


  • Admin

    @Charly86 Glad I could get you back up and running :smile: ... at least with local/fb

    When you try logging in via GitHub/Google, are there any errors in the server-side log? If there is a full stack trace, that would help me debug the problem.



  • @Julian,
    thanks, Ok I deleted the 3 keys on my account (I created a local password on my account before just in case ;-))
    So FB => still works
    Google => now works (3rd yeahhh !!!)

    What is strange is that the 3 ID field gplusid, fbid, githubid were not created back on the database on my account, this means that now perhaps it's stored elsewhere, any idea ?

    Anyway, I don't know what do you mean by full stack trace, I launched nodebb with dev and here the log (bottom after github sso try)
    .

    root:/usr/local/share/nodebb_master# ./nodebb dev
    
    NodeBB v0.8.0 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
    
    Clustering enabled: Spinning up 1 process(es).
    
    31/8 22:18 [13061] - info: Time: Mon Aug 31 2015 22:18:26 GMT+0200 (CEST)
    31/8 22:18 [13061] - info: Initializing NodeBB v0.8.0
    31/8 22:18 [13061] - verbose: * using configuration stored in: /usr/local/share/nodebb_master/config.json
    31/8 22:18 [13061] - verbose: * using redis store at 127.0.0.1:6379
    31/8 22:18 [13061] - verbose: * using themes stored in: /usr/local/share/nodebb_master/node_modules
    31/8 22:18 [13061] - verbose: Checking dependencies for outdated modules
    31/8 22:18 [13061] - verbose: [notifications.init] Registering jobs.
    31/8 22:18 [13061] - info: [themes] Using theme nodebb-theme-persona
    31/8 22:18 [13061] - verbose: [plugins] Initializing plugins system
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-composer-default
    31/8 22:18 [13061] - verbose: [plugins] Found 10 js file(s) for plugin nodebb-plugin-composer-default
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-composer-default
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-markdown
    31/8 22:18 [13061] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-markdown
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-markdown
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-mentions
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-mentions
    31/8 22:18 [13061] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-widget-essentials
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-rewards-essentials
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-rewards-essentials
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-soundpack-default
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-google-analytics
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-google-analytics
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-emailer-ssl-smtp
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-blog-comments
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-blog-comments
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-dbsearch
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-custom-pages
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-custom-pages
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-custom-pages
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-gravatar-extended
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-spam-be-gone
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-spam-be-gone
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-spam-be-gone
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-github
    31/8 22:18 [13061] - warn: [plugins/nodebb-plugin-sso-google] Hook `filter:user.delete` is deprecated, please use an alternative
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-google
    31/8 22:18 [13061] - warn: [plugins/nodebb-plugin-sso-facebook] Hook `filter:user.delete` is deprecated, please use an alternative
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-sso-facebook
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-facebook
    31/8 22:18 [13061] - warn: [plugins/nodebb-plugin-sso-twitter] Hook `filter:user.delete` is deprecated, please use an alternative
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-twitter
    31/8 22:18 [13061] - verbose: [plugins] Found 4 js file(s) for plugin nodebb-theme-persona
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-theme-persona
    
    31/8 22:18 [13061] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-plugin-emailer-ssl-smtp
      * nodebb-plugin-blog-comments
      * nodebb-plugin-custom-pages
      * nodebb-plugin-gravatar-extended
      * nodebb-plugin-spam-be-gone
    
    31/8 22:18 [13061] - info: [plugins] Plugins OK
    31/8 22:18 [13061] - verbose: [meta/css] Minifying LESS/CSS
    31/8 22:18 [13061] - verbose: [sounds] Sounds OK
    31/8 22:18 [13061] - verbose: [meta/templates] Compiling templates
    31/8 22:18 [13061] - verbose: [meta/js] Minification complete
    31/8 22:18 [13061] - verbose: [meta/js] Client-side minfile committed to disk.
    31/8 22:18 [13061] - verbose: [meta/templates] Successfully compiled templates.
    31/8 22:18 [13061] - info: NodeBB Ready
    31/8 22:18 [13061] - info: Enabling 'trust proxy'
    31/8 22:18 [13061] - info: NodeBB is now listening on: 0.0.0.0:4567
    31/8 22:18 [13061] - verbose: [meta/css] admin.css committed to disk.
    31/8 22:18 [13061] - info: [plugins/spam-be-gone] Settings loaded
    31/8 22:18 [13061] - verbose: [hotswap] Router with id `plugins` replaced successfully
    31/8 22:18 [13061] - verbose: [plugins] All plugins reloaded and rerouted
    31/8 22:18 [13061] - verbose: [meta/css] stylesheet.css committed to disk.
    31/8 22:18 [13061] - verbose: [hotswap] Router with id `auth` replaced successfully
    31/8 22:18 [13061] - warn: Route requested but not found: /uploads/files/1440759787865-capture.jpg
    31/8 22:18 [13061] - verbose: [translator] No resource file found for en_US/markdown, using provided fallback language file
    31/8 22:19 [13061] - error: /auth/github/callback
     TypeError: Cannot read property '0' of undefined
        at Strategy._verify (/usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/library.js:29:63)
        at /usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:195:22
        at /usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/lib/strategy.js:109:5
        at passBackControl (/usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:125:9)
        at IncomingMessage.<anonymous> (/usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:142:7)
        at IncomingMessage.emit (events.js:129:20)
        at _stream_readable.js:908:16
        at process._tickDomainCallback (node.js:381:11)
    31/8 22:19 [13061] - verbose: [translator] No resource file found for en_US/markdown, using provided fallback language file
    

    It would be interesting if you don't mind that you try to connect with you github on https://community.hallard.me I'm pretty sure as you're you're new user it will work ;-)

    FYI, currently I'm running on master branch


  • Admin

    Thanks, that stack trace is just what I need.

    On Mon, 31 Aug 2015 16:24 sales@nodebb.org wrote:

    Hello julian,

    Charly86 has posted a reply to: Need guru's help:

    @Julian
    http://mandrillapp.com/track/click/30149961/community.nodebb.org?p=eyJzIjoiYVdhMVpKdjNpeERDVk1YVGdSVS1CZWV3eXFNIiwidiI6MSwicCI6IntcInVcIjozMDE0OTk2MSxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL2NvbW11bml0eS5ub2RlYmIub3JnXFxcL3VzZXJcXFwvanVsaWFuXCIsXCJpZFwiOlwiMTliYjUyOTFmOTk4NDgyYmExODhjODE2MmM0OTRmODVcIixcInVybF9pZHNcIjpbXCJiYjczZTUwOTc3OWY4NzFiNmU1Y2Y5M2UyNDRhY2I4ODNjZTUxNGQyXCJdfSJ9
    ,
    thanks, Ok I deleted the 3 keys on my account (I created a local password
    on my account before just in case [image: ;-)])
    So FB => still works
    Google => now works

    What is strange is that the 3 ID field gplusid, fbid, githubid were not
    created back on the database on my account, this means that now perhaps
    it's stored elsewhere, any idea ?

    Anyway, I don't know what do you mean by full stack trace, I launched
    nodebb with dev and here the log (bottom after github sso try)
    .

    root:/usr/local/share/nodebb_master# ./nodebb dev

    NodeBB v0.8.0 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html

    Clustering enabled: Spinning up 1 process(es).

    31/8 22:18 [13061] - info: Time: Mon Aug 31 2015 22:18:26 GMT+0200 (CEST)
    31/8 22:18 [13061] - info: Initializing NodeBB v0.8.0
    31/8 22:18 [13061] - verbose: * using configuration stored in: /usr/local/share/nodebb_master/config.json
    31/8 22:18 [13061] - verbose: * using redis store at 127.0.0.1:6379
    31/8 22:18 [13061] - verbose: * using themes stored in: /usr/local/share/nodebb_master/node_modules
    31/8 22:18 [13061] - verbose: Checking dependencies for outdated modules
    31/8 22:18 [13061] - verbose: [notifications.init] Registering jobs.
    31/8 22:18 [13061] - info: [themes] Using theme nodebb-theme-persona
    31/8 22:18 [13061] - verbose: [plugins] Initializing plugins system
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-composer-default
    31/8 22:18 [13061] - verbose: [plugins] Found 10 js file(s) for plugin nodebb-plugin-composer-default
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-composer-default
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-markdown
    31/8 22:18 [13061] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-markdown
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-markdown
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-mentions
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-mentions
    31/8 22:18 [13061] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-widget-essentials
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-rewards-essentials
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-rewards-essentials
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-soundpack-default
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-google-analytics
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-google-analytics
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-emailer-ssl-smtp
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-blog-comments
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-blog-comments
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-dbsearch
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-custom-pages
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-custom-pages
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-custom-pages
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-gravatar-extended
    31/8 22:18 [13061] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-spam-be-gone
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-spam-be-gone
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-spam-be-gone
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-github
    31/8 22:18 [13061] - warn: [plugins/nodebb-plugin-sso-google] Hook filter:user.delete is deprecated, please use an alternative
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-google
    31/8 22:18 [13061] - warn: [plugins/nodebb-plugin-sso-facebook] Hook filter:user.delete is deprecated, please use an alternative
    31/8 22:18 [13061] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-sso-facebook
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-facebook
    31/8 22:18 [13061] - warn: [plugins/nodebb-plugin-sso-twitter] Hook filter:user.delete is deprecated, please use an alternative
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-twitter
    31/8 22:18 [13061] - verbose: [plugins] Found 4 js file(s) for plugin nodebb-theme-persona
    31/8 22:18 [13061] - verbose: [plugins] Loaded plugin: nodebb-theme-persona

    31/8 22:18 [13061] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset -p PLUGINNAME to disable it.

    • nodebb-plugin-emailer-ssl-smtp
    • nodebb-plugin-blog-comments
    • nodebb-plugin-custom-pages
    • nodebb-plugin-gravatar-extended
    • nodebb-plugin-spam-be-gone

    31/8 22:18 [13061] - info: [plugins] Plugins OK
    31/8 22:18 [13061] - verbose: [meta/css] Minifying LESS/CSS
    31/8 22:18 [13061] - verbose: [sounds] Sounds OK
    31/8 22:18 [13061] - verbose: [meta/templates] Compiling templates
    31/8 22:18 [13061] - verbose: [meta/js] Minification complete
    31/8 22:18 [13061] - verbose: [meta/js] Client-side minfile committed to disk.
    31/8 22:18 [13061] - verbose: [meta/templates] Successfully compiled templates.
    31/8 22:18 [13061] - info: NodeBB Ready
    31/8 22:18 [13061] - info: Enabling 'trust proxy'
    31/8 22:18 [13061] - info: NodeBB is now listening on: 0.0.0.0:4567
    31/8 22:18 [13061] - verbose: [meta/css] admin.css committed to disk.
    31/8 22:18 [13061] - info: [plugins/spam-be-gone] Settings loaded
    31/8 22:18 [13061] - verbose: [hotswap] Router with id plugins replaced successfully
    31/8 22:18 [13061] - verbose: [plugins] All plugins reloaded and rerouted
    31/8 22:18 [13061] - verbose: [meta/css] stylesheet.css committed to disk.
    31/8 22:18 [13061] - verbose: [hotswap] Router with id auth replaced successfully
    31/8 22:18 [13061] - warn: Route requested but not found: /uploads/files/1440759787865-capture.jpg
    31/8 22:18 [13061] - verbose: [translator] No resource file found for en_US/markdown, using provided fallback language file
    31/8 22:19 [13061] - error: /auth/github/callback
    TypeError: Cannot read property '0' of undefined
    at Strategy._verify (/usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/library.js:29:63)
    at /usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:195:22
    at /usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/lib/strategy.js:109:5
    at passBackControl (/usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:125:9)
    at IncomingMessage.<anonymous> (/usr/local/share/nodebb_master/node_modules/nodebb-plugin-sso-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:142:7)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickDomainCallback (node.js:381:11)
    31/8 22:19 [13061] - verbose: [translator] No resource file found for en_US/markdown, using provided fallback language file

    It would be interesting if you don't mind that you try to connect with you
    github on https://community.hallard.me
    http://mandrillapp.com/track/click/30149961/community.hallard.me?p=eyJzIjoiRVJBaUI2V1NiQ2xucmRGUERWbmV3S2RULWdZIiwidiI6MSwicCI6IntcInVcIjozMDE0OTk2MSxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL2NvbW11bml0eS5oYWxsYXJkLm1lXCIsXCJpZFwiOlwiMTliYjUyOTFmOTk4NDgyYmExODhjODE2MmM0OTRmODVcIixcInVybF9pZHNcIjpbXCJhZDA5N2RlNDUxMTE3MGY1MGQxOTRkMmVmYTEyN2VhMTM4ZDgxNGJiXCJdfSJ9
    I'm pretty sure as you're you're new user it will work [image: ;-)]

    How FYI, currently I'm running on master branch

    Click here to read the full topic

    Thanks!
    NodeBB

    This post notification was sent to you due to your subscription settings. Click
    here to alter those settings
    http://mandrillapp.com/track/click/30149961/community.nodebb.org?p=eyJzIjoiZHpWZGZTREo0Z01OY3czSjA1TGtLbklTWk5zIiwidiI6MSwicCI6IntcInVcIjozMDE0OTk2MSxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL2NvbW11bml0eS5ub2RlYmIub3JnXFxcL3VzZXJcXFwvanVsaWFuXFxcL3NldHRpbmdzXCIsXCJpZFwiOlwiMTliYjUyOTFmOTk4NDgyYmExODhjODE2MmM0OTRmODVcIixcInVybF9pZHNcIjpbXCIwNDM2ODUwNzIzOTVkODBhNTNmYzQ2YzNkODQ1ZWUxZTllMjRlMTExXCJdfSJ9.



  • @julian
    Did you had a chance to look into this one ?
    I Just had another mail from old user (from V0.7.3 github creation) that can't login anymore with github (V0.8.1)
    I confirm it's only old users, new users creation with github seems to work fine because I had some new registration.


  • Admin

    Can your old user clear their cookies and try again?



  • @julian,
    it 's the same thing

    Internal error.
    Oops! Looks like something went wrong!
    /auth/github/callback
    Cannot read property '0' of undefined
    

    is there a way to clear github related information from a user in the nodebb database ?


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.