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

{{loginButtons}} changes to loggingIn state and hangs on server reload #811

Closed
belisarius222 opened this issue Mar 14, 2013 · 11 comments
Closed

Comments

@belisarius222
Copy link

@belisarius222 belisarius222 commented Mar 14, 2013

If the user is logged in when the server reloads, the {{loginButtons}} change from displaying the username to the animation that normally runs when Meteor.loggingIn() is true. The button then gets stuck in this state.

Reproduction app here: https://github.com/belisarius222/login-hang-test
screenshot:
login-buttons-hanging

The reproduction code includes a (hacky) function to reload the server by running touch on one of the JS files, so you'll have to change a line of code to make it work (or rather, not work :P ) on your local system. There are more detailed instructions on the github page.

Sanity checks: once the button is hanging, Meteor.loggingIn() returns false, and Meteor.user() returns an object with all the usual suspects for fields, including _id.

Calling Meteor.logout() from the console successfully logs the user out and the loginButtons state goes back to its normal non-logged-in state.

I'm using Meteor 0.5.8 with autopublish and insecure enabled. I'm using accounts-base, accounts-ui, and accounts-password. Tested on chrome and safari on OS X, same behavior on both.

@kvprashant
Copy link

@kvprashant kvprashant commented Mar 14, 2013

+1

Version: 0.5.8
Browser: Chrome, Firefox

This happened on meteor update. Can also be reproduced by creating a new project and meteor add accounts-ui accounts-twitter.

@glasser
Copy link
Member

@glasser glasser commented Mar 14, 2013

Maybe this is related to radical deps? (loggingIn() uses deps...)

@glasser
Copy link
Member

@glasser glasser commented Mar 14, 2013

Aha, this was a mistake made when updating to the new API. We just used the wrong function during the bulk rename! Fixed on devel.

@glasser glasser closed this Mar 14, 2013
@kvprashant
Copy link

@kvprashant kvprashant commented Mar 14, 2013

Error is persistent on deploying to Heroku. Everything on local development works fine. Edited accounts_client.js to use the new Deps API.

@glasser
Copy link
Member

@glasser glasser commented Mar 14, 2013

@kvprashant are you saying that my fix does not work?

@kvprashant
Copy link

@kvprashant kvprashant commented Mar 14, 2013

It worked locally. But when I pushed the changes using a Heroku buildscript it shows the same issue. I create a new Heroku app and pushed the app there and the issue persists. Right now, I am rolling back to 0.5.7 and checking if the problem persists.

@glasser
Copy link
Member

@glasser glasser commented Mar 14, 2013

How about with meteor deploy?
On Mar 14, 2013 9:51 AM, "Prashant K" notifications@github.com wrote:

It worked locally. But when I pushed the changes using a Heroku
buildscript it shows the same issue. I create a new Heroku app and pushed
the changes there and the issue persists. Right now, I am rolling back to
0.5.7 and checking if the problem persists.


Reply to this email directly or view it on GitHubhttps://github.com//issues/811#issuecomment-14914202
.

@kvprashant
Copy link

@kvprashant kvprashant commented Mar 14, 2013

meteor deploy works fine. Need to figure out what went wrong. If accounts_client.js is edited with your change, it should work right?

@glasser
Copy link
Member

@glasser glasser commented Mar 14, 2013

Yes. Maybe the Heroku buildpack doesn't use your local packages changes? I have never used it.

@kvprashant
Copy link

@kvprashant kvprashant commented Mar 14, 2013

That's it. It is fetching the build from install.meteor.com which means I have to wait till the current fix is merged and released. In the meantime, I have to do this manually.

@n1mmy
Copy link
Member

@n1mmy n1mmy commented Mar 14, 2013

@kvprashant I've just released version 0.5.9 which includes this fix.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.