Clients deconnected on server reload

Hi, in dev mode, each time I save something that impacts the server and it builds / restarts, my client is logged out. That is really annoying in development. I don’t remember that behaviour before 1.4.2.

Any hint ?

It should not do that normally.

Had this issue before because we used a fixture which created a test user. Every time it created that user it got logged out because the sessions were removed from the database.

1 Like

Oh nice, you solved my problem. Here was the faulty code :

if ( Meteor.users.findOne( {
		username: 'testUser'
	} ) )
	Accounts.setPassword( Meteor.users.findOne( {
		username: 'testUser'
	} )._id, 'test' );

It really does not look like something that should break anything…

Thank you :blush:

Yup, did the same thing! Only way is to check whether the password was actually changed (by trying to login).

I think I understand why it logs you out. Since the stored bcrypt is salted, it changes even if you keep the same actual password.

But that should not end your session :frowning:

You can disable the logout:

1 Like