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.

Hello,

I’m using bugsnag-js for monitoring a chrome extension. Errors are sent, but never displayed in Bugsnag It seems that there is a problem because of 'chrome-extension" into stacks error.

Exemple :

Error
    at generateStacktrace (chrome-extension://nkleeghhjabalfolcphldebmfabofbia/lib/bugsnag.js:489:13)
    at Object.self.notify (chrome-extension://nkleeghhjabalfolcphldebmfabofbia/lib/bugsnag.js:100:19)
    at _init (chrome-extension://nkleeghhjabalfolcphldebmfabofbia/js/content-script/smartbar.js:442:17)
    at Object.callback (chrome-extension://nkleeghhjabalfolcphldebmfabofbia/js/content-script/smartbar.js:322:13)
    at safeCallbackApply (extensions::sendRequest:21:15)
    at handleResponse (extensions::sendRequest:73:7)

As workaround, I do this in bugsnag.js :

function stacktraceFromException(exception) {
    return (exception.stack || exception.backtrace || exception.stacktrace).replace(/chrome-extension:/g, "chromeextension:");
  }

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
KaoruDevcommented, Oct 9, 2015

+1 for chrome extension support =)

4reactions
ConradIrwincommented, Dec 8, 2014

Hi @H2go!

A slightly less hacky solution might be to use the existing bugsnag.js, and add the following hook.

Bugsnag.beforeNotify = function (error, metaData) {
    error.stacktrace = error.stacktrace.replace(/chrome-extension:/g, "chromeextension:");
}

Unfortunately we ignore anything that looks like it might be a browser extension on the backend, otherwise people running websites get spurious errors from content scripts. This is unlikely to change soon, but we might be able to add a checkbox to configure it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome Web Store
You can add new features to Chrome by installing extensions. Visit the Chrome Web Store on your desktop computer to discover hundreds of...
Read more >
Install and manage extensions - Chrome Web Store Help
Install an extension · Open the Chrome Web Store. · Find and select the extension you want. · Click Add to Chrome. ·...
Read more >
chrome.extension - Chrome Developers
The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and...
Read more >
Our favorite Chrome extensions of 2022 - The Keyword
We recommend Chrome extensions to help you be more productive at work, enjoy watching shows and learn new skills.
Read more >
Chrome Remote Desktop
The easy way to remotely connect with your home or work computer, or share your screen with others. Securely access your computer whenever...
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