flutter / flutter/flutter

[pigeon] Flake in integration tests

Open
#179,154 0 comments 0 reactions 0 assignees View on GitHub
c: contributor-productivity c: flake p: pigeon P2 package team-ecosystem triaged-ecosystem
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

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.. (package:flutter/src/services/platform_channel.dart:704:26)
#2 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:665:35)
#3 _invoke2. (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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.