sentry-capacitor
sentry-capacitor copied to clipboard
Duplicate Breadcrumbs on Android
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
- Use a Capacitor app on an Android device and cause an exception
- Open the Sentry dashboard

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
)