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.

"double callback!" warning needs more details

See original GitHub issue

I’m getting the infamous double callback! warning regularly in production and can’t figure out how to track it down. There’s no way to tell which requests are causing it (there’s many dozen varied ones running at any given time), or even which version of superagent it’s coming from (I’m running 2.3.0, but a dependency still uses 1.8.3). Including the request’s URL in the warning would help a lot and may allow me to spot a pattern that will lead to a repro; adding some indication that the warning is from superagent would be a nice touch too. Thanks.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
focusauruscommented, Nov 3, 2016

If you can reproduce on demand, it would be great to get a stack trace. Edit the node_modules/superagent/lib/node.js file and replace this line:

 if (this.called) return console.warn('superagent: double callback bug');

with this line:

 if (this.called) throw new Error('superagent: double callback bug');

Then reproduce it and post the stack trace here.

0reactions
kornelskicommented, Dec 12, 2016

I’ve added more info in 1.8.5 and 3.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

remove annoying "double callback" warning #313 - GitHub
Same issue with 'double callback!' with version 1.8.4. I use PM2 with node.js. When superagent's timeout exceeded I log the error and run ......
Read more >
node.js - Chai http - double callback issue - Stack Overflow
I have a normal unit test for my REST api using chai-http. It fails with following error warn: double callback! error: { SyntaxError: ......
Read more >
Command and Control (C&C) callback detection
Identify the Callback Address, C&C List Source, and Process. Go to the System Tray and double-click the OfficeScan Agent icon. Click the Logs...
Read more >
Advanced Callbacks | Dash for Python Documentation | Plotly
Callbacks triggered by user actions typically have one item in triggered , unless the same action changes two props at once or the...
Read more >
Introduction: callbacks - The Modern JavaScript Tutorial
The second argument (and the next ones if needed) are for the successful result. Then callback(null, result1, result2…) is called.
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