Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Fixes

- Add debug_meta to all events ([#1756](https://github.com/getsentry/sentry-dart/pull/1756))
- Fixes obfuscated stacktraces when `captureMessage` or `captureEvent` is called with `attachStacktrace` option

### Features

- Add option to opt out of fatal level for automatically collected errors ([#1738](https://github.com/getsentry/sentry-dart/pull/1738))
Expand Down
21 changes: 16 additions & 5 deletions flutter/lib/src/integrations/load_image_list_integration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,25 @@ extension _NeedsSymbolication on SentryEvent {
if (this is SentryTransaction) {
return false;
}
if (exceptions?.isNotEmpty == false) {
return false;
}
final frames = exceptions?.first.stackTrace?.frames;
final frames = _getStacktraceFrames();
if (frames == null) {
return false;
}
return frames.any((frame) => 'native' == frame.platform);
return frames.any((frame) => 'native' == frame?.platform);
}

List<SentryStackFrame?>? _getStacktraceFrames() {
if (exceptions?.isNotEmpty == true) {
return exceptions?.first.stackTrace?.frames;
}
if (threads?.isNotEmpty == true) {
var stacktraces = threads?.map((e) => e.stacktrace);
return stacktraces
?.where((element) => element != null)
.expand((element) => element!.frames)
.toList();
}
return null;
}
}

Expand Down
7 changes: 1 addition & 6 deletions flutter/test/integrations/load_image_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,7 @@ void main() {
SentryEvent _getEvent() {
final frame = SentryStackFrame(platform: 'native');
final st = SentryStackTrace(frames: [frame]);
final ex = SentryException(
type: 'type',
value: 'value',
stackTrace: st,
);
return SentryEvent(exceptions: [ex]);
return SentryEvent(threads: [SentryThread(stacktrace: st)]);
}

class Fixture {
Expand Down