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

createAccountForCredential TypeError: Cannot read property 'findOne' of undefined #3322

Closed
flyinghuman opened this issue May 6, 2020 · 7 comments · Fixed by #3323
Closed

Comments

@flyinghuman
Copy link

flyinghuman commented May 6, 2020

Hello,

on a new installation with latest-version 264 no other users can be created via LDAP Login. After login with LDAP the user sees this message: Failed to create account. Internal server error (500) surrounded in Sanstorm GUI. The Admin user works like expected and all apps are working too within this admin-user. Here is the Log:

stack: 709c10 7109e0 Exception while invoking method 'createAccountForCredential' TypeError: Cannot read property 'findOne' of undefined at Function.SandstormDb.fillInProfileDefaults (imports/sandstorm-db/profile.js:233:30) at MethodInvocation.createAccountForCredential (imports/server/accounts/credentials/credentials-server.js:193:17) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:719:19 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/ddp-server/livedata_server.js:717:46 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/ddp-server/livedata_server.js:715:46 at new Promise (<anonymous>) at Session.method (packages/ddp-server/livedata_server.js:689:23) at packages/ddp-server/livedata_server.js:559:43

We use nginx reverse Proxy with wildcard HTTPS Certificates (on Admin user all works fine.) LDAP is the only active Auth-Provider enabled.

Thanks!

sandstorm

Edit: Enabling Email Authentication; Registering with Email and after that add LDAP to this Account is working - but that is only a bad workaround because each user must do this for himself...

@snowball77
Copy link

Same issue on our server...

@snowball77
Copy link

We also tried the workaround and it worked here too. However, this is obviously not intended behavior. We found references on the net indicating a mismatch of the mongo API version.

@zenhack
Copy link
Collaborator

zenhack commented May 6, 2020

uggh, this probably got broken by some of the recent refactoring. We really need better tests for some of this stuff. I'll dig into it.

zenhack added a commit to zenhack/sandstorm that referenced this issue May 6, 2020
This should fix sandstorm-io#3322, but I don't have an LDAP setup to test with.

This was caused by the recent refactoring -- we added an explicit import
for `Settings`, but no explicit *export*.

This is actually the only remaining use of the variable, so instead of
simply revert the broken refactor, I just switched it over to using
`globalDb.collection.settings` (which is used all over the place), and
removed the `Settings` alias entirely.
@zenhack
Copy link
Collaborator

zenhack commented May 6, 2020

I've submitted a patch which should fix this: #3323

Per the description though, I don't have an actual LDAP setup to test this against.

@zenhack
Copy link
Collaborator

zenhack commented May 7, 2020

@zarvox, can we re-open this until we have confirmation that it actually fixes the problem?

@ocdtrekkie ocdtrekkie reopened this May 7, 2020
@flyinghuman
Copy link
Author

flyinghuman commented May 7, 2020

okay, thanks. how can i test it? i only use the tz package for installation. which file i must replace?

Edit: i will try building it from source and test it.

Edit2: works. Thanks!

@flyinghuman
Copy link
Author

The Patch resolves the problem. can be closed.

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

Successfully merging a pull request may close this issue.

4 participants