File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed
Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Unreleased
4+
5+ ### Fixes
6+
7+ - LoadImageListIntegration won't throw bad state if there is no exceptions in the event ([ #1347 ] ( https://github.com/getsentry/sentry-dart/pull/1347 ) )
8+
39## 7.1.0
410
511### Features
Original file line number Diff line number Diff line change @@ -22,9 +22,16 @@ class LoadImageListIntegration extends Integration<SentryFlutterOptions> {
2222
2323extension _NeedsSymbolication on SentryEvent {
2424 bool needsSymbolication () {
25- if (this is SentryTransaction ) return false ;
25+ if (this is SentryTransaction ) {
26+ return false ;
27+ }
28+ if (exceptions? .isNotEmpty == false ) {
29+ return false ;
30+ }
2631 final frames = exceptions? .first.stackTrace? .frames;
27- if (frames == null ) return false ;
32+ if (frames == null ) {
33+ return false ;
34+ }
2835 return frames.any ((frame) => 'native' == frame.platform);
2936 }
3037}
Original file line number Diff line number Diff line change @@ -154,6 +154,26 @@ void main() {
154154 expect ('e77c5713-5311-28c2-ecf0-eb73fc39f450' , image.debugId);
155155 expect ('test' , image.debugFile);
156156 });
157+
158+ test ('Native layer is not called as there is no exceptions' ,
159+ () async {
160+ var called = false ;
161+
162+ final sut = fixture.getSut ();
163+ fixture.channel
164+ .setMockMethodCallHandler ((MethodCall methodCall) async {
165+ called = true ;
166+ return imageList;
167+ });
168+
169+ sut.call (fixture.hub, fixture.options);
170+
171+ expect (fixture.options.eventProcessors.length, 1 );
172+
173+ await fixture.hub.captureMessage ('error' );
174+
175+ expect (called, false );
176+ });
157177 });
158178 }
159179 });
You can’t perform that action at this time.
0 commit comments