grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
861 stars 271 forks source link

isTimelineLoggingEnabled causes "Unhandled Exception: Bad state: Uneven calls to start and finish" #491

Open jeduden opened 3 years ago

jeduden commented 3 years ago

when enabling isTimelineLoggingEnabled

Grpc Package Version: 3.0.0

Repro steps

  1. isTimelineLoggingEnabled = true
  2. execute grpc call

Expected result: Network call on timeline

Actual result: No Network call on time, instead a exception trace:

[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: Bad state: Uneven calls to start and finish
#0      TimelineTask.finish (dart:developer/timeline.dart:264:7)
#1      ClientCall._onResponseDone (package:grpc/src/client/call.dart:450:24)
#2      _rootRun (dart:async/zone.dart:1346:47)
#3      _CustomZone.run (dart:async/zone.dart:1258:19)
#4      _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#5      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:394:13)
#6      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:404:15)
#7      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#8      _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#9      _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#10     _HandlerEventSink.close (dart:async/stream_transformers.dart:238:12)
#11     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#12  <…>

Details

Using Flutter 2.2.2

mraleph commented 3 years ago

/fyi @bkonyi @kenzieschmoll