analytics_flutter icon indicating copy to clipboard operation
analytics_flutter copied to clipboard

Crash Timeline.applyPlugins package:segment_analytics/timeline.dart:104

Open awaisjamil-mp opened this issue 7 months ago • 2 comments

Concurrent modification during iteration: Instance(length:6) of '_GrowableList'. Concurrent modification during iteration: Instance(length:6) of '_GrowableList'. 0 ListIterator.moveNext dart:_internal/iterable.dart:348 1 Timeline.applyPlugins package:segment_analytics/timeline.dart:104 2 Timeline.process package:segment_analytics/timeline.dart:91 3 Analytics._process package:segment_analytics/analytics.dart:385 4 Analytics.track package:segment_analytics/analytics.dart:215

awaisjamil-mp avatar Apr 28 '25 11:04 awaisjamil-mp

We are currently experiencing the same error which is generating a number of important issues to users who have the application with the package, we are waiting for your help.

Image

JulianP911 avatar May 02 '25 13:05 JulianP911

any update???

awaisjamil-mp avatar May 12 '25 06:05 awaisjamil-mp

Hi @awaisjamil-mp @JulianP911 ,

We attempted to reproduce the issue by integrating a single plugin, but no errors were encountered during the process. To assist further, could you provide more context—such as the specific plugin(s) used, configuration details, and exact steps to reproduce the error?

This information will help us investigate the issue more effectively.

Thanks.

neelkanth-kaushik avatar May 20 '25 03:05 neelkanth-kaushik

We are using 4 plugins on app startup we add plugins and on the very first event segment throws this error.

Facebook, tiktok, adjust and GoogleAnalytics plugin all of these are custom Destination Plugin that I have created.

awaisjamil-mp avatar May 20 '25 07:05 awaisjamil-mp

Image

here is the number of impacted user on our app

awaisjamil-mp avatar May 20 '25 07:05 awaisjamil-mp

Hi @awaisjamil-mp , while we investigate the root cause, can you please make the following change in analytics_flutter/packages/core/lib/timeline.dart and let us know if it fixes your error?

Image

neelkanth-kaushik avatar May 20 '25 08:05 neelkanth-kaushik

do you want me to fork it?

awaisjamil-mp avatar May 20 '25 08:05 awaisjamil-mp

@awaisjamil-mp To test whether the proposed change resolves your issue, I recommend temporarily modifying the file located at /username/.pub-cache/hosted/pub.dev/segment_analytics-1.1.3/lib/timeline.dart, or the equivalent path in your environment where the dependencies are downloaded after running flutter pub get.

If the patch works as expected, you’re welcome to proceed with your own preferred solution or wait for the official release. In either case, please leave a comment here to confirm whether the modification resolved the issue on your end—it would be greatly appreciated.

neelkanth-kaushik avatar May 20 '25 08:05 neelkanth-kaushik

Yes it seems to work. What will be ETA for this release? a hotfix maybe?

awaisjamil-mp avatar May 20 '25 09:05 awaisjamil-mp

@awaisjamil-mp It is released. Please update to version 1.1.7.

neelkanth-kaushik avatar May 21 '25 13:05 neelkanth-kaushik