New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flutter_test framework does not run isolates/handle isolate message sending properly #21093
Labels
a: tests
"flutter test", flutter_test, or one of our tests
dependency: dart
Dart team may need to help us
found in release: 3.5
Found to occur in 3.5
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
P2
Important issues not at the top of the work list
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Comments
zoechi
added
the
tool
Affects the "flutter" command-line tool. See also t: labels.
label
Feb 13, 2019
cc @jonahwilliams Not sure if you are the right person to ping on this, but remembered this bug existed! |
jonahwilliams
removed
the
tool
Affects the "flutter" command-line tool. See also t: labels.
label
May 23, 2020
iapicca
added
dependency: dart
Dart team may need to help us
framework
flutter/packages/flutter repository. See also f: labels.
labels
Jul 1, 2020
Hi @GaryQian codeimport 'package:flutter_test/flutter_test.dart';
import 'dart:isolate';
child(args) {
var msg = args[0];
var reply = args[1];
print("msg = $msg, reply = $reply");
reply.send('re: $msg');
}
void main([args, port]) {
test('message - reply chain', () {
ReceivePort port = ReceivePort();
port.listen((msg) {
print("Received msg + $msg");
port.close();
});
Isolate.spawn(child, ['hi', port.sendPort]);
});
}
logs nevercode@Nevercodes-Air ~/Desktop/projects/master flutter_master test ✔ 2723 14:37:53
00:02 +1: All tests passed! doctor[✓] Flutter (Channel master, 1.21.0-2.0.pre.94, on Mac OS X 10.15.5 19F101, locale en-GB)
• Flutter version 1.21.0-2.0.pre.94 at /Users/nevercode/development/flutter_master
• Framework revision adc9dde3ba (12 hours ago), 2020-07-21 16:17:23 -0700
• Engine revision 5a73d4dc25
• Dart version 2.9.0 (build 2.9.0-21.0.dev 84e5eeaea4)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/nevercode/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.12.2
[✓] Connected device (4 available)
• iPhone 11 Pro Max (mobile) • D6967F45-CB0F-4D4E-AFD5-278816A21CAE • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
• macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.5 19F101
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 84.0.4147.89
• No issues found! the issue seems to persist |
iapicca
added
cp: 1.17 completed
found in release: 1.21
Found to occur in 1.21
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
and removed
cp: 1.17 completed
labels
Jul 22, 2020
This still seems to be the case using latest stable and master versions:
stable, master flutter doctor -v
|
darshankawar
added
found in release: 3.5
Found to occur in 3.5
and removed
found in release: 1.21
Found to occur in 1.21
labels
Oct 20, 2022
flutter-triage-bot
bot
added
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
labels
Jul 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: tests
"flutter test", flutter_test, or one of our tests
dependency: dart
Dart team may need to help us
found in release: 3.5
Found to occur in 3.5
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
P2
Important issues not at the top of the work list
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Isolates are unable to send and receive messages properly when running flutter_test tests. For example, even very simple ping-pong style messages either fail to send or the isolate may fail to run at all.
This simple example shows one of the symptoms of the issue where the 're: $msg' is never printed.
Other examples sometimes run the child isolate code, but the reply messages to the reply port fails to send.
The text was updated successfully, but these errors were encountered: