Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Assertion Failed when trying to log in #13

Open
iloving opened this issue Apr 6, 2015 · 3 comments
Open

Assertion Failed when trying to log in #13

iloving opened this issue Apr 6, 2015 · 3 comments

Comments

@iloving
Copy link

iloving commented Apr 6, 2015

I've configured the LDAP section as described in both example 1 and example 2, but no matter what I do I get the following when I try to login, and the server just dies. I think I need something a smidge more informative in order to figure out what's wrong...

==> lcb: assert.js:93
==> lcb:   throw new assert.AssertionError({
==> lcb:
==> lcb:
==> lcb:
==> lcb:
==> lcb:
==> lcb:
==> lcb:
==> lcb:
==> lcb: ^
==> lcb: AssertionError: "" == true
==> lcb:     at new LdapAuth (/home/vagrant/lets-chat/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/node_modules/ldapauth-fork/lib/ldapauth.js:84:10)
==> lcb:     at handleAuthentication (/home/vagrant/lets-chat/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/lib/passport-ldapauth/strategy.js:140:10)
==> lcb:     at Strategy.authenticate (/home/vagrant/lets-chat/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/lib/passport-ldapauth/strategy.js:175:33)
==> lcb:     at attempt (/home/vagrant/lets-chat/node_modules/passport/lib/middleware/authenticate.js:341:16)
==> lcb:     at authenticate (/home/vagrant/lets-chat/node_modules/passport/lib/middleware/authenticate.js:342:7)
==> lcb:     at Ldap.authenticate (/home/vagrant/lets-chat/node_modules/lets-chat-ldap/lib/auth.js:49:42)
==> lcb:     at /home/vagrant/lets-chat/app/auth/index.js:207:26
==> lcb:     at fn (/home/vagrant/lets-chat/node_modules/async/lib/async.js:641:34)
==> lcb:     at Object._onImmediate (/home/vagrant/lets-chat/node_modules/async/lib/async.js:557:34)
==> lcb:     at processImmediate [as _immediateCallback] (timers.js:354:15)
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  [email protected] start: `node app.js`
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  Exit status 8
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  Failed at the [email protected] start script.
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  This is most likely a problem with the lets-chat package,
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  not with npm itself.
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  Tell the author that this fails on your system:
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:      node app.js
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  You can get their info via:
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:      npm owner ls lets-chat
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  There is likely additional logging output above.
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: System
==> lcb:  Linux 3.2.0-23-generic-pae
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: command
==> lcb:  "/usr/bin/node" "/usr/bin/npm" "start"
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: cwd
==> lcb:  /home/vagrant/lets-chat
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: node -v
==> lcb:  v0.10.37
==> lcb: npm
==> lcb:
==> lcb: ERR! npm -v 1.4.28
==> lcb: npm ERR! code ELIFECYCLE
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:  Additional logging details can be found in:
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:      /home/vagrant/lets-chat/npm-debug.log
==> lcb: npm
==> lcb:
==> lcb: ERR!
==> lcb:
==> lcb: not ok
==> lcb:  code 0
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

I have the following in my config:

providers: [ldap]
  ldap:
    connect_settings:
        url: ldap:/our.server:389
        bind_options:
          bindDN: "CN=Fully,OU=Qualified,DC=Bind,DC=User"
          bindCredentials: MyPass
        search:
          base: "DC=My,DC=Base"
          opts:
            scope: subtree
            filter: (sAMAccountName={{username}})
          field_mappings:
            uid: sAMAccountName
            firstName: givenName
            lastName: sn
            displayName: givenName
            email: mail
@iloving
Copy link
Author

iloving commented Apr 7, 2015

Moved issue to https://groups.google.com/forum/#!forum/lets-chat-app for help.

@muellni
Copy link

muellni commented May 21, 2015

I run a docker container as described in #4.

But the container crashes on login attempt with this exception.

This is my auth snippet from the defaults.yml file:

auth:
  providers: [ldap]
  ldap:
    connect_settings:
      url: ldap://ldap_server:389
    bind_options:
      bindDN: "cn=admin,dc=company,dc=com"
      bindCredentials: secretPW
    search:
      base: "dc=company,dc=com"
      opts:
        scope: sub # Base search (base), one level search (one) or subtree search (sub)
        filter: "(&(uid={{username}})(memberof=cn=chat_access,ou=groups,dc=company,dc=com)"
    field_mappings:
      uid: uid # LDAP unique ID
      username: uid # used for mention (@uid)
      firstName: givenName
      lastName: sn
      displayName: givenName
      email: mail
  local:
    enableRegistration: false
    passwordRegex: ^.{8,64}$
    salt: secretSalt # Required when upgrading from version < 0.3

Any hints?

@iloving
Copy link
Author

iloving commented May 23, 2015

Lets chat has virtually nothing in the way of error handling, preferring to just crash. It has no logging to speak of either. We abandoned it after only a couple days of testing because it's not even alpha quality, let alone ready for daily use.

iIRC, the login crash may be because the users email address isn't set in ldap.


Sent from my mobile device. Autocorrect may make some words funnier than intended.

On May 21, 2015, at 04:33, Martin Müllenhaupt [email protected] wrote:

I run a docker container as described in #4.

But the container crashes on login attempt with this exception.

This is my auth snippet from the defaults.yml file:

auth:
providers: [ldap]
ldap:
connect_settings:
url: ldap://ldap_server:389
bind_options:
bindDN: "cn=admin,dc=company,dc=com"
bindCredentials: secretPW
search:
base: "dc=company,dc=com"
opts:
scope: sub # Base search (base), one level search (one) or subtree search (sub)
filter: "(&(uid={{username}})(memberof=cn=chat_access,ou=groups,dc=company,dc=com)"
field_mappings:
uid: uid # LDAP unique ID
username: uid # used for mention (@uid)
firstName: givenName
lastName: sn
displayName: givenName
email: mail
local:
enableRegistration: false
passwordRegex: ^.{8,64}$
salt: secretSalt # Required when upgrading from version < 0.3
Any hints?


Reply to this email directly or view it on GitHub.

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

No branches or pull requests

2 participants