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 0
s (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! 😀