-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
TypeError: r is undefined; roles_common.js line 780 #311
Comments
@Meteor-Community-Packages/meteor-roles has anyone had time to look into this? I don't know the codebase well enough to respond properly. |
@ggerber Looking at your code for your I can't say for sure that this is the cause without running your code live, but its a starting point. |
Two issues, I think:
Debug by removing the
Would be great to have a reproduction for this. |
I'll set aside some time in the coming days to dig into this ... related issue: #308 (comment) |
Hi, Now I am no longer running into this issue. My publication is:
My container is:
|
@ggerber just beware that this being solved now, without code modification, has a very good chance of being a race condition. The problem may resurface at random, especially in a production environment where network latency is likely to be quite a bit higher. |
Hi Kelly,
I plan to keep a keen eye on this thread and contribute if I see it
re-occuring again.
Thanks
…On Thu, 6 Feb 2020 at 13:57, Kelly Copley ***@***.***> wrote:
@ggerber <https://github.com/ggerber> just beware that this being solved
now, without code modification, has a very good chance of being a race
condition. The problem may resurface at random, especially in a production
environment where network latency is likely to be quite a bit higher.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#311?email_source=notifications&email_token=ACQLPZTI3QXZUBY44NO5KZ3RBP3KNA5CNFSM4KNURVC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK66UKA#issuecomment-582871592>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQLPZVKFMCOJID2JCLPHQLRBP3KNANCNFSM4KNURVCQ>
.
|
Got the error again while I was using my app (which programmatically added a new scope to the current user). Not sure if client console output is of any use...
|
@ggerber could you please provide us with a sample project where we can reproduce this error? I've not yet been able to reproduce it. Just start a new Meteor project, make sure you have all the components needed to reproduce the error and upload it to e.g. github. |
At a conference at the moment, but will see what I can do, by end this week
…On Tue, 18 Feb 2020, 8:30 AM Simon Schick, ***@***.***> wrote:
@ggerber <https://github.com/ggerber> could you please provide us with a
sample project where we can reproduce this error? I've not yet been able to
reproduce it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#311?email_source=notifications&email_token=ACQLPZXS4HXMTTLKLFKU64TRDN6B3A5CNFSM4KNURVC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMAX73Q#issuecomment-587300846>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQLPZRP5QUBUUOIJDDRRPLRDN6B3ANCNFSM4KNURVCQ>
.
|
Hi, I made a repo: to start: Then signin as: Press the 'Add system' button TypeError: r is undefined jumps out (most of the time, but not always) |
Thanks a lot for providing the test scenario! I was now able to write a test for it and published it as version |
Hi,
I get the above TypeError.
To show what goes on I copied getRolesForUser and added some console.log statements
The console.log statements are:
A mongo console query gives
Could this be a latency issue, such that the subscription is not completely ready?
Or does line 780 make invalid assumptions about the contents of the 'roles' array?
I use withTracker to check the signedin user's roles:
The publication looks so:
The text was updated successfully, but these errors were encountered: