File tree 3 files changed +38
-0
lines changed
3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Unreleased
4
+
5
+ ### Fixes
6
+
7
+ - Fix breadcrumbs not being sent on Android web ([ #1378 ] ( https://github.com/getsentry/sentry-dart/pull/1378 ) )
8
+
3
9
## 7.4.1
4
10
5
11
### Fixes
Original file line number Diff line number Diff line change @@ -468,6 +468,10 @@ class SentryClient {
468
468
/// this is a signal that the app would crash and android would lose the breadcrumbs by the time the app is restarted to read
469
469
/// the envelope.
470
470
bool _shouldRemoveBreadcrumbs (SentryEvent event) {
471
+ if (_options.platformChecker.isWeb) {
472
+ return false ;
473
+ }
474
+
471
475
final isAndroid = _options.platformChecker.platform.isAndroid;
472
476
final enableScopeSync = _options.enableScopeSync;
473
477
Original file line number Diff line number Diff line change @@ -1312,6 +1312,34 @@ void main() {
1312
1312
1313
1313
expect ((capturedEvent.breadcrumbs ?? []).isNotEmpty, true );
1314
1314
});
1315
+
1316
+ test ('web breadcrumbs exist on web Android devices' , () async {
1317
+ fixture.options.enableScopeSync = true ;
1318
+ fixture.options.platformChecker = MockPlatformChecker (
1319
+ platform: MockPlatform .android (),
1320
+ isWebValue: true ,
1321
+ );
1322
+
1323
+ final client = fixture.getSut ();
1324
+ final event = SentryEvent (exceptions: [
1325
+ SentryException (
1326
+ type: "type" ,
1327
+ value: "value" ,
1328
+ mechanism: Mechanism (
1329
+ type: 'type' ,
1330
+ handled: true ,
1331
+ ),
1332
+ ),
1333
+ ], breadcrumbs: [
1334
+ Breadcrumb (),
1335
+ ]);
1336
+ await client.captureEvent (event);
1337
+
1338
+ final capturedEnvelope = (fixture.transport).envelopes.first;
1339
+ final capturedEvent = await eventFromEnvelope (capturedEnvelope);
1340
+
1341
+ expect ((capturedEvent.breadcrumbs ?? []).isNotEmpty, true );
1342
+ });
1315
1343
});
1316
1344
1317
1345
group ('ClientReportRecorder' , () {
You can’t perform that action at this time.
0 commit comments