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

Ensure the meteor.loginServiceConfiguration subscription always becomes ready #12480

Merged
merged 1 commit into from Jan 30, 2023

Conversation

Torgen
Copy link
Contributor

@Torgen Torgen commented Jan 29, 2023

Fixes #12376

@Torgen Torgen force-pushed the service-configuration-publish branch from 38ffec2 to 144193f Compare January 29, 2023 02:20
zodern
zodern previously approved these changes Jan 29, 2023
@Grubba27 Grubba27 changed the base branch from devel to release-2.11 January 30, 2023 13:07
@Grubba27 Grubba27 dismissed zodern’s stale review January 30, 2023 13:07

The base branch was changed.

@Grubba27 Grubba27 merged commit 36b24d7 into meteor:release-2.11 Jan 30, 2023
@ixdi
Copy link

ixdi commented Feb 8, 2023

Hi,
After update to 2.11.0-rc.0 the initialization of the server shows this message:

I20230208-16:13:27.952(1)? Exception from sub meteor.loginServiceConfiguration id vAACiX9oharg3fne4 TypeError: this.ready is not a function
I20230208-16:13:27.954(1)?     at Subscription._server.publish.is_auto [as _handler] (packages/accounts-base/accounts_server.js:769:12)
I20230208-16:13:27.954(1)?     at packages/check/match.js:118:15
I20230208-16:13:27.954(1)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1329:12)
I20230208-16:13:27.954(1)?     at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
I20230208-16:13:27.954(1)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1899:18)
I20230208-16:13:27.954(1)?     at packages/ddp-server/livedata_server.js:1124:9
I20230208-16:13:27.954(1)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1329:12)
I20230208-16:13:27.954(1)?     at Subscription._runHandler (packages/ddp-server/livedata_server.js:1123:60)
I20230208-16:13:27.954(1)?     at Session._startSubscription (packages/ddp-server/livedata_server.js:934:9)
I20230208-16:13:27.955(1)?     at Session.sub (packages/ddp-server/livedata_server.js:673:12)
I20230208-16:13:27.955(1)?     at packages/ddp-server/livedata_server.js:603:43

Could it be that it is necessary to use this.ready() with function definition instead of using the arrow function?

this._server.publish("meteor.loginServiceConfiguration", () => { ... this.ready(); }, {is_auto: true})

Thanks

@Grubba27
Copy link
Contributor

Grubba27 commented Feb 8, 2023

Nice catch! Thanks!! will make the change for this.

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

Successfully merging this pull request may close these issues.

2.9: window.DDP._allSubscriptionsReady() always returns false
4 participants