Uh oh!
There was an error while loading. Please reload this page.
Support mdns when attaching to proxied devices. - #146021
Conversation
Also move the vm service discovery logic into platform-specific implementation of `Device`s. This is to avoid having platform-specific code in attach.dart.
7f482ca to
13d0145Compare| }, | ||
| onError: (Object e) { | ||
| // Daemon throws string types. | ||
| if (e is String && e.contains('command not understood')) { |
There was a problem hiding this comment.
Is it safe to ignore other errors here?
There was a problem hiding this comment.
Good point. Forwarded the error to the stream instead.
Uh oh!
There was an error while loading. Please reload this page.
080de5a to
5541b8dCompare| timeout: const Duration(seconds: 30), | ||
| slowWarningCallback: () { | ||
| // If relying on mDNS to find Dart VM Service, remind the user to allow local network permissions. | ||
| if (vmServiceDiscovery.usesMdns) { |
There was a problem hiding this comment.
This status message is only relevant to iOS devices.
| if (vmServiceDiscovery.usesMdns) { | |
| if (vmServiceDiscovery.usesMdns&&_isIOSDevice(device)) { |
There was a problem hiding this comment.
You made me realize that I misunderstood the comment and the message. I thought it was asking me to click "Allow" on the mac, when the dart binary wants to access network. It makes a lot more sense now.
In that case, usesMdns is not actually needed, I've removed that field. I also updated the comment and the message slightly to be clear that the permission.
Also updated _isIOSDevice below to check for device.platformType == PlatformType.ios instead of checking the type, to better support proxied devices.
PTAL, thanks!
| } on Exception { | ||
| isolateDiscoveryProtocol?.dispose(); | ||
| final List<ForwardedPort> ports = portForwarder.forwardedPorts.toList(); | ||
| ports.forEach(portForwarder.unforward); |
There was a problem hiding this comment.
So previously, it was
flutter/packages/flutter_tools/lib/src/commands/attach.dart
Lines 309 to 311 in 137cb4b
Does putting it in a forEach wait for each?
There was a problem hiding this comment.
On re-reading the code, the try-catch was not added in the right place. I have moved it to the Stream<Uri> get uris getter below, and added the await back.
Thanks.
christopherfujino
left a comment
There was a problem hiding this comment.
This LGTM but I'll defer to Victoria for final approval (she knows this code the best)
Removed `usesMdns`, and restore platform checking in attach.dart when showing the message asking user to allow network access on device. Fix error handling in FuchsiaDevice.
vashworth
commented
Apr 9, 2024
Analyzer issue in test |
chingjun
commented
Apr 9, 2024
Oops, missed that one. Fixed, thanks for the review! |
flutter/flutter@4967a94...97cd47a 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from eaf73cd39cf8 to cee489a4e275 (2 revisions) (flutter/flutter#146541) 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from e4e274898efc to eaf73cd39cf8 (6 revisions) (flutter/flutter#146538) 2024-04-09 goderbauer@google.com Correct doc for AnimationMin (flutter/flutter#146531) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5dca50d3e268 to e4e274898efc (2 revisions) (flutter/flutter#146527) 2024-04-09 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.2.0 to 4.3.0 (flutter/flutter#146528) 2024-04-09 leroux_bruno@yahoo.fr Fix InputDecorator label position ignore visual density (flutter/flutter#146488) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5a824e22deb2 to 5dca50d3e268 (10 revisions) (flutter/flutter#146524) 2024-04-09 chingjun@google.com Support mdns when attaching to proxied devices. (flutter/flutter#146021) 2024-04-09 jacksongardner@google.com Fix skwasm tests (flutter/flutter#145570) 2024-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#146515) 2024-04-09 engine-flutter-autoroll@skia.org Roll Packages from 6b4d8b6 to 17f55d3 (6 revisions) (flutter/flutter#146508) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Also move the vm service discovery logic into platform-specific implementation of `Device`s. This is to avoid having platform-specific code in attach.dart.
flutter/flutter@4967a94...97cd47a 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from eaf73cd39cf8 to cee489a4e275 (2 revisions) (flutter/flutter#146541) 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from e4e274898efc to eaf73cd39cf8 (6 revisions) (flutter/flutter#146538) 2024-04-09 goderbauer@google.com Correct doc for AnimationMin (flutter/flutter#146531) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5dca50d3e268 to e4e274898efc (2 revisions) (flutter/flutter#146527) 2024-04-09 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.2.0 to 4.3.0 (flutter/flutter#146528) 2024-04-09 leroux_bruno@yahoo.fr Fix InputDecorator label position ignore visual density (flutter/flutter#146488) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5a824e22deb2 to 5dca50d3e268 (10 revisions) (flutter/flutter#146524) 2024-04-09 chingjun@google.com Support mdns when attaching to proxied devices. (flutter/flutter#146021) 2024-04-09 jacksongardner@google.com Fix skwasm tests (flutter/flutter#145570) 2024-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#146515) 2024-04-09 engine-flutter-autoroll@skia.org Roll Packages from 6b4d8b6 to 17f55d3 (6 revisions) (flutter/flutter#146508) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@4967a94...97cd47a 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from eaf73cd39cf8 to cee489a4e275 (2 revisions) (flutter/flutter#146541) 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from e4e274898efc to eaf73cd39cf8 (6 revisions) (flutter/flutter#146538) 2024-04-09 goderbauer@google.com Correct doc for AnimationMin (flutter/flutter#146531) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5dca50d3e268 to e4e274898efc (2 revisions) (flutter/flutter#146527) 2024-04-09 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.2.0 to 4.3.0 (flutter/flutter#146528) 2024-04-09 leroux_bruno@yahoo.fr Fix InputDecorator label position ignore visual density (flutter/flutter#146488) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5a824e22deb2 to 5dca50d3e268 (10 revisions) (flutter/flutter#146524) 2024-04-09 chingjun@google.com Support mdns when attaching to proxied devices. (flutter/flutter#146021) 2024-04-09 jacksongardner@google.com Fix skwasm tests (flutter/flutter#145570) 2024-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#146515) 2024-04-09 engine-flutter-autoroll@skia.org Roll Packages from 6b4d8b6 to 17f55d3 (6 revisions) (flutter/flutter#146508) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@4967a94...97cd47a 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from eaf73cd39cf8 to cee489a4e275 (2 revisions) (flutter/flutter#146541) 2024-04-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from e4e274898efc to eaf73cd39cf8 (6 revisions) (flutter/flutter#146538) 2024-04-09 goderbauer@google.com Correct doc for AnimationMin (flutter/flutter#146531) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5dca50d3e268 to e4e274898efc (2 revisions) (flutter/flutter#146527) 2024-04-09 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.2.0 to 4.3.0 (flutter/flutter#146528) 2024-04-09 leroux_bruno@yahoo.fr Fix InputDecorator label position ignore visual density (flutter/flutter#146488) 2024-04-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5a824e22deb2 to 5dca50d3e268 (10 revisions) (flutter/flutter#146524) 2024-04-09 chingjun@google.com Support mdns when attaching to proxied devices. (flutter/flutter#146021) 2024-04-09 jacksongardner@google.com Fix skwasm tests (flutter/flutter#145570) 2024-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#146515) 2024-04-09 engine-flutter-autoroll@skia.org Roll Packages from 818c2f3 to fb1560f (6 revisions) (flutter/flutter#146508) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Also move the vm service discovery logic into platform-specific implementation of
Devices. This is to avoid having platform-specific code in attach.dart.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.