Skip to content

Duplicate Breadcrumbs on Android #232

@fr3fou

Description

@fr3fou

Environment

    "@sentry/capacitor": "0.9.0",
    "@sentry/react": "7.8.1",
    "@sentry/tracing": "7.8.1",

Sentry SaaS

Haven't upgraded to 0.10.x, as we're still running Capacitor 3.

Steps to Reproduce

  1. Use a Capacitor app on an Android device and cause an exception
  2. Open the Sentry dashboard
    image

Expected Result

Breadcrumbs shouldn't be duplicated.

Actual Result

The breadcrumbs are duplicated.

My integration in the JS side is nothing special:

Sentry.init(
  {
    dsn: SENTRY_DSN,
    integrations: [new BrowserTracing()],
    release: `app-v1@${VERSION?.trim() ?? gitInfo.commit.shortHash}`,
    dist: gitInfo.commit.shortHash,
    debug: false,
    beforeBreadcrumb(breadcrumb, hint) {
      if (breadcrumb.category === "xhr") {
        const response = hint?.xhr.response ?? {}
        const request = hint?.input ?? {}
        breadcrumb.data = {
          ...breadcrumb.data,
          request,
          response,
        }
      }
      return breadcrumb
    },
  },
  SentryReact.init
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions