Coder Social home page Coder Social logo

getsentry / sentry-capacitor Goto Github PK

View Code? Open in Web Editor NEW
113.0 35.0 29.0 12.47 MB

The official Sentry SDK for Capacitor

Home Page: https://sentry.io

License: MIT License

Ruby 1.72% Java 7.09% Objective-C 0.57% Swift 10.13% JavaScript 4.66% TypeScript 55.50% HTML 5.97% SCSS 9.64% Shell 1.44% Vue 0.48% CSS 2.80%
sentry sdk capacitor ionic javascript hybrid-apps android ios mobile crash

sentry-capacitor's Introduction

Sentry

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions

Official Sentry SDK for Capacitor

build Discord Chat

Installation

# Angular 12 and newer:
yarn add @sentry/capacitor @sentry/angular-ivy --exact

# Angular 10 and 11:
yarn add @sentry/capacitor @sentry/angular --exact

Usage

To use this SDK, call Sentry.init as early as possible after loading the page. This will initialize the SDK and hook into the environment. Note that you can turn off almost all side effects using the respective options.

// app.module.ts

import * as Sentry from "@sentry/capacitor";
import { init as sentryAngularInit, createErrorHandler }  from "@sentry/angular";

// Init by passing the sibling SDK's init as the second parameter.
Sentry.init({
  dsn: "__DSN__",
}, sentryAngularInit);

// Attach the Sentry ErrorHandler
@NgModule({
  providers: [
    {
      provide: ErrorHandler,
      useValue: createErrorHandler(),
    },
  ],
})

To set context information or send manual events, use the exported functions of @sentry/capacitor. Note that these functions will not perform any action before you have called Sentry.init():

import * as Sentry from '@sentry/capacitor';

// Set user information, as well as tags and further extras
Sentry.configureScope(scope => {
  scope.setExtra('battery', 0.7);
  scope.setTag('user_mode', 'admin');
  scope.setUser({ id: '4711' });
  // scope.clear();
});

// Add a breadcrumb for future events
Sentry.addBreadcrumb({
  message: 'My Breadcrumb',
  // ...
});

// Capture exceptions, messages or manual events
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
  message: 'Manual',
  stacktrace: [
    // ...
  ],
});

Resources

  • Documentation
  • Discussions
  • Discord Chat
  • Stack Overflow
  • Twitter Follow

sentry-capacitor's People

Contributors

abhiprasad avatar bruno-garcia avatar brustolin avatar csparkle avatar dependabot[bot] avatar floppy012 avatar getsentry-bot avatar github-actions[bot] avatar hazat avatar jcesarmobile avatar jennmueng avatar kamilogorek avatar krystofwoldrich avatar lms24 avatar lucas-zimerman avatar marandaneto avatar mattjohnsonpint avatar michaeltintiuc avatar mlostekk avatar omercnet avatar paolosanchi avatar piotr-cz avatar sawaca96 avatar zapominacz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentry-capacitor's Issues

Missing outboxPath error when sending event from android with capacitor 3 and vuejs 3

Environment

I use sentry.io with capactior 3.3.2 , vue 3.2.23, @sentry/capacitor 0.4.1, @sentry/tracing 6.15.0, @sentry/vue 6.15.0,

Steps to Reproduce

my main.ts

import './theme/scss/global.scss'
import { createApp } from 'vue'
import { Store } from 'vuex'
import { store, RootActionsTypes } from '@/store'
import App from './App.vue'
import router from './router'
import { IonicVue } from '@ionic/vue'
import { useFirebaseAnalytics } from './modules/firebase-analytics'
import { useAwsAmplify } from './modules/aws-amplify'
import { useVueI18n } from './modules/vue-i18n'
import { useGooglemaps } from './modules/googlemaps'
import { useSentry } from './modules/sentry'

const startApp = async () => {
  await Promise.all([useFirebaseAnalytics(), useGooglemaps()])
  useAwsAmplify()

  const app = createApp(App)
    .use(IonicVue)
    .use(router)
    .use(store as Store<any>)
  useVueI18n(app)
  useSentry(app)

  store.dispatch(RootActionsTypes.INSTANTIATE_API)
  await router.isReady()
  app.mount('#app')
}

startApp()

modules/sentry.ts

import { App } from 'vue'
import * as Sentry from '@sentry/capacitor'
import * as SentryVue from '@sentry/vue'
import '@sentry/tracing'

const {
  VUE_APP_SENTRY_DSN = 'mydns',
  VUE_APP_ENV = 'dev'
} = process.env

export const useSentry = (app: App) => {
  Sentry.init(
    {
      app: app,
      dsn: VUE_APP_SENTRY_DSN,
      environment: VUE_APP_ENV,
      release: `myapp@${process.env.npm_package_version}`,
      dist: '1',
      tracesSampleRate: 0.1,
      debug: VUE_APP_ENV === 'dev'
    },
    SentryVue.init
  )
}

Expected Result

should send error to sentry.io

Actual Result

work fine on web version, but when build on android every time an event is sent I have "Missing outboxPath" errors in android studio logs and nothing is sent.

logcat when event is send from android

2021-11-30 17:49:14.280 21501-14000/fr.medicalib.pro V/Capacitor: callback: 22166592, pluginId: SentryCapacitor, methodName: getStringBytesLength, methodData: {"string":"{\"exception\":{\"values\":[{\"type\":\"Error\",\"value\":\"test error home\",\"stacktrace\":{\"frames\":[{\"colno\":160382,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"M\",\"in_app\":true,\"lineno\":340},{\"colno\":155350,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"ot\",\"in_app\":true,\"lineno\":340},{\"filename\":\"app:\/\/\/<anonymous>\",\"function\":\"Array.forEach\",\"in_app\":true},{\"colno\":155361,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"?\",\"in_app\":true,\"lineno\":340},{\"colno\":170318,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"o\",\"in_app\":true,\"lineno\":340},{\"colno\":3939,\"filename\":\"app:\/\/\/js\/chunk-a789fd9c.0ead8623.js\",\"function\":\"?\",\"in_app\":true,\"lineno\":1}]},\"mechanism\":{\"handled\":false,\"type\":\"onunhandledrejection\"}}]},\"level\":\"error\",\"platform\":\"javascript\",\"event_id\":\"759367199e3743daa85a83c28a853628\",\"timestamp\":1638290954.263,\"environment\":\"dev\",\"release\":\"medicalib-app-pro@undefined\",\"dist\":\"1\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.1\"}],\"version\":\"0.4.1\"},\"breadcrumbs\":[{\"timestamp\":1638290928.6,\"category\":\"console\",\"data\":{\"arguments\":[{\"message\":\"Converting circular structure to JSON\\n    --> starting at object with constructor 'Object'\\n    |     property '_context' -> object with constructor 'Object'\\n    --- property 'app' closes the circle\",\"name\":\"TypeError\",\"stack\":\"TypeError: Converting circular structure to JSON\\n    --> starting at object with constructor 'Object'\\n    |     property '_context' -> object with constructor 'Object'\\n    --- property 'app' closes the circle\\n    at JSON.stringify (<anonymous>)\\n    at postToNative (http:\/\/localhost\/:310:60)\\n    at Object.cap.toNative (http:\/\/localhost\/:380:25)\\n    at http:\/\/localhost\/:461:25\\n    at new Promise (<anonymous>)\\n    at Object.cap.nativePromise (http:\/\/localhost\/:460:24)\\n    at Object.t.initNativeSdk (http:\/\/localhost\/:914:20)\\n    at Object.<anonymous> (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:246:4255)\\n    at u (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:13591)\\n    at Object.next (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:12886)\\n    at http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:12611\\n    at new Promise (<anonymous>)\\n    at l (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:12404)\\n    at Object.initNativeSdk (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:246:3680)\\n    at Object.kn (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:246:9907)\\n    at V (http:\/\/localhost\/js\/app.8870b6c0.js:1:154547)\\n    at http:\/\/localhost\/js\/app.8870b6c0.js:1:155697\\n    at l (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:117:24342)\\n    at Generator._invoke (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:117:25668)\\n    at Generator.next (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:117:24767)\\n    at r (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:32:20692)\\n    at s (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:32:20895)\"}],\"logger\":\"console\"},\"level\":\"error\",\"message\":\"TypeError: Converting circular structure to JSON\\n    --> starting at object with constructor 'Object'\\n    |     property '_context' -> object with constructor 'Object'\\n    --- property 'app' closes the circle\"},{\"timestamp\":1638290929.391,\"category\":\"fetch\",\"data\":{\"method\":\"GET\",\"url\":\"https:\/\/apigw.awsdev.medicalib.fr\/iam\/users\/me\",\"status_code\":200},\"type\":\"http\"},{\"timestamp\":16382
2021-11-30 17:49:14.286 21501-14000/fr.medicalib.pro V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 22166593, pluginId: SentryCapacitor, methodName: captureEnvelope
2021-11-30 17:49:14.287 21501-14000/fr.medicalib.pro V/Capacitor: callback: 22166593, pluginId: SentryCapacitor, methodName: captureEnvelope, methodData: {"envelope":"{\"event_id\":\"759367199e3743daa85a83c28a853628\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.1\"}],\"version\":\"0.4.1\"}}\n{\"content_type\":\"application\/json\",\"length\":12747,\"type\":\"event\"}\n{\"exception\":{\"values\":[{\"type\":\"Error\",\"value\":\"test error home\",\"stacktrace\":{\"frames\":[{\"colno\":160382,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"M\",\"in_app\":true,\"lineno\":340},{\"colno\":155350,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"ot\",\"in_app\":true,\"lineno\":340},{\"filename\":\"app:\/\/\/<anonymous>\",\"function\":\"Array.forEach\",\"in_app\":true},{\"colno\":155361,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"?\",\"in_app\":true,\"lineno\":340},{\"colno\":170318,\"filename\":\"app:\/\/\/js\/chunk-vendors.a174dc9f.js\",\"function\":\"o\",\"in_app\":true,\"lineno\":340},{\"colno\":3939,\"filename\":\"app:\/\/\/js\/chunk-a789fd9c.0ead8623.js\",\"function\":\"?\",\"in_app\":true,\"lineno\":1}]},\"mechanism\":{\"handled\":false,\"type\":\"onunhandledrejection\"}}]},\"level\":\"error\",\"platform\":\"javascript\",\"event_id\":\"759367199e3743daa85a83c28a853628\",\"timestamp\":1638290954.263,\"environment\":\"dev\",\"release\":\"medicalib-app-pro@undefined\",\"dist\":\"1\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.1\"}],\"version\":\"0.4.1\"},\"breadcrumbs\":[{\"timestamp\":1638290928.6,\"category\":\"console\",\"data\":{\"arguments\":[{\"message\":\"Converting circular structure to JSON\\n    --> starting at object with constructor 'Object'\\n    |     property '_context' -> object with constructor 'Object'\\n    --- property 'app' closes the circle\",\"name\":\"TypeError\",\"stack\":\"TypeError: Converting circular structure to JSON\\n    --> starting at object with constructor 'Object'\\n    |     property '_context' -> object with constructor 'Object'\\n    --- property 'app' closes the circle\\n    at JSON.stringify (<anonymous>)\\n    at postToNative (http:\/\/localhost\/:310:60)\\n    at Object.cap.toNative (http:\/\/localhost\/:380:25)\\n    at http:\/\/localhost\/:461:25\\n    at new Promise (<anonymous>)\\n    at Object.cap.nativePromise (http:\/\/localhost\/:460:24)\\n    at Object.t.initNativeSdk (http:\/\/localhost\/:914:20)\\n    at Object.<anonymous> (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:246:4255)\\n    at u (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:13591)\\n    at Object.next (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:12886)\\n    at http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:12611\\n    at new Promise (<anonymous>)\\n    at l (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:203:12404)\\n    at Object.initNativeSdk (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:246:3680)\\n    at Object.kn (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:246:9907)\\n    at V (http:\/\/localhost\/js\/app.8870b6c0.js:1:154547)\\n    at http:\/\/localhost\/js\/app.8870b6c0.js:1:155697\\n    at l (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:117:24342)\\n    at Generator._invoke (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:117:25668)\\n    at Generator.next (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:117:24767)\\n    at r (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:32:20692)\\n    at s (http:\/\/localhost\/js\/chunk-vendors.a174dc9f.js:32:20895)\"}],\"logger\":
2021-11-30 17:49:14.287 21501-13950/fr.medicalib.pro I/capacitor-sentry: Error when writing envelope, no outbox path is present.
2021-11-30 17:49:14.288 21501-13950/fr.medicalib.pro D/Capacitor: Sending plugin error: {"save":false,"callbackId":"22166593","pluginId":"SentryCapacitor","methodName":"captureEnvelope","success":false,"error":{"message":"Missing outboxPath"}}
2021-11-30 17:49:14.296 21501-14000/fr.medicalib.pro V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 22166594, pluginId: SentryCapacitor, methodName: addBreadcrumb
2021-11-30 17:49:14.297 21501-14000/fr.medicalib.pro V/Capacitor: callback: 22166594, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.638290954294E9,"category":"console","data":{"arguments":"[{\"message\":\"Missing outboxPath\"}]","logger":"console"},"level":"error","message":"[object Object]"}
2021-11-30 17:49:14.300 21501-21501/fr.medicalib.pro E/Capacitor/Console: File: http://localhost/js/chunk-vendors.a174dc9f.js - Line 232 - Msg: Sentry Logger [Error]: Error while sending event: Error: Missing outboxPath
2021-11-30 17:49:49.654 21501-14000/fr.medicalib.pro V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 22166595, pluginId: SentryCapacitor, methodName: addBreadcr

autoSessionTracking / enableAutoSessionTracking option is ignored, unwanted tracking of users

Environment

How do you use Sentry?
Sentry SaaS

Which SDK and version?

  • "@capacitor/android": "^3.4.0",
  • "@capacitor/cli": "^3.4.0",
  • "@capacitor/core": "^3.4.0",
  • "@capacitor/ios": "^3.4.0",
  • "@ionic/angular": "^6.0.7",
  • "@ionic/core": "^6.0.7",
  • "@sentry/angular": "^6.11.0",
  • "@sentry/capacitor": "^0.4.1",

Tested on iOS, API Request a captured via mitmproxy

Steps to Reproduce

  • Setup Sentry and set autoSessionTracking: false e.g.
{
        dsn: 'https://[email protected]/????',
        environment: 'prod',
        integrations: [new Integrations.BrowserTracing()],
        tracesSampleRate: 1.0,
        release: '1.0.0',
        autoSessionTracking: false,
}
  • build angular ionic application in production
  • sync files with npx cap sync ios
  • open xcode npx cap open ios
  • run on a real device
  • view network traffic

Expected Result

there should be no more API calls to https://sentry.io/api/?/envelope/ on ui clicks

Actual Result

The autoSessionTracking setting is ignored on native builds. If you look at the source code, the option is is overridden with enableAutoSessionTracking. However, this option is not described anywhere in the capacitor documentation.

If I set enableAutoSessionTracking option explicitly to false, it still doesn't seem to make any difference and every click is still transmitted to the API, it shouldn't be like that. We do not want to track our users unnecessarily.

Capacitor 3

Since v3 of Capacitor many things changed and some things are different now. Would be pretty nice to support v3. We are unable to migrate to v3 because of dependency conflicts.

https://capacitorjs.com/docs/updating/3-0

With that, it might also be a good chance to polish things up like exports:

import * as Sentry from "@sentry/capacitor";
// to
import { Sentry } from "@sentry/capacitor";

Disabling the SDK still results in native errors being sent

Overview

Disabling the SDK still results in native errors being sent.

There are 2 scenarios:

  • Scenario 1 is that enabled and enableNative flags at initialization do not stop Android native errors from being sent.
  • Scenario 2 is that disabling the SDK at runtime does not stop Android and iOS native errors from being sent.

This occurs on hybrid iOS and hybrid Android which use the native SDKs to process and send the event (might be relevant). It is not an issue on Web wherein it works fine (it also works fine using @sentry/browser directly).

A repro can be found here.

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Sentry Capacitor - 0.4.3

Steps to Reproduce

See Steps to Reproduce.

Expected Result

  • Scenario 1
    • Expected setting enabled: false (and perhaps even enableNative: false) to be sufficient at stopping native errors from being sent on Android. enabled: false alone works as expected on iOS. enabled: false alone works as expected for Android JavaScript errors.
  • Scenario 2
    • Expected setting getCurrentHub().getClient().getOptions().enabled = false (and perhaps even (getCurrentHub().getClient().getOptions() as any).enableNative with (getCurrentHub().getClient().getOptions() as any).enableNativeCrashHandling) at runtime to be sufficient at stopping native errors from being sent on Android and iOS.
    • Related: If we are to use getCurrentHub().getClient().getOptions() to disable the SDK at runtime, it would be nice if it had TypeScript typings that reflects the changes in the Capacitor SDK such as the additional native-related properties which do appear to be present at runtime.

Actual Result

  • Scenario 1
    • Setting enabled: false (even with enableNative: false) results in native errors being sent on Android.
  • Scenario 2
    • Setting getCurrentHub().getClient().getOptions().enabled = false (even with (getCurrentHub().getClient().getOptions() as any).enableNative and (getCurrentHub().getClient().getOptions() as any).enableNativeCrashHandling) at runtime results in native errors being sent on Android and iOS.
    • Related: Using getCurrentHub().getClient().getOptions() to disable the SDK at runtime does not have TypeScript typings that reflects the changes in the Capacitor SDK such as the additional native-related properties which do appear to be present at runtime.

The TypeScript typings enhancement could be its own issue, but I erred on the side of including it in here for now in case there's a preference to keep all of this SDK enable/disable stuff in one place. Also, if there's a better approach for disabling the SDK at runtime that results in not using the untyped native-related properties of those APIs, then our use case for them may go away. 🙂

Final Thoughts

Thank you so much for taking the time to investigate and/or work on this issue! 😀

startTransaction is not re-exported

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
@sentry/[email protected]

Steps to Reproduce

I tried to import startTransaction from @sentry/capacitor

import * as Sentry from "@sentry/capacitor";

Sentry.startTransaction({name: 'some name'});

Expected Result

If @sentry/capacitor should work as a drop-in replacement for @sentry/browser, @sentry/angular, @sentry/react, @sentry/vue then it should also export startTransaction.

Actual Result

@sentry/capacitor does not export startTransaction. As a workaround it can be imported from @sentry/browser directly.

import * as Sentry from "@sentry/browser";

Sentry.startTransaction({name: 'some name'});

(Android) Breadcrumbs are getting duplicated

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version? 0.4.2

Steps to Reproduce

I just opened the sample app and there were duplicated breadcrumbs while using it.

image

Expected Result

events without duplicated breadcrumbs.

Actual Result

breadcrumbs from JS side are duplicated
image
image

API request failed caused by: sentry reported an error: Invalid token (http status: 401) (self-hosted sentry)

Hi,

I have an Ionic, Angular, Capacitor native app.

I have followed this doc: https://docs.sentry.io/platforms/javascript/guides/capacitor/

Environment

How do you use Sentry?
self-hosted/on-premise (which version?) 21.12.0

Which SDK and version?

  "@sentry/angular": "^6.16.1",
  "@sentry/capacitor": "^0.4.1",
  "@sentry/cli": "^1.71.0",

Steps to Reproduce

  1. What
  2. you
  3. did.
./node_modules/.bin/sentry-cli releases --org my-org --project my-project files my-mobile@
1.0.0  upload-sourcemaps ./www --dist 1

Expected Result

Need to publish Source maps

Actual Result


> Found 181 release files
> Analyzing 181 sources
> Analyzing completed in 1.811s
> Rewriting sources
> Rewriting completed in 2.275s
> Adding source map references
error: API request failed
  caused by: sentry reported an error: Invalid token (http status: 401)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|de

P.S.

Enter your token: my-auth-token-here
Valid token for user [email protected]

Stored token in C:\Users\Sampath.sentryclirc

Auth Token

SCOPES
event:admin, event:read, member:read, org:read, project:read, project:releases, team:read, event:write, org:admin, member:admin, alerts:read, org:integrations, team:write, project:write, project:admin, team:admin, alerts:write, member:write, org:write

.sentryclirc

[auth]
token=my-auth-token-here

IOS JS errors do not include native metadata - Android does

Overview

IOS Sentry JS errors do not include native metadata; Android does include native metadata.

A repro can be found here.

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Sentry Capacitor - 0.4.3

Steps to Reproduce

See Steps to Reproduce

Expected Result

Expecting to see IOS native metadata on JS errors.

IOS Native-level error example:

Screen Shot 2022-02-25 at 10 08 12 AM

Disable browser session tracking

As this SDK wraps the browser SDK, the auto session tracking is running on both the native layer and the JS layer. Although nothing is sent by the browser SDK because of:

[warn] - Sentry Logger [Warn]: Dropping session because custom transport doesn't implement sendSession

we should disable the browser session tracking.

Sentry mismatch stacktrace and sourcempas pointing to wrong source code

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?

"@sentry/capacitor": "^0.4.1",
"@sentry/react": "^6.16.1",
"@sentry/tracing": "^6.16.1",

Steps to Reproduce

We have developed a hybrid mobile application with capacitor + react built with vite. We have a sentry + capacitor integration that is not working as expected.

Issues are raised but they are linked to the wrong source file.

This is the exception on Sentry

Error: Test Captured Exception 10
  at onClick(../../src/pages/lists/components/Favorites.tsx:111:28)
  at Rb(../../node_modules/react-dom/cjs/react-dom.production.min.js:105:489)
  at Xb(../../node_modules/react-dom/cjs/react-dom.production.min.js:106:139)
  at Yb(../../node_modules/react-dom/cjs/react-dom.production.min.js:106:200)
  at Ze(../../node_modules/react-dom/cjs/react-dom.production.min.js:149:108)
  at se(../../node_modules/react-dom/cjs/react-dom.production.min.js:150:18)
  at ? (../../node_modules/react-dom/cjs/react-dom.production.min.js:161:311)
  at Jb(../../node_modules/immer/dist/immer.esm.js:1:17584)
  at Nb(../../node_modules/react-dom/cjs/react-dom.production.min.js:104:58)
  at jd(../../node_modules/react-dom/cjs/react-dom.production.min.js:153:22)
  at yc(../../node_modules/react-dom/cjs/react-dom.production.min.js:125:104)
  at hd(../../node_modules/react-dom/cjs/react-dom.production.min.js:124:55)
  at hd([native code])
  at ? (../../node_modules/scheduler/index.js:4:20)
  at Hb(../../node_modules/immer/dist/immer.esm.js:1:17584)
  at gd(../../node_modules/react-dom/cjs/react-dom.production.min.js:123:281)
  at gd([native code])
  at tt(../../node_modules/@sentry/integrations/node_modules/tslib/tslib.es6.js:1:1)

but the exception in reality happens on src/pages/home/HomePage.tsx

at this point, I'm thinking that Sentry is mismatching (I don't know if on the sentry-capacitor SDK or on sentry.io website) the exception with the source code uploaded.

  1. or the client-side sentry is referencing the wrong stack trace (uploading the trace incorrectly)
  2. or the sentry.io can't correctly match the correct stack trace with the source maps uploaded

In our app, we have sentry configured like this

import * as Sentry from '@sentry/capacitor';
import * as SentryReact from '@sentry/react';
import {Integrations as TracingIntegrations} from '@sentry/tracing';

import {name, version} from './version.json';

if (import.meta.env.VITE_ENVIRONMENT === 'production' || import.meta.env.VITE_ENVIRONMENT === 'staging') {
  Sentry.init(
    {
      environment: import.meta.env.VITE_ENVIRONMENT,
      release: `${name}@${version}+${import.meta.env.VITE_ENVIRONMENT}`,
      dsn: import.meta.env.VITE_SENTRY_DSN,
      integrations: [new TracingIntegrations.BrowserTracing()],
      dist: version,
      debug: false,
      tracesSampleRate: import.meta.env.VITE_ENVIRONMENT === 'production' ? 0.2 : 1,
      attachStacktrace: true,
      ignoreErrors: ['ResizeObserver loop limit exceeded'],
    },
    SentryReact.init,
  );
} else {
  // console.log('SENTRY DISABLED IN DEVELOPMENT ENVIRONMENT');
}

export {};

To build the app we do this:

tsc && vite build --mode staging && npx cap sync

then we upload source maps on sentry with this

sentry-cli releases --org soplaya -p restaurant-mobile files '${name}@${version}+${env}' upload-sourcemaps ./build --dist ${version}

name, version and env matches what we have specified in sentry.ts

Why does this happen? Can we please have some sentry support to look into this issue?

Status of the plugin development?

First of all, thank you for the work you are doing in order to get a Capacitor's version of Sentry. While Cordova's version works for majority of Sentry features, there are few things the plugin just can't do.

I would like to ask you what is the current status on the repo. There hasn't been any development since February. The plugin is stuck in Android Alpha.

Can you please explain if there is some problem or what is stopping you from further development?

Thank you one more time, I understand that sometimes you must prioritise other work but I am certain there are many developers eagerly waiting for this plugin to became reality.

Native Errors: beforeSend callback not executed before sending event to server

Overview

Native IOS errors (ie OutOfMemory) are not going thru the beforeSend callback event before being sent to the server.

Would like to use the beforeSend callback to filter out native errors and not log them to Sentry in development mode.

Have been able to get around this by setting 'enableNative' equal to false. Is there some equivalent to beforeSend for native errors that may be used? (maybe this is a feature request vs bug???)

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Sentry Capacitor - 0.4.2

Expected Result

Expected native errors to flow thru the beforeSend callback before being sent to Sentry.

Cannot resolve symbol 'io'

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Capacitor 0.3.0
Angular 6.8.0

Steps to Reproduce

  1. npm install --save @sentry/capacitor @sentry/angular
  2. npx cap sync android
  3. Add android specific plugin declaration to MainActivity.java

Expected Result

Android Studio would recognize the library being imported, the app would run and I would be able to report errors to Sentry.

Actual Result

Android Studio doesn't recognize the library io.sentry.capacitor.SentryCapacitor

image

MainActivity modification prevents Capacitor plugins from working on Android

Environment

I'm using the Capacitor JS implementation (latest)

Steps to Reproduce

  1. I installed @sentry/capacitor into my project which contains Capacitor v3
  2. I updated MainActivity.java from:
package com.stsonline.beacon;

import com.getcapacitor.BridgeActivity;

public class MainActivity extends BridgeActivity {}

to...

package com.stsonline.beacon;

import android.os.Bundle;
import com.getcapacitor.BridgeActivity;
import com.getcapacitor.Plugin;
import io.sentry.capacitor.SentryCapacitor;
import java.util.ArrayList;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      add(SentryCapacitor.class);
    }});
  }
}
  1. I run npx cap sync android and open my project in Android studio, there's no errors, and deploy to emulator and physical phone.

Expected Result

Capacitor plugins should be loaded into my Android project, these are the plugins installed:

"@capacitor/camera": "1.0.4",
"@capacitor/push-notifications": "1.0.3",
"@capacitor/splash-screen": "1.1.1",
"@capacitor/storage": "1.0.3",

Actual Result

Capacitor plugins are failing to work with the above BridgeActivity modification, by reverting back to the original BridgeActivity it works just fine, what is this actually doing and is it needed for Android?

Special characters in breadcrumb contents cause events to never be sent

Overview

Special characters in breadcrumb contents cause events to never be sent to Sentry. These characters include © and ü and may include additional characters.

This occurs on hybrid iOS and hybrid Android which use the native SDKs to process and send the event. It is not an issue on Web wherein it works fine (it also works fine using @sentry/browser directly).

A repro can be found here. It uses the copyright character for the "Bad Breadcrumb" case.

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Sentry Capacitor - 0.4.2

Steps to Reproduce

See Steps to Reproduce.

Expected Result

The event--even if it includes special characters in a breadcrumb--is successfully sent to Sentry.

Actual Result

The event was not successfully sent to Sentry.

Native Logs when Error Occurs

I've captured native logs while the Sentry Capacitor SDK had debug: true.

For iOS, the log came from the Xcode Console panel.

For Android, the log came from the Android Studio Logcat panel.

Some contents of the logs are very likely not from Sentry Capacitor but ended up being included in the log capture and can likely be ignored.

The URL of the application in the logs was using my IP address so I redacted the digits of my IP with 0s (for example, 000.000.0.000).

iOS - After selecting Trigger Error with Good Breadcrumb

