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

TypeError: Cannot read property 'userId' of null while using Streamy.sessionsForUsers() #43

Open
2gen opened this issue Feb 4, 2021 · 0 comments

Comments

@2gen
Copy link

2gen commented Feb 4, 2021

While using Streamy.sessionsForUsers(arrOfUserIds).emit('private', { body: 'This is a private message' }); we are getting sporadic errors in the server console that do not make sense:

Exception in callback of async function: TypeError: Cannot read property 'userId' of null
     at packages\yuukan_streamy.js:546:47
     at packages\underscore.js:234:20
     at _.each._.forEach (packages\underscore.js:147:22)
     at Function._.filter._.select (packages\underscore.js:233:5)
     at Object.Streamy.socketsForUsers (packages\yuukan_streamy.js:545:21)
     at packages\yuukan_streamy.js:690:24
     at runWithEnvironment (packages\meteor.js:1180:24)
     at Object.<anonymous> (packages\meteor.js:1193:14)
     at [object Object].onMessage (packages\yuukan_streamy.js:627:18)
     at packages/ddp-server/livedata_server.js:559:43

The user(s) that we are trying to emit to are online and haven't disconnected. And if we wait a little bit (less then a minute) the TypeError's in the server console stop and the connection is established again and messages are sent/received successfully.

The problem is the clients are missing out on important emits during their "blip".

Any ideas here?

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

No branches or pull requests

1 participant