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

collection2 crash with Accounts.validateLoginAttempt observed with meteor 1.2 #270

Open
ArijitBee opened this issue Oct 14, 2015 · 2 comments

Comments

@ArijitBee
Copy link

I am calling Accounts.createUser() on client. On server I have defined two functions:
Accounts.onCreateUser -> hook for createuser before user is created
Accounts.validateLoginAttempt -> Called whenever a login is attempted

When Accounts.createUser() on client is successful, there is auto login. But if it is unsuccessful, there is no login attempt.
It is observed that when validateLoginAttempt() is defined and a collection2 validaton fails, the server side has "exception createuser undefined.." error. Internal server error 500 is passed to client.
On preliminary investigation with node-inspector, there is a stack overflow crash on server.

If the validateLoginAttempt() is NOT defined, everything works as expected i.e. invalidation by collection2 sanitizes the error and correct error message is sent to client.

All this is observed on Meteor verson 1.2.0.2. Meteor 1.1 was working fine.

@aldeed
Copy link
Collaborator

aldeed commented Dec 8, 2015

It would be helpful to have a link to a simple app repo that reproduces this.

@ArijitBee
Copy link
Author

Hi aldeed,

I created a repo at:
https://github.com/ArijitBee/error-validateLogin

This bug is observed with Meteor verson 1.2.1 and aldeed:collection2 2.5.0

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

No branches or pull requests

2 participants