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
Ignore unreachable iOS devices in IOSDevice.getAttachedDevices #23776
Ignore unreachable iOS devices in IOSDevice.getAttachedDevices #23776
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
This is still not a solution to this problem ? |
@raisezhang I'm not sure what you mean but once this PR is merged it should fix I wouldn't call it a solution but rather a workaround until |
We should write a test for this. I believe the flutter_tools tests have the technology to mock processes which would help here. |
Yep. There's also some tests in
|
Thanks! I'll have a look. I'm somewhat new to Dart but it shouldn't be a problem to write some tests for this. I'll also have a look to catch the specific |
I added tests and specific exception handling. I chose to add a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending one small change.
LGTM. Will merge on green. |
This PR finally saved me! 🍻 |
Fixes #23341
Related:
In practice this means that
idevice_id -l
also lists udid's that are not actually attached via usb and have no debugging capabilities. When flutter tries to get device meta information usingideviceinfo -u UDID
it returns an exit code 255 causingfluttor doctor
and other flutter devices related API's to produce errors even though there are other attached devices / simulators that work fine.This PR basically ignores devices for which
ideviceinfo
fails to receive meta information but still allow devices that do provide meta information to be included.