-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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 daemon" leaves orphaned "xcdevice observe" processes around after being terminated #73859
Comments
flutter doctor -v[✓] Flutter (Channel master, 1.26.0-2.0.pre.313, on macOS 11.1 20C69 darwin-x64, locale en-GB)
• Flutter version 1.26.0-2.0.pre.313 at /Users/tahatesser/Code/flutter_master
• Framework revision 1cb0a24a46 (10 hours ago), 2021-01-12 21:39:27 -0800
• Engine revision 10cee6abcb
• Dart version 2.12.0 (build 2.12.0-214.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Volumes/Extreme/SDK
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Volumes/Extreme/SDK
• 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-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1
[✓] Connected device (4 available)
• Taha’s iPad (mobile) • 00008020-000255113EE8402E • ios • iOS 14.3
• iPhone 12 (mobile) • 2FC46D8B-2A58-4ABB-B3FF-76F1AEC857FF • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 11.1 20C69 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.141
• No issues found! |
I also am seeing the same behavior on Flutter 2.0.0 still 😞: $ ps
PID TTY TIME CMD
4058 ttys000 0:00.72 -zsh
6684 ttys001 0:00.09 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
... $ flutter --version
Flutter 2.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 60bd88df91 (21 hours ago) • 2021-03-03 09:13:17 -0800
Engine • revision 40441def69
Tools • Dart 2.12.0 |
Same here! ✗ ps
PID TTY TIME CMD
28918 ttys000 0:00.37 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
894 ttys001 0:00.43 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
3580 ttys002 0:00.43 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
57240 ttys003 0:00.38 /bin/zsh -l
57437 ttys004 0:00.27 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
68599 ttys005 0:00.25 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
89164 ttys006 0:00.17 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both flutter doctor Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 2.1.0-12.2.pre, on macOS 11.1 20C69 darwin-x64, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.55.0)
[✓] Connected device (2 available) |
still happening on flutter 2.10 |
I have the same problem, Does anyone have a solution? lol..........😑 |
I use this command to remove them every once in a while....
Not ideal but at least it cleans the mess.. |
Now Flutter leaves two orphaned processes instead of one per VS Code instance. Here is an example after opening a flutter project 3 times: 1670 ttys006 0:00.14 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --usb
1672 ttys009 0:00.14 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --wifi
1918 ttys005 0:00.13 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --usb
1920 ttys007 0:00.13 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --wifi
2214 ttys008 0:00.13 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --usb
2216 ttys010 0:00.13 /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --wifi using: |
This is why I got this message starting the Simulator:
This reduced the number of 1000 processes from 1380 down to 393 for me and I was able to start the simulator again without a restart. |
FYI, this issue no longer happen for me with the following setup:
When I close VS code of a Flutter project, no child processes are left behind. |
On my other notebook I also don't have this problem. |
Reproducible using the script provided in #73859 (comment)
flutter doctor -v
|
I can't repro this from the terminal (though that uses SIGINT on Ctrl+C and we generally), but from VS Code (which uses SIGTERM for all of its spawned processes) or the script below, the device daemon leaves behind some orphaned
xcdevice
proceses.The script spawns the daemon, waits 10 seconds, then calls
.kill()
. After it completes, a/Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
process remains. If I open/close lots of projects in VS Code, they will build up.I'm testing with the latest master branch.
The text was updated successfully, but these errors were encountered: