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.

notifyReleaseStages prevents exception logging to console

See original GitHub issue

If I use notifyReleaseStages to prevent sending reports when we’re running in dev, it also swallows the errors in the console. All I see is:

bugsnag.js:1581 Loaded!
bugsnag.js:281 Report not sent due to releaseStage/notifyReleaseStages configuration

For now we’re reporting all exceptions, even in dev as a workaround, and we’re overloading our quota. Could really use a fix for this one.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
snmaynardcommented, Dec 17, 2018

I wouldnt use notifyReleaseStages in that case. You can just return false in dev yourself from the callback

0reactions
broofacommented, Apr 3, 2019

[Disclosure: I work with the OP, but have run into this problem independent of his report here]

The proposed workaround in the previous comment is not an adequate solution. Not only is it overly verbose, it drops essential information. E.g. In the sample below note how the first four lines of the original log output, that describe where the syntax error actually is, are not included in the workaround output.

At the risk of being overly dramatic, this sort of issue - where bug reporting software gets “in between” me and the code I’m trying to debug, quickly becomes a showstopper issue. Do with that what you will.

Original console output:

/Users/kieffer/tend/code/cellmate/sidekick/lib/BaseClient.js:293
    const realtimeItem = {time: now;
                                   ^

SyntaxError: Unexpected token ;
    at createScript (vm.js:80:10)
<< 14 stack frames clipped >>
    at Module.require (module.js:597:17)

“Workaround” output:

SyntaxError: Unexpected token ;
[ { file: 'vm.js',
    method: 'createScript',
    lineNumber: 80,
    columnNumber: 10,
    code: undefined,
    inProject: undefined },
<< 97 lines of stack info cut >> 
  { file: 'module.js',
    method: 'Module.require',
    lineNumber: 597,
    columnNumber: 17,
    code: undefined,
    inProject: undefined } ]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Report not sent due to releaseStage/notifyReleaseStages ...
It sounds like you want to set the release stage so you should be using releaseStage not notifyReleaseStages . If you have any...
Read more >
Bugsnag docs › Platforms › JavaScript › Configuration options
Discover configuration options for your Bugsnag JavaScript integration. Customize your Bugsnag setup to meet your application's unique needs.
Read more >
try...catch - JavaScript - MDN Web Docs - Mozilla
The code in the try block is executed first, and if it throws an exception, the code in the catch block will be...
Read more >
Node.js Error Handling Best Practices: Ship With Confidence
The description is the human-readable string of your error object. It's what pops up in your console when something goes awry. Second, error...
Read more >
A mostly complete guide to error handling in JavaScript.
In addition to seeing this stack trace in the browser's console, you can access it on the stack property of the error object....
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