⚡️  To Native ->  SentryCapacitor addBreadcrumb 52677115
⚡️  To Native ->  SentryCapacitor addBreadcrumb 52677116
2022-02-15 11:09:37.247513-0600 App[17673:1183873] Sentry - debug:: Add breadcrumb: <SentryBreadcrumb: 0x600001018180>
⚡️  TO JS undefined
2022-02-15 11:09:37.248017-0600 App[17673:1183873] Sentry - debug:: Add breadcrumb: <SentryBreadcrumb: 0x60000106c280>
⚡️  TO JS undefined
⚡️  To Native ->  SentryCapacitor addBreadcrumb 52677117
2022-02-15 11:09:37.248579-0600 App[17673:1184156] Sentry - debug:: Add breadcrumb: <SentryBreadcrumb: 0x600001018440>
⚡️  TO JS undefined
⚡️  To Native ->  SentryCapacitor captureEnvelope 52677118
2022-02-15 11:09:37.253687-0600 App[17673:1184154] Sentry - debug:: Header {"event_id":"80bceeb933864d55903ef686e2c9f3f2","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"}}
2022-02-15 11:09:37.253962-0600 App[17673:1184154] Sentry - debug:: Item Header {"content_type":"application/json","length":2532,"type":"event"}
2022-02-15 11:09:37.254141-0600 App[17673:1184154] Sentry - debug:: Event {"exception":{"values":[{"type":"Error","value":"This error should include a good breadcrumb","stacktrace":{"frames":[{"colno":35,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":24,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":45,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4828},{"colno":61,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4517},{"colno":35,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"onInvokeTask","in_app":true,"lineno":114471},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"sentryWrapped","in_app":true,"lineno":17452},{"colno":46,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"?","in_app":true,"lineno":128678},{"colno":50,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":49,"filename":"app:///http://000.000.0.000:8100/src_app_home_home_module_ts.js","function":"triggerErrorWithGoodBreadcrumb","in_app":true,"lineno":116}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"80bceeb933864d55903ef686e2c9f3f2","platform":"javascript","timestamp":1644944977.247,"environment":"production","release":"22.0.1","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"},"breadcrumbs":[{"timestamp":1644944977.246,"category":"xhr","data":{"requestBody":"{ \"foo\": \"bar\" }","requestMethod":"GET","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url"}}],"sdkProcessingMetadata":{},"request":{"url":"http://000.000.0.000:8100/home","headers":{"Referer":"http://000.000.0.000:8100/home","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},"tags":{"event.origin":"javascript","event.environment":"javascript"},"message":{}}
⚡️  TO JS undefined
2022-02-15 11:09:37.256825-0600 App[17673:1184156] Sentry - debug:: Writing to file: /Users/kelchen/Library/Developer/CoreSimulator/Devices/A4974647-39DE-426D-A021-3A2E3CDE0191/data/Containers/Data/Application/7FD13E8F-D11F-4629-9609-B1F187E2BD5B/Library/Caches/io.sentry/c4e22a0c63854301610b427b4fb149ddd4437370/envelopes/1644944977.256760-00003-76E27D21-586F-4CEA-9AAE-6070A99FF974.json
2022-02-15 11:09:37.259636-0600 App[17673:1184156] Sentry - debug:: Header {"event_id":"80bceeb933864d55903ef686e2c9f3f2","sdk":{"name":"sentry.javascript.capacitor","version":"0.4.2"}}
2022-02-15 11:09:37.259798-0600 App[17673:1184156] Sentry - debug:: Item Header {"type":"event","length":2532}
2022-02-15 11:09:37.259944-0600 App[17673:1184156] Sentry - debug:: Event {"exception":{"values":[{"type":"Error","value":"This error should include a good breadcrumb","stacktrace":{"frames":[{"colno":35,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":24,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":45,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4828},{"colno":61,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4517},{"colno":35,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"onInvokeTask","in_app":true,"lineno":114471},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"sentryWrapped","in_app":true,"lineno":17452},{"colno":46,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"?","in_app":true,"lineno":128678},{"colno":50,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":49,"filename":"app:///http://000.000.0.000:8100/src_app_home_home_module_ts.js","function":"triggerErrorWithGoodBreadcrumb","in_app":true,"lineno":116}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"80bceeb933864d55903ef686e2c9f3f2","platform":"javascript","timestamp":1644944977.247,"environment":"production","release":"22.0.1","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"},"breadcrumbs":[{"timestamp":1644944977.246,"category":"xhr","data":{"requestBody":"{ \"foo\": \"bar\" }","requestMethod":"GET","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url"}}],"sdkProcessingMetadata":{},"request":{"url":"http://000.000.0.000:8100/home","headers":{"Referer":"http://000.000.0.000:8100/home","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},"tags":{"event.origin":"javascript","event.environment":"javascript"},"message":{}}
2022-02-15 11:09:37.260823-0600 App[17673:1184156] Sentry - debug:: Envelope request with data: {"event_id":"80bceeb933864d55903ef686e2c9f3f2","sdk":{"name":"sentry.javascript.capacitor","version":"0.4.2"}}
{"type":"event","length":2532}
{"exception":{"values":[{"type":"Error","value":"This error should include a good breadcrumb","stacktrace":{"frames":[{"colno":35,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":24,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":45,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4828},{"colno":61,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4517},{"colno":35,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"onInvokeTask","in_app":true,"lineno":114471},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"sentryWrapped","in_app":true,"lineno":17452},{"colno":46,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"?","in_app":true,"lineno":128678},{"colno":50,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":49,"filename":"app:///http://000.000.0.000:8100/src_app_home_home_module_ts.js","function":"triggerErrorWithGoodBreadcrumb","in_app":true,"lineno":116}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"80bceeb933864d55903ef686e2c9f3f2","platform":"javascript","timestamp":1644944977.247,"environment":"production","release":"22.0.1","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"},"breadcrumbs":[{"timestamp":1644944977.246,"category":"xhr","data":{"requestBody":"{ \"foo\": \"bar\" }","requestMethod":"GET","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url"}}],"sdkProcessingMetadata":{},"request":{"url":"http://000.000.0.000:8100/home","headers":{"Referer":"http://000.000.0.000:8100/home","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},"tags":{"event.origin":"javascript","event.environment":"javascript"},"message":{}}
2022-02-15 11:09:37.318446-0600 App[17673:1184154] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2022-02-15 11:09:37.341373-0600 App[17673:1184156] Sentry - debug:: Request status: 200
2022-02-15 11:09:37.341529-0600 App[17673:1184156] Sentry - debug:: Request response: {"id":"80bceeb933864d55903ef686e2c9f3f2"}
2022-02-15 11:09:37.341654-0600 App[17673:1184156] Sentry - debug:: Queued requests: 0

iOS - After selecting Trigger Error with Bad Breadcrumb

⚡️  To Native ->  SentryCapacitor addBreadcrumb 52677111
⚡️  To Native ->  SentryCapacitor addBreadcrumb 52677112
2022-02-15 11:08:14.705946-0600 App[17673:1182750] Sentry - debug:: Add breadcrumb: <SentryBreadcrumb: 0x6000010dd400>
⚡️  TO JS undefined
2022-02-15 11:08:14.706385-0600 App[17673:1182750] Sentry - debug:: Add breadcrumb: <SentryBreadcrumb: 0x600001068080>
⚡️  TO JS undefined
⚡️  To Native ->  SentryCapacitor addBreadcrumb 52677113
⚡️  To Native ->  SentryCapacitor captureEnvelope 52677114
2022-02-15 11:08:14.715152-0600 App[17673:1182750] Sentry - debug:: Add breadcrumb: <SentryBreadcrumb: 0x6000010dd640>
⚡️  TO JS undefined
2022-02-15 11:08:14.715471-0600 App[17673:1182750] Sentry - debug:: Header {"event_id":"1f1096fa10274cefbffe293d8bb1620c","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"}}
2022-02-15 11:08:14.715639-0600 App[17673:1182750] Sentry - debug:: Item Header {"content_type":"application/json","length":2532,"type":"event"}
2022-02-15 11:08:14.715825-0600 App[17673:1182750] Sentry - debug:: Event {"exception":{"values":[{"type":"Error","value":"This error should include a bad breadcrumb","stacktrace":{"frames":[{"colno":35,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":24,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":45,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4828},{"colno":61,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4517},{"colno":35,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"onInvokeTask","in_app":true,"lineno":114471},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"sentryWrapped","in_app":true,"lineno":17452},{"colno":46,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"?","in_app":true,"lineno":128678},{"colno":50,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":49,"filename":"app:///http://000.000.0.000:8100/src_app_home_home_module_ts.js","function":"triggerErrorWithBadBreadcrumb","in_app":true,"lineno":127}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"1f1096fa10274cefbffe293d8bb1620c","platform":"javascript","timestamp":1644944894.706,"environment":"production","release":"22.0.1","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"},"breadcrumbs":[{"timestamp":1644944894.705,"category":"xhr","data":{"requestBody":"{ \"foo\": \"© bar\" }","requestMethod":"GET","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url"}}],"sdkProcessingMetadata":{},"request":{"url":"http://000.000.0.000:8100/home","headers":{"Referer":"http://000.000.0.000:8100/home","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},"tags":{"event.origin":"javascript","event.environment":"javascript"},"message":{}
2022-02-15 11:08:14.716798-0600 App[17673:1182750] Sentry - error:: Failed to retrieve event level from envelope item data: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected end of file around line 1, column 2532." UserInfo={NSDebugDescription=Unexpected end of file around line 1, column 2532., NSJSONSerializationErrorIndex=2532}
⚡️  TO JS undefined
2022-02-15 11:08:14.717128-0600 App[17673:1182430] Sentry - debug:: Writing to file: /Users/kelchen/Library/Developer/CoreSimulator/Devices/A4974647-39DE-426D-A021-3A2E3CDE0191/data/Containers/Data/Application/7FD13E8F-D11F-4629-9609-B1F187E2BD5B/Library/Caches/io.sentry/c4e22a0c63854301610b427b4fb149ddd4437370/envelopes/1644944894.717070-00002-57497DAF-8FF0-4556-AD07-9E7F3BC1F8F5.json
2022-02-15 11:08:14.720023-0600 App[17673:1182430] Sentry - debug:: Header {"event_id":"1f1096fa10274cefbffe293d8bb1620c","sdk":{"name":"sentry.javascript.capacitor","version":"0.4.2"}}
2022-02-15 11:08:14.720193-0600 App[17673:1182430] Sentry - debug:: Item Header {"type":"event","length":2532}
2022-02-15 11:08:14.720362-0600 App[17673:1182430] Sentry - debug:: Event {"exception":{"values":[{"type":"Error","value":"This error should include a bad breadcrumb","stacktrace":{"frames":[{"colno":35,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":24,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":45,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4828},{"colno":61,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4517},{"colno":35,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"onInvokeTask","in_app":true,"lineno":114471},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"sentryWrapped","in_app":true,"lineno":17452},{"colno":46,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"?","in_app":true,"lineno":128678},{"colno":50,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":49,"filename":"app:///http://000.000.0.000:8100/src_app_home_home_module_ts.js","function":"triggerErrorWithBadBreadcrumb","in_app":true,"lineno":127}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"1f1096fa10274cefbffe293d8bb1620c","platform":"javascript","timestamp":1644944894.706,"environment":"production","release":"22.0.1","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"},"breadcrumbs":[{"timestamp":1644944894.705,"category":"xhr","data":{"requestBody":"{ \"foo\": \"© bar\" }","requestMethod":"GET","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url"}}],"sdkProcessingMetadata":{},"request":{"url":"http://000.000.0.000:8100/home","headers":{"Referer":"http://000.000.0.000:8100/home","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},"tags":{"event.origin":"javascript","event.environment":"javascript"},"message":{}
2022-02-15 11:08:14.721360-0600 App[17673:1182430] Sentry - debug:: Envelope request with data: {"event_id":"1f1096fa10274cefbffe293d8bb1620c","sdk":{"name":"sentry.javascript.capacitor","version":"0.4.2"}}
{"type":"event","length":2532}
{"exception":{"values":[{"type":"Error","value":"This error should include a bad breadcrumb","stacktrace":{"frames":[{"colno":35,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":24,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":45,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4828},{"colno":61,"filename":"app:///http://000.000.0.000:8100/polyfills.js","function":"?","in_app":true,"lineno":4517},{"colno":35,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"onInvokeTask","in_app":true,"lineno":114471},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"sentryWrapped","in_app":true,"lineno":17452},{"colno":46,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"?","in_app":true,"lineno":128678},{"colno":50,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":22,"filename":"app:///http://000.000.0.000:8100/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":49,"filename":"app:///http://000.000.0.000:8100/src_app_home_home_module_ts.js","function":"triggerErrorWithBadBreadcrumb","in_app":true,"lineno":127}]},"mechanism":{"type":"generic","handled":true}}]},"level":"error","event_id":"1f1096fa10274cefbffe293d8bb1620c","platform":"javascript","timestamp":1644944894.706,"environment":"production","release":"22.0.1","sdk":{"integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","UserAgent","RewriteFrames","SdkInfo","EventOrigin"],"name":"sentry.javascript.capacitor","packages":[{"version":"7.1.4","name":"sentry.cocoa"},{"name":"npm:@sentry/capacitor","version":"0.4.2"}],"version":"0.4.2"},"breadcrumbs":[{"timestamp":1644944894.705,"category":"xhr","data":{"requestBody":"{ \"foo\": \"© bar\" }","requestMethod":"GET","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url"}}],"sdkProcessingMetadata":{},"request":{"url":"http://000.000.0.000:8100/home","headers":{"Referer":"http://000.000.0.000:8100/home","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},"tags":{"event.origin":"javascript","event.environment":"javascript"},"message":{}
2022-02-15 11:08:14.745700-0600 App[17673:1182430] Sentry - debug:: Request status: 200
2022-02-15 11:08:14.745906-0600 App[17673:1182430] Sentry - debug:: Request response: {"id":"1f1096fa10274cefbffe293d8bb1620c"}
2022-02-15 11:08:14.746045-0600 App[17673:1182430] Sentry - debug:: Queued requests: 0

In the iOS logs if you search for "message":{}, you'll see in the Good Breadcrumb case you'll find "message":{}} at the end of the Event. However, in the Bad Breadcrumb case you'll find the closing } is missing. You'll also see this message in the Bad Breadcrumb case:
Sentry - error:: Failed to retrieve event level from envelope item data: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected end of file around line 1, column 2532." UserInfo={NSDebugDescription=Unexpected end of file around line 1, column 2532., NSJSONSerializationErrorIndex=2532}

Android - After selecting Trigger Error with Good Breadcrumb

2022-02-15 11:30:35.545 0-0/? I/logd: logdr: UID=2000 GID=2000 PID=26374 b tail=0 logMask=99 pid=0 start=0ns deadline=0ns
2022-02-15 11:30:35.931 0-0/? I/init: starting service 'console'...
2022-02-15 11:30:35.945 0-0/? I/init: Service 'console' (pid 26377) exited with status 0
2022-02-15 11:30:35.946 0-0/? I/init: Sending signal 9 to service 'console' (pid 26377) process group...
2022-02-15 11:30:35.949 0-0/? I/libprocessgroup: Successfully killed process cgroup uid 2000 pid 26377 in 0ms
2022-02-15 11:30:36.973 463-463/? W/adbd: timeout expired while flushing socket, closing
2022-02-15 11:30:37.928 1842-1842/com.google.android.apps.nexuslauncher D/TaplEvents: TIS / TouchInteractionService.onInputEvent: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=481.95923, y[0]=1067.915, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=64959444, downTime=64959444, deviceId=11, source=0x5002, displayId=0, eventId=543751373 }
2022-02-15 11:30:37.999 1842-1842/com.google.android.apps.nexuslauncher D/TaplEvents: TIS / TouchInteractionService.onInputEvent: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=483.96973, y[0]=1067.915, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=64959522, downTime=64959444, deviceId=11, source=0x5002, displayId=0, eventId=980068080 }
2022-02-15 11:30:38.017 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812165, pluginId: SentryCapacitor, methodName: addBreadcrumb
2022-02-15 11:30:38.017 25850-25995/io.ionic.starter V/Capacitor: callback: 104812165, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.644946238014E9,"category":"ui.click","message":"ion-button.md.button.button-solid.ion-activatable.ion-focusable.hydrated.ion-activated"}
2022-02-15 11:30:38.022 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812166, pluginId: SentryCapacitor, methodName: addBreadcrumb
2022-02-15 11:30:38.022 25850-25995/io.ionic.starter V/Capacitor: callback: 104812166, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.64494623802E9,"category":"xhr","data":{"requestBody":"{ \"foo\": \"bar\" }","requestMethod":"GET","requestURL":"https:\/\/github.com\/KevinKelchen\/my-fake-request-breadcrumb-url"}}
2022-02-15 11:30:38.079 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812167, pluginId: SentryCapacitor, methodName: addBreadcrumb
2022-02-15 11:30:38.079 25850-25995/io.ionic.starter V/Capacitor: callback: 104812167, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.644946238078E9,"category":"sentry.event","event_id":"2708355d05154d01a6c884486cd81bed","level":"error","message":"Error: This error should include a good breadcrumb"}
2022-02-15 11:30:38.082 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812168, pluginId: SentryCapacitor, methodName: getStringBytesLength
2022-02-15 11:30:38.083 25850-25995/io.ionic.starter V/Capacitor: callback: 104812168, pluginId: SentryCapacitor, methodName: getStringBytesLength, methodData: {"string":"{\"exception\":{\"values\":[{\"type\":\"Error\",\"value\":\"This error should include a good breadcrumb\",\"stacktrace\":{\"frames\":[{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"HTMLElement.globalZoneAwareCallback\",\"in_app\":true,\"lineno\":6005},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"invokeTask\",\"in_app\":true,\"lineno\":5968},{\"colno\":38,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneTask.invokeTask [as invoke]\",\"in_app\":true,\"lineno\":4828},{\"colno\":51,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"Zone.runTask\",\"in_app\":true,\"lineno\":4517},{\"colno\":64,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4745},{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"Object.onInvokeTask\",\"in_app\":true,\"lineno\":114471},{\"colno\":35,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4746},{\"colno\":17,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.sentryWrapped\",\"in_app\":true,\"lineno\":17452},{\"colno\":34,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.<anonymous>\",\"in_app\":true,\"lineno\":128678},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"wrapListenerIn_markDirtyAndPreventDefault\",\"in_app\":true,\"lineno\":102506},{\"colno\":12,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"executeListenerWithErrorHandling\",\"in_app\":true,\"lineno\":102462},{\"colno\":22,\"filename\":\"app:\/\/\/HomePage.js\",\"function\":\"HomePage_Template_ion_button_click_10_listener\",\"in_app\":true,\"lineno\":26},{\"colno\":40,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/src_app_home_home_module_ts.js\",\"function\":\"HomePage.triggerErrorWithGoodBreadcrumb\",\"in_app\":true,\"lineno\":116}]},\"mechanism\":{\"type\":\"generic\",\"handled\":true}}]},\"level\":\"error\",\"event_id\":\"2708355d05154d01a6c884486cd81bed\",\"platform\":\"javascript\",\"timestamp\":1644946238.072,\"environment\":\"production\",\"release\":\"22.0.1\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.2\"}],\"version\":\"0.4.2\"},\"breadcrumbs\":[{\"timestamp\":1644946238.02,\"category\":\"xhr\",\"data\":{\"requestBody\":\"{ \\\"foo\\\": \\\"bar\\\" }\",\"requestMethod\":\"GET\",\"requestURL\":\"https:\/\/github.com\/KevinKelchen\/my-fake-request-breadcrumb-url\"}}],\"sdkProcessingMetadata\":{},\"request\":{\"url\":\"http:\/\/000.000.0.000:8101\/home\",\"headers\":{\"User-Agent\":\"Mozilla\/5.0 (Linux; Android 12; sdk_gphone64_x86_64 Build\/S2B2.211203.006; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/91.0.4472.114 Mobile Safari\/537.36\"}},\"tags\":{\"event.origin\":\"javascript\",\"event.environment\":\"javascript\"},\"message\":{}}"}
2022-02-15 11:30:38.086 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812169, pluginId: SentryCapacitor, methodName: captureEnvelope
2022-02-15 11:30:38.086 25850-25995/io.ionic.starter V/Capacitor: callback: 104812169, pluginId: SentryCapacitor, methodName: captureEnvelope, methodData: {"envelope":"{\"event_id\":\"2708355d05154d01a6c884486cd81bed\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.2\"}],\"version\":\"0.4.2\"}}\n{\"content_type\":\"application\/json\",\"length\":3016,\"type\":\"event\"}\n{\"exception\":{\"values\":[{\"type\":\"Error\",\"value\":\"This error should include a good breadcrumb\",\"stacktrace\":{\"frames\":[{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"HTMLElement.globalZoneAwareCallback\",\"in_app\":true,\"lineno\":6005},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"invokeTask\",\"in_app\":true,\"lineno\":5968},{\"colno\":38,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneTask.invokeTask [as invoke]\",\"in_app\":true,\"lineno\":4828},{\"colno\":51,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"Zone.runTask\",\"in_app\":true,\"lineno\":4517},{\"colno\":64,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4745},{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"Object.onInvokeTask\",\"in_app\":true,\"lineno\":114471},{\"colno\":35,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4746},{\"colno\":17,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.sentryWrapped\",\"in_app\":true,\"lineno\":17452},{\"colno\":34,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.<anonymous>\",\"in_app\":true,\"lineno\":128678},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"wrapListenerIn_markDirtyAndPreventDefault\",\"in_app\":true,\"lineno\":102506},{\"colno\":12,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"executeListenerWithErrorHandling\",\"in_app\":true,\"lineno\":102462},{\"colno\":22,\"filename\":\"app:\/\/\/HomePage.js\",\"function\":\"HomePage_Template_ion_button_click_10_listener\",\"in_app\":true,\"lineno\":26},{\"colno\":40,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/src_app_home_home_module_ts.js\",\"function\":\"HomePage.triggerErrorWithGoodBreadcrumb\",\"in_app\":true,\"lineno\":116}]},\"mechanism\":{\"type\":\"generic\",\"handled\":true}}]},\"level\":\"error\",\"event_id\":\"2708355d05154d01a6c884486cd81bed\",\"platform\":\"javascript\",\"timestamp\":1644946238.072,\"environment\":\"production\",\"release\":\"22.0.1\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.2\"}],\"version\":\"0.4.2\"},\"breadcrumbs\":[{\"timestamp\":1644946238.02,\"category\":\"xhr\",\"data\":{\"requestBody\":\"{ \\\"foo\\\": \\\"bar\\\" }\",\"requestMethod\":\"GET\",\"requestURL\":\"https:\/\/github.com\/KevinKelchen\/my-fake-request-breadcrumb-url\"}}],\"sdkProcessingMetadata\":{},\"request\":{\"url\":\"http:\/\/000.000.0.000:8101\/home\",\"headers\":{\"User-Agent\":\"Mozilla\/5.0 (Linux; Android 12; sdk_gphone64_x86_64 Build\/S2B2.211203.006; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/91.0.4472.114 Mobile Safari\/537.36\"}},\"tags\":{\"event.origin\":\"javascript\",\"event.environment\":\"javascript\"},\"message\":{}}"}
2022-02-15 11:30:38.089 25850-25969/io.ionic.starter I/capacitor-sentry: Successfully captured envelope.
2022-02-15 11:30:38.090 25850-26002/io.ionic.starter D/Sentry: onEvent fired for EnvelopeFileObserver with event type 8 on path: /data/user/0/io.ionic.starter/cache/sentry/outbox for file fae86673-407f-4b65-82fc-96e541d4e34e.
2022-02-15 11:30:38.092 25850-26002/io.ionic.starter D/Sentry: Processing Envelope with 1 item(s)
2022-02-15 11:30:38.098 25850-25850/io.ionic.starter I/Capacitor/Console: File: http://000.000.0.000:8101/ - Line 204 - Msg: undefined
2022-02-15 11:30:38.103 25850-26002/io.ionic.starter D/Sentry: Error when deserializing UTC timestamp format, it might be millis timestamp format.
    java.lang.IllegalArgumentException: timestamp is not ISO format 1644946238.072
        at io.sentry.DateUtils.getDateTime(DateUtils.java:75)
        at io.sentry.adapters.DateDeserializerAdapter.deserialize(DateDeserializerAdapter.java:32)
        at io.sentry.adapters.DateDeserializerAdapter.deserialize(DateDeserializerAdapter.java:16)
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
        at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:285)
        at io.sentry.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.read(UnknownPropertiesTypeAdapterFactory.java:128)
        at io.sentry.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.read(UnknownPropertiesTypeAdapterFactory.java:58)
        at com.google.gson.Gson.fromJson(Gson.java:927)
        at com.google.gson.Gson.fromJson(Gson.java:865)
        at io.sentry.GsonSerializer.deserialize(GsonSerializer.java:116)
        at io.sentry.OutboxSender.processEnvelope(OutboxSender.java:125)
        at io.sentry.OutboxSender.processFile(OutboxSender.java:70)
        at io.sentry.OutboxSender.processEnvelopeFile(OutboxSender.java:103)
        at io.sentry.android.core.EnvelopeFileObserver.onEvent(EnvelopeFileObserver.java:59)
        at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:166)
        at android.os.FileObserver$ObserverThread.observe(Native Method)
        at android.os.FileObserver$ObserverThread.run(FileObserver.java:116)
2022-02-15 11:30:38.107 25850-25850/io.ionic.starter I/Capacitor/Console: File: http://000.000.0.000:8101/ - Line 204 - Msg: undefined
2022-02-15 11:30:38.109 25850-25850/io.ionic.starter I/Capacitor/Console: File: http://000.000.0.000:8101/ - Line 204 - Msg: undefined
2022-02-15 11:30:38.115 25850-26002/io.ionic.starter D/Sentry: Error when deserializing UTC timestamp format, it might be millis timestamp format.
    java.lang.IllegalArgumentException: timestamp is not ISO format 1644946238.02
        at io.sentry.DateUtils.getDateTime(DateUtils.java:75)
        at io.sentry.adapters.DateDeserializerAdapter.deserialize(DateDeserializerAdapter.java:32)
        at io.sentry.adapters.DateDeserializerAdapter.deserialize(DateDeserializerAdapter.java:16)
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
        at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:285)
        at io.sentry.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.read(UnknownPropertiesTypeAdapterFactory.java:128)
        at io.sentry.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.read(UnknownPropertiesTypeAdapterFactory.java:58)
        at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
        at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
        at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:63)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
        at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:285)
        at io.sentry.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.read(UnknownPropertiesTypeAdapterFactory.java:128)
        at io.sentry.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.read(UnknownPropertiesTypeAdapterFactory.java:58)
        at com.google.gson.Gson.fromJson(Gson.java:927)
        at com.google.gson.Gson.fromJson(Gson.java:865)
        at io.sentry.GsonSerializer.deserialize(GsonSerializer.java:116)
        at io.sentry.OutboxSender.processEnvelope(OutboxSender.java:125)
        at io.sentry.OutboxSender.processFile(OutboxSender.java:70)
        at io.sentry.OutboxSender.processEnvelopeFile(OutboxSender.java:103)
        at io.sentry.android.core.EnvelopeFileObserver.onEvent(EnvelopeFileObserver.java:59)
        at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:166)
        at android.os.FileObserver$ObserverThread.observe(Native Method)
        at android.os.FileObserver$ObserverThread.run(FileObserver.java:116)
2022-02-15 11:30:38.124 25850-26002/io.ionic.starter D/Sentry: Capturing event: 2708355d05154d01a6c884486cd81bed
2022-02-15 11:30:38.149 25850-25893/io.ionic.starter D/EGL_emulation: app_time_stats: avg=2206.75ms min=3.77ms max=70437.57ms count=32
2022-02-15 11:30:38.165 25850-26002/io.ionic.starter D/Sentry: Captured Envelope is already cached
2022-02-15 11:30:38.171 25850-26002/io.ionic.starter D/Sentry: Item 1 is being captured.
2022-02-15 11:30:38.180 372-26381/? D/resolv: GetAddrInfoHandler::run: {101 101 101 983141 10148 0}
2022-02-15 11:30:38.181 372-26381/? D/resolv: resolv_getaddrinfo: explore_fqdn(): ai_family=0 ai_socktype=1 ai_protocol=6
2022-02-15 11:30:38.183 372-26382/? D/resolv: doQuery: (1, 28)
2022-02-15 11:30:38.184 372-26382/? D/resolv: res_nmkquery: (QUERY, IN, AAAA)
2022-02-15 11:30:38.185 372-26382/? D/resolv: res_nsend
2022-02-15 11:30:38.185 372-26383/? D/resolv: doQuery: (1, 1)
2022-02-15 11:30:38.186 372-26382/? I/resolv: resolv_cache_lookup: lookup
2022-02-15 11:30:38.186 372-26382/? I/resolv: resolv_cache_lookup: FOUND IN CACHE entry=0x76657e290910
2022-02-15 11:30:38.187 372-26383/? D/resolv: res_nmkquery: (QUERY, IN, A)
2022-02-15 11:30:38.187 372-26382/? D/resolv: doQuery: rcode=0, ancount=0
2022-02-15 11:30:38.188 372-26383/? D/resolv: res_nsend
2022-02-15 11:30:38.189 372-26383/? I/resolv: resolv_cache_lookup: lookup
2022-02-15 11:30:38.189 372-26383/? I/resolv: resolv_cache_lookup: FOUND IN CACHE entry=0x76654e289a00
2022-02-15 11:30:38.190 372-26383/? D/resolv: doQuery: rcode=0, ancount=1
2022-02-15 11:30:38.307 25850-26005/io.ionic.starter D/Sentry: Serializing object: {"exception":{"values":[{"mechanism":{"handled":true,"type":"generic"},"stacktrace":{"frames":[{"colno":25,"filename":"app:///http://000.000.0.000:8101/polyfills.js","function":"HTMLElement.globalZoneAwareCallback","in_app":true,"lineno":6005},{"colno":18,"filename":"app:///http://000.000.0.000:8101/polyfills.js","function":"invokeTask","in_app":true,"lineno":5968},{"colno":38,"filename":"app:///http://000.000.0.000:8101/polyfills.js","function":"ZoneTask.invokeTask [as invoke]","in_app":true,"lineno":4828},{"colno":51,"filename":"app:///http://000.000.0.000:8101/polyfills.js","function":"Zone.runTask","in_app":true,"lineno":4517},{"colno":64,"filename":"app:///http://000.000.0.000:8101/polyfills.js","function":"ZoneDelegate.invokeTask","in_app":true,"lineno":4745},{"colno":25,"filename":"app:///http://000.000.0.000:8101/vendor.js","function":"Object.onInvokeTask","in_app":true,"lineno":114471},{"colno":35,"filename":"app:///http://000.000.0.000:8101/polyfills.js","function":"ZoneDelegate.invokeTask","in_app":true,"lineno":4746},{"colno":17,"filename":"app:///http://000.000.0.000:8101/vendor.js","function":"HTMLElement.sentryWrapped","in_app":true,"lineno":17452},{"colno":34,"filename":"app:///http://000.000.0.000:8101/vendor.js","function":"HTMLElement.<anonymous>","in_app":true,"lineno":128678},{"colno":18,"filename":"app:///http://000.000.0.000:8101/vendor.js","function":"wrapListenerIn_markDirtyAndPreventDefault","in_app":true,"lineno":102506},{"colno":12,"filename":"app:///http://000.000.0.000:8101/vendor.js","function":"executeListenerWithErrorHandling","in_app":true,"lineno":102462},{"colno":22,"filename":"app:///HomePage.js","function":"HomePage_Template_ion_button_click_10_listener","in_app":true,"lineno":26},{"colno":40,"filename":"app:///http://000.000.0.000:8101/src_app_home_home_module_ts.js","function":"HomePage.triggerErrorWithGoodBreadcrumb","in_app":true,"lineno":116}]},"type":"Error","value":"This error should include a good breadcrumb"}]},"level":"error","message":{},"timestamp":"2022-02-15T17:30:38.072Z","unknown":{"sdkProcessingMetadata":{}},"breadcrumbs":[{"category":"app.lifecycle","data":{"state":"start"},"level":"info","timestamp":"2022-02-15T17:11:18.990Z","type":"session"},{"category":"app.lifecycle","data":{"state":"foreground"},"level":"info","timestamp":"2022-02-15T17:11:19.007Z","type":"navigation"},{"category":"console","data":{"logger":"console","arguments":"[\"Angular is running in development mode. Call enableProdMode() to enable production mode.\"]"},"level":"debug","message":"Angular is running in development mode. Call enableProdMode() to enable production mode.","timestamp":"2022-02-15T17:11:19.039Z"},{"category":"console","data":{"logger":"console","arguments":"[\"[webpack-dev-server] Live Reloading enabled.\"]"},"level":"info","message":"[webpack-dev-server] Live Reloading enabled.","timestamp":"2022-02-15T17:11:19.040Z"},{"category":"navigation","data":{"from":"/","to":"/home"},"timestamp":"2022-02-15T17:11:19.221Z"},{"category":"ui.click","message":"ion-button.md.button.button-solid.ion-activatable.ion-focusable.hydrated.ion-activated","timestamp":"2022-02-15T17:18:26.458Z"},{"category":"xhr","data":{"requestBody":"{ \"foo\": \"© bar\" }","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url","requestMethod":"GET"},"timestamp":"2022-02-15T17:18:26.467Z"},{"category":"sentry.event","level":"error","message":"Error: This error should include a bad breadcrumb","timestamp":"2022-02-15T17:18:26.502Z"},{"category":"ui.click","message":"ion-button.md.button.button-solid.ion-activatable.ion-focusable.hydrated.ion-activated","timestamp":"2022-02-15T17:19:06.451Z"},{"category":"xhr","data":{"requestBody":"{ \"foo\": \"© bar\" }","requestURL":"https://github.com/KevinKelchen/my-fake-request-breadcrumb-url","requestMethod":"GET"},"timestamp":"2022-02-15T17:19:06.454Z"},{"category":"sentry.event","level":"error","message":"Error: This error should include a bad breadcrumb","timestamp":"2022-02-15T17:19:06.513Z"
2022-02-15 11:30:38.335 25850-26005/io.ionic.starter D/Sentry: Serializing object: {"sid":"a98c0e15-f0d3-46e4-960b-20ba9a8efa41","did":"f01e398b-9aa2-4f6b-9da2-ede8fad58e39","started":"2022-02-15T17:11:18.995Z","status":"ok","seq":1644946238164,"errors":2,"timestamp":"2022-02-15T17:30:38.164Z","attrs":{"release":"22.0.1"}}
2022-02-15 11:30:38.379 25850-26005/io.ionic.starter D/Sentry: Envelope sent successfully.
2022-02-15 11:30:38.383 25850-26005/io.ionic.starter D/Sentry: Envelope flushed
2022-02-15 11:30:38.384 25850-26005/io.ionic.starter D/Sentry: Marking envelope submission result: true
2022-02-15 11:30:38.386 25850-26002/io.ionic.starter D/Sentry: File '/data/user/0/io.ionic.starter/cache/sentry/outbox/fae86673-407f-4b65-82fc-96e541d4e34e' is done.
2022-02-15 11:30:38.415 25850-25862/io.ionic.starter W/o.ionic.starte: Reducing the number of considered missed Gc histogram windows from 116 to 100

Android - After selecting Trigger Error with Bad Breadcrumb

2022-02-15 11:29:23.719 0-0/? I/logd: logdr: UID=2000 GID=2000 PID=26322 b tail=0 logMask=99 pid=0 start=0ns deadline=0ns
2022-02-15 11:29:24.748 463-463/? W/adbd: timeout expired while flushing socket, closing
2022-02-15 11:29:25.788 0-0/? I/init: starting service 'console'...
2022-02-15 11:29:25.798 0-0/? I/init: Service 'console' (pid 26325) exited with status 0
2022-02-15 11:29:25.800 0-0/? I/init: Sending signal 9 to service 'console' (pid 26325) process group...
2022-02-15 11:29:25.801 0-0/? I/libprocessgroup: Successfully killed process cgroup uid 2000 pid 26325 in 0ms
2022-02-15 11:29:26.972 1842-1842/com.google.android.apps.nexuslauncher D/TaplEvents: TIS / TouchInteractionService.onInputEvent: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=574.9695, y[0]=1216.9556, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=64888489, downTime=64888489, deviceId=11, source=0x5002, displayId=0, eventId=417279934 }
2022-02-15 11:29:27.045 1842-1842/com.google.android.apps.nexuslauncher D/TaplEvents: TIS / TouchInteractionService.onInputEvent: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=574.9695, y[0]=1216.9556, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=64888567, downTime=64888489, deviceId=11, source=0x5002, displayId=0, eventId=729629350 }
2022-02-15 11:29:27.065 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812160, pluginId: SentryCapacitor, methodName: addBreadcrumb
2022-02-15 11:29:27.066 25850-25995/io.ionic.starter V/Capacitor: callback: 104812160, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.644946167061E9,"category":"ui.click","message":"ion-button.md.button.button-solid.ion-activatable.ion-focusable.hydrated.ion-activated"}
2022-02-15 11:29:27.071 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812161, pluginId: SentryCapacitor, methodName: addBreadcrumb
2022-02-15 11:29:27.071 25850-25995/io.ionic.starter V/Capacitor: callback: 104812161, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.644946167069E9,"category":"xhr","data":{"requestBody":"{ \"foo\": \"© bar\" }","requestMethod":"GET","requestURL":"https:\/\/github.com\/KevinKelchen\/my-fake-request-breadcrumb-url"}}
2022-02-15 11:29:27.128 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812162, pluginId: SentryCapacitor, methodName: addBreadcrumb
2022-02-15 11:29:27.128 25850-25995/io.ionic.starter V/Capacitor: callback: 104812162, pluginId: SentryCapacitor, methodName: addBreadcrumb, methodData: {"timestamp":1.644946167126E9,"category":"sentry.event","event_id":"ef93feb6abfb42739a50a667eee7d759","level":"error","message":"Error: This error should include a bad breadcrumb"}
2022-02-15 11:29:27.131 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812163, pluginId: SentryCapacitor, methodName: getStringBytesLength
2022-02-15 11:29:27.132 25850-25995/io.ionic.starter V/Capacitor: callback: 104812163, pluginId: SentryCapacitor, methodName: getStringBytesLength, methodData: {"string":"{\"exception\":{\"values\":[{\"type\":\"Error\",\"value\":\"This error should include a bad breadcrumb\",\"stacktrace\":{\"frames\":[{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"HTMLElement.globalZoneAwareCallback\",\"in_app\":true,\"lineno\":6005},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"invokeTask\",\"in_app\":true,\"lineno\":5968},{\"colno\":38,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneTask.invokeTask [as invoke]\",\"in_app\":true,\"lineno\":4828},{\"colno\":51,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"Zone.runTask\",\"in_app\":true,\"lineno\":4517},{\"colno\":64,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4745},{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"Object.onInvokeTask\",\"in_app\":true,\"lineno\":114471},{\"colno\":35,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4746},{\"colno\":17,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.sentryWrapped\",\"in_app\":true,\"lineno\":17452},{\"colno\":34,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.<anonymous>\",\"in_app\":true,\"lineno\":128678},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"wrapListenerIn_markDirtyAndPreventDefault\",\"in_app\":true,\"lineno\":102506},{\"colno\":12,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"executeListenerWithErrorHandling\",\"in_app\":true,\"lineno\":102462},{\"colno\":22,\"filename\":\"app:\/\/\/HomePage.js\",\"function\":\"HomePage_Template_ion_button_click_12_listener\",\"in_app\":true,\"lineno\":32},{\"colno\":40,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/src_app_home_home_module_ts.js\",\"function\":\"HomePage.triggerErrorWithBadBreadcrumb\",\"in_app\":true,\"lineno\":127}]},\"mechanism\":{\"type\":\"generic\",\"handled\":true}}]},\"level\":\"error\",\"event_id\":\"ef93feb6abfb42739a50a667eee7d759\",\"platform\":\"javascript\",\"timestamp\":1644946167.125,\"environment\":\"production\",\"release\":\"22.0.1\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.2\"}],\"version\":\"0.4.2\"},\"breadcrumbs\":[{\"timestamp\":1644946167.069,\"category\":\"xhr\",\"data\":{\"requestBody\":\"{ \\\"foo\\\": \\\"© bar\\\" }\",\"requestMethod\":\"GET\",\"requestURL\":\"https:\/\/github.com\/KevinKelchen\/my-fake-request-breadcrumb-url\"}}],\"sdkProcessingMetadata\":{},\"request\":{\"url\":\"http:\/\/000.000.0.000:8101\/home\",\"headers\":{\"User-Agent\":\"Mozilla\/5.0 (Linux; Android 12; sdk_gphone64_x86_64 Build\/S2B2.211203.006; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/91.0.4472.114 Mobile Safari\/537.36\"}},\"tags\":{\"event.origin\":\"javascript\",\"event.environment\":\"javascript\"},\"message\":{}}"}
2022-02-15 11:29:27.135 25850-25995/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 104812164, pluginId: SentryCapacitor, methodName: captureEnvelope
2022-02-15 11:29:27.135 25850-25995/io.ionic.starter V/Capacitor: callback: 104812164, pluginId: SentryCapacitor, methodName: captureEnvelope, methodData: {"envelope":"{\"event_id\":\"ef93feb6abfb42739a50a667eee7d759\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.2\"}],\"version\":\"0.4.2\"}}\n{\"content_type\":\"application\/json\",\"length\":3017,\"type\":\"event\"}\n{\"exception\":{\"values\":[{\"type\":\"Error\",\"value\":\"This error should include a bad breadcrumb\",\"stacktrace\":{\"frames\":[{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"HTMLElement.globalZoneAwareCallback\",\"in_app\":true,\"lineno\":6005},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"invokeTask\",\"in_app\":true,\"lineno\":5968},{\"colno\":38,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneTask.invokeTask [as invoke]\",\"in_app\":true,\"lineno\":4828},{\"colno\":51,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"Zone.runTask\",\"in_app\":true,\"lineno\":4517},{\"colno\":64,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4745},{\"colno\":25,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"Object.onInvokeTask\",\"in_app\":true,\"lineno\":114471},{\"colno\":35,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/polyfills.js\",\"function\":\"ZoneDelegate.invokeTask\",\"in_app\":true,\"lineno\":4746},{\"colno\":17,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.sentryWrapped\",\"in_app\":true,\"lineno\":17452},{\"colno\":34,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"HTMLElement.<anonymous>\",\"in_app\":true,\"lineno\":128678},{\"colno\":18,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"wrapListenerIn_markDirtyAndPreventDefault\",\"in_app\":true,\"lineno\":102506},{\"colno\":12,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/vendor.js\",\"function\":\"executeListenerWithErrorHandling\",\"in_app\":true,\"lineno\":102462},{\"colno\":22,\"filename\":\"app:\/\/\/HomePage.js\",\"function\":\"HomePage_Template_ion_button_click_12_listener\",\"in_app\":true,\"lineno\":32},{\"colno\":40,\"filename\":\"app:\/\/\/http:\/\/000.000.0.000:8101\/src_app_home_home_module_ts.js\",\"function\":\"HomePage.triggerErrorWithBadBreadcrumb\",\"in_app\":true,\"lineno\":127}]},\"mechanism\":{\"type\":\"generic\",\"handled\":true}}]},\"level\":\"error\",\"event_id\":\"ef93feb6abfb42739a50a667eee7d759\",\"platform\":\"javascript\",\"timestamp\":1644946167.125,\"environment\":\"production\",\"release\":\"22.0.1\",\"sdk\":{\"integrations\":[\"InboundFilters\",\"FunctionToString\",\"TryCatch\",\"Breadcrumbs\",\"GlobalHandlers\",\"LinkedErrors\",\"Dedupe\",\"UserAgent\",\"RewriteFrames\",\"SdkInfo\",\"EventOrigin\"],\"name\":\"sentry.javascript.capacitor\",\"packages\":[{\"name\":\"npm:@sentry\/capacitor\",\"version\":\"0.4.2\"}],\"version\":\"0.4.2\"},\"breadcrumbs\":[{\"timestamp\":1644946167.069,\"category\":\"xhr\",\"data\":{\"requestBody\":\"{ \\\"foo\\\": \\\"© bar\\\" }\",\"requestMethod\":\"GET\",\"requestURL\":\"https:\/\/github.com\/KevinKelchen\/my-fake-request-breadcrumb-url\"}}],\"sdkProcessingMetadata\":{},\"request\":{\"url\":\"http:\/\/000.000.0.000:8101\/home\",\"headers\":{\"User-Agent\":\"Mozilla\/5.0 (Linux; Android 12; sdk_gphone64_x86_64 Build\/S2B2.211203.006; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/91.0.4472.114 Mobile Safari\/537.36\"}},\"tags\":{\"event.origin\":\"javascript\",\"event.environment\":\"javascript\"},\"message\":{}}"}
2022-02-15 11:29:27.138 25850-25969/io.ionic.starter I/capacitor-sentry: Successfully captured envelope.
2022-02-15 11:29:27.140 25850-26002/io.ionic.starter D/Sentry: onEvent fired for EnvelopeFileObserver with event type 8 on path: /data/user/0/io.ionic.starter/cache/sentry/outbox for file c3ad30f6-ba92-42bc-9d6f-369d3b29ca69.
2022-02-15 11:29:27.143 25850-26002/io.ionic.starter E/FileObserver: Unhandled exception in FileObserver io.sentry.android.core.EnvelopeFileObserver@2ce25ef
    java.lang.IllegalArgumentException: Envelope has invalid data following an item.
        at io.sentry.EnvelopeReader.read(EnvelopeReader.java:125)
        at io.sentry.OutboxSender.processFile(OutboxSender.java:63)
        at io.sentry.OutboxSender.processEnvelopeFile(OutboxSender.java:103)
        at io.sentry.android.core.EnvelopeFileObserver.onEvent(EnvelopeFileObserver.java:59)
        at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:166)
        at android.os.FileObserver$ObserverThread.observe(Native Method)
        at android.os.FileObserver$ObserverThread.run(FileObserver.java:116)
    
    
    --------- beginning of system
2022-02-15 11:29:27.147 624-26326/system_process I/DropBoxManagerService: add tag=data_app_wtf isTagEnabled=true flags=0x2
2022-02-15 11:29:27.151 25850-25850/io.ionic.starter I/Capacitor/Console: File: http://000.000.0.000:8101/ - Line 204 - Msg: undefined
2022-02-15 11:29:27.159 25850-25850/io.ionic.starter I/Capacitor/Console: File: http://000.000.0.000:8101/ - Line 204 - Msg: undefined
2022-02-15 11:29:27.167 25850-25850/io.ionic.starter I/Capacitor/Console: File: http://000.000.0.000:8101/ - Line 204 - Msg: undefined
2022-02-15 11:29:27.195 25850-25893/io.ionic.starter D/EGL_emulation: app_time_stats: avg=13225.57ms min=3.87ms max=330434.41ms count=25

In the Android logs you'll see this message in the Bad Breadcrumb case:
E/FileObserver: Unhandled exception in FileObserver io.sentry.android.core.EnvelopeFileObserver@2ce25ef

Workarounds

In our app we added code like this in beforeBreadcrumb():

// Replace each non-ASCII character with an '_'.
// Characters such as '©' and others cause issues when `@sentry/capacitor` processes events
// in the native iOS and Android layers.
// Events will not be sent to Sentry when this occurs.
// Source for regex: https://stackoverflow.com/a/20856346/12493735
return xhrBody.replace(/[^\x00-\x7F]/g, "_");

Final Thoughts

Thank you so much for taking the time to investigate and/or work on this issue! 😀

Error Object.cap.fromNative(<unknown module>), no crash on android console site but tons of sentry.event error

Environment

How do you use Sentry?

Sentry SaaS (sentry.io)

Which SDK and version?

    "@sentry/capacitor": "^0.4.0",
    "@sentry/react": "^6.11.0",
    "@sentry/tracing": "^6.11.0",

Description

Hi there,

I'm seeing tons of events for this error. It seems that the crash on the app is not happening (I've watched the play store console and it seems that there are no crashes) but sentry is logging this error without useful information.

For each release, we upload the source map of the application but for this specific error we get only this stack trace:

Error: value for items is missing
  at Object.cap.fromNative(app:///:426:32)
  at ? (app:///<anonymous>:1:18)

and on the breadcrumbs, I see this at the end of them

image

what should we do?

Release GA on npm

This issue will track making the Capacitor GA with support to Android and iOS.

The expected features are: Native crash support, JS-land errors, release health and performance monitoring (the API to track timing information such as transactions and spans).

Related to #23 #21 #27

Is it safe for production? Does it support both Capacitor 2.x and Capacitor 3.x?

We are developing a Capacitor application in React and we would like to add Sentry support.

Is this SDK production safe? Does it support both Capacitor 2.x and Capacitor 3.x? (we are using Capacitor 2.x but we are planning to upgrade to 3.x).

Is there something that is missing from the feature list of the Sentry React SDK?

"Discarded unknown attribute" problem flagged on events

Overview

Events in Sentry have a problem flagged that says Discarded unknown attribute.

On iOS the problem will be

  • sdkProcessingMetadata: Discarded unknown attribute

On Android the problem will be

  • unknown: Discarded unknown attribute

This occurs on hybrid iOS and hybrid Android which use the native SDKs to process and send the event (might be relevant). It is not an issue on Web wherein it works fine (it also works fine using @sentry/browser directly).

A repro can be found here.

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Sentry Capacitor - 0.4.2

Steps to Reproduce

See Steps to Reproduce.

Expected Result

The event from hybrid iOS and Android appears in Sentry without a problem being flagged.

We normally do not have problems flagged on our events from production builds. If the red problem banner were to be accepted as always appearing due to this issue, I think people would initially think something is really wrong. After being told to ignore it due to this issue, I think they then would start to ignore the problem banner altogether which would make it less likely for people to notice different, more actionable problems.

Actual Result

The event from hybrid iOS and Android appears in Sentry with a problem being flagged.

Final Thoughts

Thank you so much for taking the time to investigate and/or work on this issue! 😀

SentryCapacitor is making the Ionic app really slow.

My application has become really slow after integrating with capacitor sentry sdk . Our app is an Ionic based one which uses capacitor 3 as its native run time . I have done the basic integration looking at the capacitor docs , i see that the events are flowing in to the dashboard , but the sentry initialization is taking lot of time, even after that the entire app has become really slow. i could see that the console is being overwhelmed with capacitor breadcrumbs and events logging.

How to solve this problem.

This is the simple integration codebase i have added to our project ..

setUpSentry(){
console.log("setting up sentry")
Sentry.init(
{
dsn: "my dsn key",

    // Set your release version, such as "[email protected]"
    release: "My Project name",

    debug:false,

    maxBreadcrumbs:50,
    // Set your dist version, such as "1"
    dist: "1"
  },
  // Forward the init method from @sentry/angular
  SentryAngular.init
);

}

Version mismatch between @sentry/javascript packages installed by user and the @sentry/capacitor package.

Environment

How do you use Sentry?

  • Sentry SaaS (sentry.io)

Which SDK and version?

  • Ionic/Angular 5.6.4
  • Angular 11.2.9
  • Capacitor 3.0.1
  • "@sentry/angular": "^6.10.0",
  • "@sentry/capacitor": "^0.3.0",

Steps to Reproduce

Implement Hello World example as per git README instructions, not onboarding example which looks outdated

All relevant code in app-module.ts:

import {ErrorHandler, Injectable, NgModule} from '@angular/core';
import * as Sentry from "@sentry/capacitor";
import { init as sentryAngularInit, createErrorHandler }  from "@sentry/angular";
// ...

Sentry.init({
    dsn: 'https://gsdhgdshghdsds.ingest.sentry.io/32444532',
}, sentryAngularInit);
Sentry.captureMessage('Hello, world!');
// ...

@NgModule({
    declarations: [
        AppComponent,
    ],
    entryComponents: [],
    imports: [
// ...
       ],
    providers: [
        WebView,
//...
        {
            provide: ErrorHandler,
            useValue: createErrorHandler(),
        },
    ],
    bootstrap: [AppComponent]
})
export class AppModule
{
}

Build for Android using Android studio and the following steps:

  • ionic cap sync android
  • build in Android studio
  • run on real device (not emulator)

Expected Result

Just one issue: Hello, world! from http://localhost/
And maybe a lot of other exceptions caused by my code ;-)

Actual Result

Apart from the one Hello World there are many exceptions from Sentry itself: taskProducer is not a function

There are 50 events of this issue in just one App launch without any further interacetion

Screenshot 2021-07-28 at 11-43-43 TypeError taskProducer is not a function

Types in v0.4.1 does not match @sentry/types

Environment

How do you use Sentry?
self-hosted/on-premise

Which SDK and version?
se bellow

Steps to Reproduce

  1. yarn add @sentry/capacitor@^0.4.0 @sentry/react@^6.13.2 @sentry/tracing@^6.13.2

  2. try to setup integration:


if (process.env.NODE_ENV === 'production') {
  Sentry.init(
    {
      enableNative: Capacitor.getPlatform() !== 'web',
      dsn: 'hah!',
      release: process.env.REACT_APP_VERSION,
      integrations: [
        new CaptureConsole({
          levels: ['error'],
        }),
        new OfflineIntegration({
          // limit how many events will be localled saved. Defaults to 30.
          maxStoredEvents: 30,
        }),
        new ExtraErrorDataIntegration({ depth: 5 }),
      ],
      environment: process.env.NODE_ENV,
    },
    SentryReact.init
  )
}
  1. Then you get compilation errors:

Expected Result

No compilation errors

Actual Result

ype 'CaptureConsole' is not assignable to type 'Integration'.
  Types of property 'setupOnce' are incompatible.
    Type '(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub) => void' is not assignable to type '(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub) => void'.
      Types of parameters '_' and 'addGlobalEventProcessor' are incompatible.
        Types of parameters 'callback' and 'callback' are incompatible.
          Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/eventprocessor").EventProcessor' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/eventprocessor").EventProcessor'.
            Types of parameters 'hint' and 'hint' are incompatible.
              Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/event").EventHint | undefined' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/event").EventHint | undefined'.
                Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/event").EventHint' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/event").EventHint'.
                  Types of property 'captureContext' are incompatible.
                    Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/scope").CaptureContext | undefined' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/scope").CaptureContext | undefined'.
                      Type 'Scope' is not assignable to type 'CaptureContext | undefined'.
                        Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/scope").Scope' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/scope").Scope'.
                          The types returned by 'getSession()' are incompatible between these types.
                            Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/session").Session | undefined' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/session").Session | undefined'.
                              Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/session").Session' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/session").Session'.
                                The types of 'toJSON().status' are incompatible between these types.
                                  Type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/react/node_modules/@sentry/types/dist/session").SessionStatus' is not assignable to type 'import("/home/tarjei/ask/core/studentbevis/node_modules/@sentry/types/dist/session").SessionStatus'.
                                    Type '"ok"' is not assignable to type 'SessionStatus'.  TS2322


It seems to me that the prolem here is sentry-capacitor not getting released in lockstep with the other js sdks so that you end up with differnet versions of @sentry/types and @sentry/core vs @sentry/react.

Cannot find module './definitions' from 'node_modules/@sentry/capacitor/dist/plugin.js'

Environment

How do you use Sentry?
sentry.io

Which SDK and version?
@sentry/capacitor 0.4.0
@sentry/angular 6.11.0

Steps to Reproduce

Not sure how to reproduce it but we recently updated our app from cordova to capacitor and now we are having troubles with some of unit tests (jest).
Some test suits fail with error:

Test suite failed to run

    Cannot find module './definitions' from 'node_modules/@sentry/capacitor/dist/plugin.js'

    Require stack:
      node_modules/@sentry/capacitor/dist/plugin.js

Expected Result

Test should pass

Actual Result

● Test suite failed to run

Cannot find module './definitions' from 'node_modules/@sentry/capacitor/dist/plugin.js'

Require stack:
  node_modules/@sentry/capacitor/dist/plugin.js
  src/app/services/logger.service.ts
  src/app/config/error.handler.ts
  src/app/store/session/reducers/auth.reducer.ts
  src/app/store/session/selectors/auth.selectors.ts
  src/app/services/browser.service.ts
  src/app/pages/wizard/components/wizard.component.ts
  src/app/pages/wizard/components/worry-tool/worry-tool-wizard.component.ts
  src/app/pages/wizard/components/worry-tool/worry-tool-wizard.component.spec.ts

  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
  at node_modules/@sentry/capacitor/dist/esm/index.js:4:22
  at Object.<anonymous> (node_modules/@sentry/capacitor/dist/plugin.js:37:2)

Screenshot 2021-10-13 at 15 18 33

Screenshot 2021-10-13 at 15 18 52

Remove CommonJS or AMD dependencies

Environment

How do you use Sentry?

  • Sentry SaaS

Which SDK and version?

  • @sentry/capacitor 0.4.0
  • @sentry/angular 6.11.0

Steps to Reproduce

  1. generate a new ionic angular project
  2. npm install @sentry/capacitor, @sentry/angular
  3. include Sentry as per documentation
  4. build capacitor project, e.g. with ionic cap sync ios

Expected Result

Project builds clean and without warnings

Actual Result

The warning CommonJS or AMD dependencies can cause optimization bailouts is raised:

Warning: ./Development/ionicapp/src/app/app.module.ts depends on '@sentry/capacitor'. 
CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

CONTRIBUTING.md

Would be nice for folks that don't know how to set things out and how to get started.

Some ideas:

  • requirements
  • options for tools (xcode, android studio, vscode?)
  • general code architecture
  • installing dependencies
  • run tests

Errors on iOS are not sent to sentry.io when using with @sentry/vue

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
@sentry/[email protected]
@sentry/[email protected]
@sentry/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]

Steps to Reproduce

I am using the following code to initialize sentry. This works on android and web:

import Vue from 'vue';
import { Integrations } from '@sentry/tracing';
import * as Sentry from '@sentry/capacitor';
import * as SentryVue from "@sentry/vue";

console.warn('BEFORE INIT');

Sentry.init({
  enabled: true,
  Vue,
  dsn: "myDsn",
  environment: "environment",
  release: "release",
  ignoreErrors: ["CANCEL"],
  integrations: [new Integrations.BrowserTracing()],
  tracesSampleRate: 0.1
  }, SentryVue.init);

console.warn('AFTER INIT');

Expected Result

Errors should be sent to sentry.io

Actual Result

No error is sent to sentry.io on iOS.

I think the native sentry plugin is not initialized correctly. SentryCapacitor.initNativeSdk never resolves and a DataCloneError gets thrown at some point. When trying to send something to sentry.io SentryCapacitor.fetchNativeSdkInfo rejects with Called fetchSdkInfo without initializing cocoa SDK..

Bildschirmfoto 2021-10-05 um 13 09 14

No events sent after console.log with umlauts (Android)

Environment

I'm developing a capacitor app with @sentry/angular 6.14.0 and @sentry/capacitor 0.4.0 and sentry.io. I noticed that event reporting stopped after a short time in app. Analyzing the reason for this, I found out that console.log calls with umlauts cause the problem.

Steps to Reproduce

Sentry.captureException('first test message');
console.log('just normal stuff');
Sentry.captureException('still works');
console.log('üö');
Sentry.captureException('doesnt work anymore');

Expected Result

All messages should appear on sentry.io.

Actual Result

However, only the first two appear. This only happens when running the app on android. In the browser, everything works as expected.

Source maps not recognized on Web

Environment

Steps to Reproduce

  1. npx ionic build --prod --source-map
  2. Source maps are stripped from the deployed code
  3. npx sentry-cli releases files ${RELEASE_NAME} upload-sourcemaps www/ --dist ${CI_PIPELINE_IID} --verbose --rewrite --strip-common-prefix

Expected Result

Source maps should be recognized on all platforms.

Actual Result

Source maps are recognized on iOS and Android but not on web.

My best guess as to the issue is shown in this screenshot. The source URLs for both native platforms are prefixed with app:/// while on the web version, they are prefixed with app:///https://onsite.event1.io/.

image

image

Support Web

Environment

How do you use Sentry?
Sentry SaaS

Which SDK and version?
@sentry/[email protected]

Steps to Reproduce

  1. Followed the README
  2. Started my Ionic app in the browser

Expected Result

Fallback to JS SDK (Angular is my case)?

Actual Result

instrument.js:109 Unhandled Promise rejection: Native Client is not available, can't start on native. ; Zone: <root> ; Task: null ; Value: SentryError: Native Client is not available, can't start on native.
    at new SentryError (error.js:8)
    at Object.35046 (wrapper.js:291)
    at __webpack_require__ (bootstrap:19)
    at Object.51297 (sdkinfo.js:6)
    at __webpack_require__ (bootstrap:19)
    at Object.56889 (index.js:5)
    at __webpack_require__ (bootstrap:19)
    at Object.39167 (sdk.js:7)
    at __webpack_require__ (bootstrap:19)
    at Object.79555 (index.js:29) SentryError: Native Client is not available, can't start on native.
    at new SentryError (http://localhost:8100/vendor.js:90528:28)
    at Object.35046 (http://localhost:8100/vendor.js:85627:25)
    at __webpack_require__ (http://localhost:8100/runtime.js:23:42)
    at Object.51297 (http://localhost:8100/vendor.js:85023:17)
    at __webpack_require__ (http://localhost:8100/runtime.js:23:42)
    at Object.56889 (http://localhost:8100/vendor.js:85006:17)
    at __webpack_require__ (http://localhost:8100/runtime.js:23:42)
    at Object.39167 (http://localhost:8100/vendor.js:85210:22)
    at __webpack_require__ (http://localhost:8100/runtime.js:23:42)
    at Object.79555 (http://localhost:8100/vendor.js:84950:13)
(anonymous) @ instrument.js:109
api.onUnhandledError @ zone.js:1063
handleUnhandledRejection @ zone.js:1088
api.microtaskDrainDone @ zone.js:1082
drainMicroTaskQueue @ zone.js:589
Promise.then (async)
scheduleMicroTask @ zone.js:565
scheduleTask @ zone.js:396
scheduleTask @ zone.js:221
scheduleMicroTask @ zone.js:241
scheduleResolveOrReject @ zone.js:1266
then @ zone.js:1410
setDriver @ localforage.js:2734
LocalForage @ localforage.js:2523
4.3 @ localforage.js:2796
s @ localforage.js:7
e @ localforage.js:7
(anonymous) @ localforage.js:7
(anonymous) @ localforage.js:7
92430 @ localforage.js:7
__webpack_require__ @ bootstrap:19
21014 @ vendor.js:88971
__webpack_require__ @ bootstrap:19
39462 @ vendor.js:88934
__webpack_require__ @ bootstrap:19
39167 @ sdk.js:6
__webpack_require__ @ bootstrap:19
79555 @ index.js:29
__webpack_require__ @ bootstrap:19
14431 @ environment.ts:21
__webpack_require__ @ bootstrap:19
__webpack_exec__ @ main.js:4245
(anonymous) @ main.js:4246
__webpack_require__.O @ chunk loaded:25
(anonymous) @ main.js:4247
webpackJsonpCallback @ jsonp chunk loading:72
(anonymous) @ main.js:1
error.js:8 Uncaught SentryError: Native Client is not available, can't start on native.
    at new SentryError (error.js:8)
    at Object.35046 (wrapper.js:291)
    at __webpack_require__ (bootstrap:19)
    at Object.51297 (sdkinfo.js:6)
    at __webpack_require__ (bootstrap:19)
    at Object.56889 (index.js:5)
    at __webpack_require__ (bootstrap:19)
    at Object.39167 (sdk.js:7)
    at __webpack_require__ (bootstrap:19)
    at Object.79555 (index.js:29)
SentryError @ error.js:8
35046 @ wrapper.js:291
__webpack_require__ @ bootstrap:19
51297 @ sdkinfo.js:6
__webpack_require__ @ bootstrap:19
56889 @ index.js:5
__webpack_require__ @ bootstrap:19
39167 @ sdk.js:7
__webpack_require__ @ bootstrap:19
79555 @ index.js:29
__webpack_require__ @ bootstrap:19
14431 @ environment.ts:21
__webpack_require__ @ bootstrap:19
__webpack_exec__ @ main.js:4245
(anonymous) @ main.js:4246
__webpack_require__.O @ chunk loaded:25
(anonymous) @ main.js:4247
webpackJsonpCallback @ jsonp chunk loading:72
(anonymous) @ main.js:1
zone.js:372 Uncaught (in promise) SentryError: Native Client is not available, can't start on native.
    at new SentryError (error.js:8)
    at Object.35046 (wrapper.js:291)
    at __webpack_require__ (bootstrap:19)
    at Object.51297 (sdkinfo.js:6)
    at __webpack_require__ (bootstrap:19)
    at Object.56889 (index.js:5)
    at __webpack_require__ (bootstrap:19)
    at Object.39167 (sdk.js:7)
    at __webpack_require__ (bootstrap:19)
    at Object.79555 (index.js:29)

Cant able to locate SentryCapacitor Class

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Steps to Reproduce

Just install @sentry/capacitor latest version

Expected Result

"@sentry/capacitor": "^0.2.0",
installed
Screenshot from 2021-07-22 18-15-39

What you thought would happen.

Actual Result

It should able to detect the Sentry Class

What actually happened. Maybe a screenshot/recording? Maybe some logs?
[]Nothing happens

Purpose of the Sentry Capacitor SDK vs. the Sentry iOS & Android ones

We are currently running an iOS & Android Capacitor app, and have integrated the Sentry iOS & Android SDKs, in addition to the Sentry JS SDK we were already using for the web app itself.

I know this is an alpha project but I was wondering what was the plan for it, i.e. what would it bring more that isn't provided by the Sentry native SDKs already. Maybe adding a section in the README would help people decide if they need it or not.

Dependencies outdated: @sentry/angular

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?

Steps to Reproduce

  1. run npm outdated
  2. check: @sentry/angular current: 6.11.0 wanted: 6.13.3
  3. run npm install @sentry/angular@lates

Expected Result

The npm install ... or even npm update command should update all packages to the "wanted" version

Actual Result

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @sentry/[email protected]
npm ERR! Found: @sentry/[email protected]
npm ERR! node_modules/@sentry/angular
npm ERR!   @sentry/angular@"6.13.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @sentry/angular@"6.11.0" from @sentry/[email protected]
npm ERR! node_modules/@sentry/capacitor
npm ERR!   @sentry/capacitor@"^0.4.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @sentry/[email protected]
npm ERR! node_modules/@sentry/angular
npm ERR!   peerOptional @sentry/angular@"6.11.0" from @sentry/[email protected]
npm ERR!   node_modules/@sentry/capacitor
npm ERR!     @sentry/capacitor@"^0.4.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 

Source maps are not linked correctly by Sentry

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?

    "@sentry/capacitor": "^0.4.0",
    "@sentry/react": "^6.11.0",
    "@sentry/tracing": "^6.11.0",

Description

Source maps are not linked correctly by Sentry and I'm unable to understand how to fix the code.
This is the error trace

RangeError: Invalid time value
  at Z(app:///static/js/2.8a9aba35.chunk.js:2:718874)
  at un(app:///static/js/main.b1e0cf1d.chunk.js:1:70866)
  at ? (app:///static/js/main.b1e0cf1d.chunk.js:1:71066)
  at ? (app:///static/js/main.b1e0cf1d.chunk.js:1:71975)
  at ri(app:///static/js/main.b1e0cf1d.chunk.js:1:87954)
  at ou(app:///static/js/2.8a9aba35.chunk.js:2:786602)
  at Ga(app:///static/js/2.8a9aba35.chunk.js:2:839060)
  at ws(app:///static/js/2.8a9aba35.chunk.js:2:826234)
  at Ss(app:///static/js/2.8a9aba35.chunk.js:2:826162)
  at Cs(app:///static/js/2.8a9aba35.chunk.js:2:826025)
  at ms(app:///static/js/2.8a9aba35.chunk.js:2:822991)
  at ? (app:///static/js/2.8a9aba35.chunk.js:2:772370)
  at t.unstable_runWithPriority(app:///static/js/2.8a9aba35.chunk.js:2:849789)
  at zo(app:///static/js/2.8a9aba35.chunk.js:2:772147)
  at Yo(app:///static/js/2.8a9aba35.chunk.js:2:772315)
  at Wo(app:///static/js/2.8a9aba35.chunk.js:2:772250)
  at ds(app:///static/js/2.8a9aba35.chunk.js:2:820360)
  at Tu(app:///static/js/2.8a9aba35.chunk.js:2:791927)
  at ? (app:///static/js/2.8a9aba35.chunk.js:2:508500)
  at ? (app:///static/js/2.8a9aba35.chunk.js:2:211534)
  at e.notifyFn(app:///static/js/2.8a9aba35.chunk.js:2:211092)
  at ? (app:///static/js/2.8a9aba35.chunk.js:2:211699)
  at Array.forEach(app:///<anonymous>)
  at ? (app:///static/js/2.8a9aba35.chunk.js:2:211676)
  at e.batchNotifyFn(app:///static/js/2.8a9aba35.chunk.js:2:211128)
  at ? (app:///static/js/2.8a9aba35.chunk.js:2:211648)

and on the error page sentry say that I'm missing a source file linked to the error

image

but if I click on the release associated with the crash (1.3.3)

image

and go to see the source map for that release related to the sentry crash (1.3.3) I can see those source map for file

image

what's the problem? How can I solve it?

No error sents on native devices

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?

"@angular/core": "~10.0.0",
"@capacitor/android": "^2.4.6",
"@capacitor/core": "2.4.6",
"@capacitor/ios": "^2.4.6",
"@sentry/angular": "^6.16.1",
"@sentry/capacitor": "^0.4.1"

Steps to Reproduce

I use the default setup

// app.module.ts
Sentry.init(
    {
        dsn: 'https://[email protected]/xxxxxx',
        release: '[email protected]',
        dist: '0.9',
        tracesSampleRate: 1.0,
        integrations: [
            new TracingIntegrations.BrowserTracing({
                tracingOrigins: ['localhost'],
            }),
        ]
    },
    // Forward the init method from @sentry/angular
    SentryAngular.init
);


@NgModule({
    declarations: [AppComponent],
    entryComponents: [],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        IonicModule.forRoot(),
        AppRoutingModule,
        HttpClientModule,
        IonicStorageModule.forRoot()
    ],
    providers: [
        {provide: ErrorHandler, useValue: SentryAngular.createErrorHandler()},
        {provide: RouteReuseStrategy, useClass: IonicRouteStrategy},
        File,
        FileTransfer,
        InAppBrowser,
        AuthGuardService,
        HTTP,
        FileOpener
    ],
    bootstrap: [AppComponent]
})
export class AppModule {}
// app.component.ts
throwError() {
    throw new Error(`Test Thrown Error`);
}

throwErrorNative() {
  Sentry.nativeCrash();
}

Expected Result

Should throw errors and log it t sentry.io with a click of a button but I'm receiving nothing when using real devices (both android and iOS).

Actual Result

It works when I run it in the browser using ionic serve

It throws this error at startup :

Unhandled Promise rejection: Native Client is not available, can't start on native. ; Zone: <root> ; Task: null ; Value: e: Native Client is not available, can't start on native.

Source maps not recognized for Android

Environment

MacOS, Android 11
Sentry SaaS (sentry.io)

Which SDK and version?
sentry/angular - 6.13.2, sentry/capacitor: 0.4.0, Angular: 11.0.0, Ionic: 5.29.0, Capacitor: 3.0.1

Steps to Reproduce

  1. ionic build --prod - builds the app and creates source maps in www folder
  2. sentry-cli releases --org "org_name" --project "project_name" files "[email protected]" upload-sourcemaps ./www -x .js -x .map --validate --verbose --rewrite --strip-common-prefix - uploads source maps to Sentry
  3. npx cap sync - copies the build to android folder
  4. run the app and cause an error
  5. check Sentry and see whether source maps were recognized

Expected Result

I expect the same error on iOS and Android to show the same stack trace.

Actual Result

On iOS it works flawlessly. On Android I get an alert:
Source code was not found Url | app:///polyfills-es2015.906050c326169a72ef3f.js. I can confirm there is a file uploaded with this name for given release. The issue shows the correct release number as well.
When I compare iOS error and the Android one I can only see a difference in url paramater:

  • iOS - capacitor://localhost/tabs/today
  • Android - http://localhost/tabs/today

I went through data sent to Sentry, inspected frames in stacktrace and can confirm that filenames are the same for both platforms: app:///polyfills-es2015.906050c326169a72ef3f.js

I was going through documentation, different Github issues and any StackOverflow thread I could find which gave me few worthwhile theories:

I apologize if I am doing something wrong or missed something but I got quite stuck. How can I make Sentry to recognize Android stack trace?

Android: W/OkHttpClient: A connection to <sentry url> was leaked. Did you forget to close a response body?

Environment

How do you use Sentry?
self-hosted/on-premise

Which SDK and version?
Capacitor latest (0.4.0)

Steps to Reproduce

  1. Start the app with sentry integration
  2. according to the integrations, create sentry events
  3. at some point this error occurs in logcat

Expected Result

No warning should be logged by okhttpclient

Actual Result

The warning is logged to logcat, which indicates a memory leak:

W/OkHttpClient: A connection to <sentry url> was leaked. Did you forget to close a response body?

iOS SDK outdated

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?

  • @sentry/capacitor 0.4.0

Steps to Reproduce

  1. go to Sentry.io
  2. view an iOS error report
  3. see the warning about the outdated iOS sdk

Expected Result

Expected to see the current SDK version in the Podfile but it isn't

Actual Result

Warning at the bottom of the report on the website:

We recommend you update your SDK from [email protected] to [email protected]
(All sentry packages should be updated and their versions should match)

Release a preview for Android before we ship iOS

I'd like to propose shipping a preview (an alpha is fine) of the Android SDK to get some feedback from the community before we move forward with implementing iOS support.

  • Steps to publish need to be documented on the repo (or a script or somethign)
  • Publish bits to npmjs /cc @HazAT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.