Skip to content

Conversation

@vashworth
Copy link
Contributor

@vashworth vashworth commented Jun 13, 2023

This PR fixes issue of duplicate entries from xcdevice list cause devices to not show in flutter devices, flutter run, etc.

When a duplicate entry is found, use the entry without errors as the authority. If both have errors, use the one with the higher SDK as the authority.

Fixes #128719.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 13, 2023
@vashworth vashworth marked this pull request as ready for review June 13, 2023 16:49
@hellohuanlin
Copy link
Contributor

To fix this, this PR changes so that all iOS 17 devices are considered wireless.

Have you considered treating all iOS 17 devices as usb connected? or is it arbitrary decision?

Duplicate entries from xcdevice list cause devices to not show in flutter devices, flutter run, etc.

Why do we have duplicate entries? Is it a new problem?

@vashworth
Copy link
Contributor Author

vashworth commented Jun 13, 2023

Have you considered treating all iOS 17 devices as usb connected? or is it arbitrary decision?

Yes, so the interface type influences some logic, such as launch arguments, whether to use MDNS, whether to forward port, etc. The wireless implementation of things will still work even if the device is plugged in. However, the usb implementation of things will not work if the device is not plugged in, which is why I decided to default it to wireless.

Why do we have duplicate entries? Is it a new problem?

Yes, I believe it to be a new problem introduced with Xcode 17. It's not clear why it's happening, or if it'll happen for everyone. It could be a bug with Xcode or the beta. I speculate it's because they implemented a new device connectivity stack and it's a bug/discrepancy.

@hellohuanlin
Copy link
Contributor

The wireless implementation of things will still work even if the device is plugged in. However, the usb implementation of things will not work if the device is not plugged in, which is why I decided to default it to wireless.

What happens if you turn off the device's wifi or bluetooth (or whatever wireless debugging uses)?

@vashworth
Copy link
Contributor Author

The wireless implementation of things will still work even if the device is plugged in. However, the usb implementation of things will not work if the device is not plugged in, which is why I decided to default it to wireless.

What happens if you turn off the device's wifi or bluetooth (or whatever wireless debugging uses)?

If you turn wifi off and the device is connected via USB, it still works. If you turn wifi off and the device is not connected via USB, it does not work, which is expected.

@vashworth
Copy link
Contributor Author

vashworth commented Jun 13, 2023

@hellohuanlin I decided to remove the wireless stuff for this PR. I realized that depending on which solution we do for ios-deploy will probably influence how we do wireless so I'm going to wait and do it in a future PR. This PR now just addresses the duplicates

@hellohuanlin
Copy link
Contributor

If you turn wifi off and the device is connected via USB, it still works. If you turn wifi off and the device is not connected via USB, it does not work, which is expected.

Oh i meant if you turn wifi off, and device is connected via USB, will the device be listed as wired or wireless?

@github-actions github-actions bot added the platform-ios iOS applications specifically label Jun 13, 2023
@vashworth vashworth changed the title Fix xcdevice issues from iOS 17 Fix duplicate devices from xcdevice with iOS 17 Jun 13, 2023
Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2023
@auto-submit auto-submit bot merged commit 25e98b5 into flutter:master Jun 20, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 21, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 22, 2023
Manual version of #4269

----

Roll Flutter from fc8856e to c40baf4 (57 revisions)

flutter/flutter@fc8856e...c40baf4

