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
Meteor.loggingIn() waits for all subscriptions to finish before changing its state #10432
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug is still there with Meteor 1.8.2. |
thanks @ni-ko-o-kin , I just labeled as |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I do not think this is a bug. This is canonical behavior that occurs because the publication depends on When you use This is in contrast to when you reload the page; the The code was written in awareness of these facts:
As for a workaround, if you want to avoid this behavior for a given publication, you should condition your let handle
if (Meteor.userId()) {
handle = Meteor.subscribe('links.list');
} else {
handle = undefined;
} |
Meteor: 1.8.2
OS: Ubuntu 19.04
Browser: Chrome 76, Firefox 71
reproduction repo: https://github.com/ni-ko-o-kin/meteor-loggingin-subscriptions
The expected behavior:
When a user logs in (with username: 'username' and password: 'password' in the reproduction-repo) Meteor.loggingIn() should return true and after it is finished the subscriptions should start to load.
In the reproduction-repo, after logging in, the page should first show 'logging in', then 'subs loading' and then the numbers of links.
The actual behavior:
After the user logs in, Meteor.loggingIn() return true until all subscriptions are loaded.
In the reproduction-repo, after logging in, the page shows 'logging in' until all subscriptions are loaded. 'subs loading' is never displayed.
This only happens when the user logs in, but not when the user is already logged in and refreshes the page!
You can login with
Meteor.loginWithPassword('username', 'password')
.The text was updated successfully, but these errors were encountered: