question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No listeners found for event: "event name"

See original GitHub issue

Hi,

Thanks for this great contribution and this amazing framework. Recently I noticed one problem with defining requester and responder in a single file. Consider file A includes:

const cote = require('cote');
const responder = new cote.Responder({name: "testresponder"});
const requester = new cote.Requester({name: "testrequester"});

requester.send({type: 'call'}, (res) => {
    console.log(res);
});

and file B includes:

const cote = require('cote');
const responder = new cote.Responder({name: "callresponder"});

responder.on('call', (req, cb) => {
    cb("test");
});

I first start the file B which is the responder and then I run the file A. the console log is: testresponder > No listeners found for event: call But when I delete the responder initiation in file A, it will work just fine. However, defining keys will solve the problem, but I don’t know why this won’t work without keys.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dasherswcommented, Dec 29, 2019

That’s totally fine, then you shouldn’t have a responder in file A. 😃 you got that error because you had a responder in A that can’t handle the message call.

0reactions
fraybabakcommented, Sep 23, 2021

I get this error too:

this is my responder:

const cote = require('cote');
var auth_consumer = new cote.Responder({ name: 'auth_service' });

auth_consumer.on('generate-token', async (req, cb) => {
      cb(null, {message: "ok", token: createTokens(req.device, req.exp), status:200})
  });

I am getting this in One in between two requests :

socket-service > No listeners found for event: generate-token

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: Android Plugin - No listeners found for event · Issue #2962
I am using the mainclass name but still it doesnt seem to accept it.
Read more >
Example of event listeners does not work (Crowd plugin)
Hi,. I'm trying to run the example of a Crowd plugin with Event Listeners but it does not work. I see differences between...
Read more >
How to find event listeners on a DOM node in JavaScript or in ...
To access the internal event data, use $._data(elem, 'events') . Note that this function is marked "for internal use only" in the jQuery...
Read more >
Failed to notify index event listener - how to solve related issues
This guide will help you check for common problems that cause the log ” Failed to notify index event listener ” to appear....
Read more >
Events User Guide: Installing Event Listeners - Phabricator
Make sure the listener is registered. It should appear in the "Events" tab of DarkConsole. If it's not there, you may have forgotten...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found