Hi everyone, seeing this weird issue on a new Galaxy deployment of a working codebase.
Meteor.loggingIn() is stuck on true, but Accounts.onLogin callback is executing, Meteor.user() is defined. Meteor.logout() has no effect, user remains even after reloading the page. Meteor.status() says connected
I looked at the raw messages in the websocket and everything looks normal:
- Client calls connect, calls login with resume token, and subs to loginServiceConfiguration and autoupdate client versions
- Server replies with server id, session, user object, result for login call, and marks the login service and autoupdate version subs as ready
I am seeing no logs on the server side
Update: It looks like method call block is remaining. I am not able to call any methods, I’ve checked in the websocket logs and when
Meteor.call is run nothing is posted to the server.
Update #2: Restarting the server (with nothing changing on the client) fixes the issue, but I’ve seen the issue multiple times in the past few days so it keeps coming up. Should also note that the issue is not temporary, the client experiences it even after reloading the page, reopening the browser, etc.
Update #3: Noticed this issue in the console. Didn’t happen at the time of trying to login, but a bit earlier. Possibly related?
Exception in defer callback: TypeError: connection.close is not a function at packages/accounts-base/accounts_server.js:968:22 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/meteor.js:550:25 at runWithEnvironment (packages/meteor.js:1286:24)
Update #4: Similar thread (Strange phenomenon: Subsequent methods or subs won't succeed - #64 by waldgeist) mentions that the could be related to Atlas. I am also using an Atlas M2 cluster. I am trying some fixing on Atlas and will see if the issue happens again.
I was connecting to a second Meteor server simultaneously. The connection was crucial to the app, so it was established at startup.
I found that when you use
DDP.connect, if the timing works out just right DDP.onReconnect can be fired as the login method is resolving. This kills the login method in its tracks, because the DDP.onReconnect connection is not the same as the connection the login method was called on. This in turn prevents anything else from executing.
If you are not using
DDP.connectin your app, then your issue may be unrelated to mine.