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

emit not working - not emiting to all clients and Random is not defined. #40

Open
ghost opened this issue Oct 5, 2015 · 5 comments
Open

Comments

@ghost
Copy link

ghost commented Oct 5, 2015

Just in stalled Streams and added the standard example code (with correct permissions)

chatStream = new Meteor.Stream('chat');

sendChat = function(message) {
chatStream.emit('message', message);
console.log('me: ' + message);
};

chatStream.on('message', function(message, arg) {
console.log(arg);
console.log('user: ' + message);
});

I run into the following two errors:

  1. When I load my Meteor app for the first time I get the following exception:
    I20151005-11:50:11.732(1)? Exception from sub stream-chat id S6sjbJYZ3zn4wLr8f ReferenceError: Random is not defined
    I20151005-11:50:11.734(1)? at [object Object].handler (packages/streams/lib/server.js:40:1)
    I20151005-11:50:11.734(1)? at maybeAuditArgumentChecks (livedata_server.js:1692:12)
    I20151005-11:50:11.734(1)? at [object Object].
    .extend.runHandler (livedata_server.js:1023:17)
    I20151005-11:50:11.734(1)? at [object Object].
    .extend.startSubscription (livedata_server.js:842:9)
    I20151005-11:50:11.734(1)? at [object Object].
    .extend.protocol_handlers.sub (livedata_server.js:614:12)
    I20151005-11:50:11.734(1)? at livedata_server.js:548:43
    I20151005-11:50:13.321(1)? Exception from sub stream-chat id 7bv8NZNAp7pP9KT8G ReferenceError: Random is not defined
    I20151005-11:50:13.321(1)? at [object Object].handler (packages/streams/lib/server.js:40:1)
    I20151005-11:50:13.321(1)? at maybeAuditArgumentChecks (livedata_server.js:1692:12)
    I20151005-11:50:13.321(1)? at [object Object].
    .extend.runHandler (livedata_server.js:1023:17)
    I20151005-11:50:13.321(1)? at [object Object].
    .extend.startSubscription (livedata_server.js:842:9)
    I20151005-11:50:13.321(1)? at [object Object].
    .extend.protocol_handlers.sub (livedata_server.js:614:12)
    I20151005-11:50:13.322(1)? at livedata_server.js:548:43
  2. Events are not emitted to all clients, only the sender.
@team-pie
Copy link

has this been fixed? I'm having a similar issue

@kusmierz
Copy link

Try add to your app package Random:

meteor add random

@team-pie
Copy link

Yeah I did that. Thanks. Would be nice to include it in the dependencies

@kusmierz
Copy link

@papero-co I think so too, but unfortunately it seems the project is no longer maintained :( see #21

@team-pie
Copy link

I've seen that. I could not tell if @Lepozepo had taken over. Anyway problem fixed for me :)

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

2 participants