2023-06-21 [email protected] Roll Packages from 6e1918f to 0fdf05f (8 revisions) (flutter/flutter#129286)
2023-06-21 [email protected] move test ownership from zanderso -> tools team (flutter/flutter#129199)
2023-06-21 [email protected] Refactor `Analytics` global getter to point to context only (flutter/flutter#129196)
2023-06-21 [email protected] Roll Flutter Engine from cfbd3652532d to f973fb4636d3 (1 revision) (flutter/flutter#129253)
2023-06-21 [email protected] Roll Flutter Engine from 059643dcc8e3 to cfbd3652532d (1 revision) (flutter/flutter#129243)
2023-06-21 [email protected] Roll Flutter Engine from 5313ca367549 to 059643dcc8e3 (1 revision) (flutter/flutter#129240)
2023-06-21 [email protected] Roll Flutter Engine from 946f523859fe to 5313ca367549 (2 revisions) (flutter/flutter#129234)
2023-06-21 [email protected] Roll Flutter Engine from e5a860c5479c to 946f523859fe (2 revisions) (flutter/flutter#129232)
2023-06-21 [email protected] Relax `OverlayPortal` asserts (flutter/flutter#129053)
2023-06-21 [email protected] Roll Flutter Engine from adfc3af300a9 to e5a860c5479c (3 revisions) (flutter/flutter#129228)
2023-06-21 [email protected] Move all the firebase lab device configs to .ci.yaml. (flutter/flutter#129219)
2023-06-21 [email protected] Roll Flutter Engine from 7d4abb81ccd1 to adfc3af300a9 (2 revisions) (flutter/flutter#129225)
2023-06-20 [email protected] update resolution-aware asset docs links (flutter/flutter#128769)
2023-06-20 [email protected] Fix: Magnifier appears and won't dismiss (flutter/flutter#128545)
2023-06-20 [email protected] DecoratedSliver (flutter/flutter#127823)
2023-06-20 [email protected] Roll Flutter Engine from 666244148e89 to 7d4abb81ccd1 (1 revision) (flutter/flutter#129217)
2023-06-20 [email protected] Roll Flutter Engine from 06d0c08460e5 to 666244148e89 (2 revisions) (flutter/flutter#129208)
2023-06-20 [email protected] fixed PreferredSize constuctor invocations (flutter/flutter#128181)
2023-06-20 [email protected] Roll Flutter Engine from 1c16af76ca26 to 06d0c08460e5 (3 revisions) (flutter/flutter#129200)
2023-06-20 [email protected] Roll Flutter Engine from ec64672afd91 to 1c16af76ca26 (1 revision) (flutter/flutter#129197)
2023-06-20 [email protected] Roll Flutter Engine from 4444ede34a9c to ec64672afd91 (3 revisions) (flutter/flutter#129194)
2023-06-20 [email protected] Fix duplicate devices from xcdevice with iOS 17 (flutter/flutter#128802)
2023-06-20 [email protected] iOS info.plist template: make UIViewControllerBasedStatusBar to be true (flutter/flutter#128970)
2023-06-20 [email protected] Fix detection that tests are running on monorepo bots (flutter/flutter#129173)
2023-06-20 [email protected] Use the new `getIsolatePauseEvent` method from VM service to check for pause event. (flutter/flutter#128834)
2023-06-20 [email protected] Adding ScrollController support for Stepper widget (flutter/flutter#128814)
2023-06-20 [email protected] Roll Packages from 59d93d6 to 6e1918f (6 revisions) (flutter/flutter#129176)
2023-06-20 [email protected] Refactor generate_localizations_test.dart (flutter/flutter#128974)
2023-06-20 [email protected] [process] Add a design doc issue template. (flutter/flutter#128361)
2023-06-20 [email protected] Roll Flutter Engine from bd6d3fc90462 to 4444ede34a9c (1 revision) (flutter/flutter#129169)
2023-06-20 [email protected] Roll Flutter Engine from 73c4ba4240cc to bd6d3fc90462 (1 revision) (flutter/flutter#129168)
2023-06-20 [email protected] Roll Flutter Engine from 7ee874792067 to 73c4ba4240cc (1 revision) (flutter/flutter#129162)
2023-06-20 [email protected] Roll Flutter Engine from 6a6c8fb591f5 to 7ee874792067 (1 revision) (flutter/flutter#129160)
2023-06-20 [email protected] Add to API docs to explain what Assist and Suggestion chips are (flutter/flutter#129034)
2023-06-20 [email protected] Roll Flutter Engine from a91bb3f566b9 to 6a6c8fb591f5 (1 revision) (flutter/flutter#129158)
2023-06-20 [email protected] Roll Flutter Engine from e0d456d9251b to a91bb3f566b9 (1 revision) (flutter/flutter#129148)
2023-06-20 [email protected] Roll Flutter Engine from 55418e648958 to e0d456d9251b (1 revision) (flutter/flutter#129146)
2023-06-19 [email protected] Roll Flutter Engine from 84ecaa053ec6 to 55418e648958 (1 revision) (flutter/flutter#129145)
2023-06-19 [email protected] Roll Flutter Engine from 23a2c246600f to 84ecaa053ec6 (2 revisions) (flutter/flutter#129142)
2023-06-19 [email protected] Introduce MaterialState `color` property for chips (flutter/flutter#128584)
2023-06-19 [email protected] Roll Flutter Engine from 280491d4cc21 to 23a2c246600f (8 revisions) (flutter/flutter#129140)
2023-06-19 [email protected] Fix an ordering dependency in the flutter_tools upgrade test (flutter/flutter#129131)
2023-06-19 [email protected] Roll Flutter Engine from 164c6b49dfb5 to 280491d4cc21 (1 revision) (flutter/flutter#129102)
2023-06-19 [email protected] Fix `InputDecoration.applyDefaults` ignoring some properties (flutter/flutter#129010)
2023-06-19 [email protected] Roll Flutter Engine from d298f0bf720c to 164c6b49dfb5 (1 revision) (flutter/flutter#129100)
2023-06-19 [email protected] Roll Flutter Engine from 7ffa1355f718 to d298f0bf720c (24 revisions) (flutter/flutter#129092)
...

----
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS 17 physical device not found

3 participants