Platform:
IDE:
split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):
Platform installed with:
The version of the SDK (See pubspec.lock):
6.18.1 (but it's also happening on 6.19.0)
I have the following issue:
Sometimes when tracing performance, I see a ConcurrentModificationError. It is thrown by the following code:
|
await Future.forEach( |
|
spansToBeFinished, |
|
(SentrySpan span) async => await span.finish( |
|
status: SpanStatus.deadlineExceeded(), |
|
endTimestamp: commonEndTimestamp)); |
Unfortunately, I failed to create a minimal reproducible example. Therefore, I'm attaching some screenshots. The first one is the issue on Sentry.io itself, but unfortunately it's not helpful at all.

The second one come from debugging the issue, to show that it's indeed coming from Sentry. Unfortunately, the stacktrace of that error is the same as the one above.

I'm assuming that it's caused by unfinished spans somehow. Roughly, the code in the (closed source) app is the following:
methodOne() {
transaction{
awaited spans (3 times)
one unawaited span
awaited spans (4 times)
}
}
during the same time as methodOne is a web request running, which also attaches a span to the above mentioned transaction
After the above transaction is finished, another one is started. I don't know whether that's related or not.
I would expect Sentry to not throw a ConcurrentModificationError.
Platform:
IDE:
split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):
Platform installed with:
The version of the SDK (See pubspec.lock):
6.18.1 (but it's also happening on 6.19.0)
I have the following issue:
Sometimes when tracing performance, I see a
ConcurrentModificationError. It is thrown by the following code:sentry-dart/dart/lib/src/sentry_tracer.dart
Lines 90 to 94 in 8fa3934
Unfortunately, I failed to create a minimal reproducible example. Therefore, I'm attaching some screenshots. The first one is the issue on Sentry.io itself, but unfortunately it's not helpful at all.
The second one come from debugging the issue, to show that it's indeed coming from Sentry. Unfortunately, the stacktrace of that error is the same as the one above.

I'm assuming that it's caused by unfinished spans somehow. Roughly, the code in the (closed source) app is the following:
I would expect Sentry to not throw a ConcurrentModificationError.