I just had a presubmit flake on a Pigeon integration test:
00:14 +296: event channels handle multiple instances
══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
The following StateError was thrown during a platform message callback:
Bad state: Cannot add new events after calling close
When the exception was thrown, this was the stack:
#1 EventChannel.receiveBroadcastStream.<anonymous closure>.<anonymous closure> (package:flutter/src/services/platform_channel.dart:704:26)
#2 _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:665:35)
#3 _invoke2.<anonymous closure> (dart:ui/hooks.dart:391:15)
#7 _invoke2 (dart:ui/hooks.dart:390:10)
#8 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45:5)
#9 _Channel.push (dart:ui/channel_buffers.dart:136:31)
#10 ChannelBuffers.push (dart:ui/channel_buffers.dart:344:17)
#11 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:819:22)
#12 _dispatchPlatformMessage (dart:ui/hooks.dart:302:31)
(elided 4 frames from dart:async)
════════════════════════════════════════════════════════════════════════════════════════════════════
00:14 +296 -1: event channels handle multiple instances [E]
It looks like we probably have a race condition in test teardown.
I just had a presubmit flake on a Pigeon integration test:
It looks like we probably have a race condition in test teardown.