Skip to content

Errors in Chrome Extension Message Handlers not Logged  #2170

@scottfr

Description

@scottfr

Package + Version

  • @sentry/browser

Version:

5.5.0

Description

I am using Sentry to instrument a Chrome Extension. For the most part this works well.

However, uncaught errors in listeners registered via:

chrome.runtime.onMessage.addListener

are surprisingly not logged by sentry.

Note that uncaught errors in these handlers have a slightly different form when printed to the console. A normal uncaught error might log like this:

Uncaught TypeError: XYZ

While errors in the onMessage handler log something like:

Error in event handler: TypeError: XYZ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions