Repository navigation
flutter drive CI tests fail targeting iOS 14, stuck on local network permission popup #65207
Description
Activity
- addedt: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testc: contributor-productivityTeam-specific productivity, code health, technical debt.Team-specific productivity, code health, technical debt.toolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.P2Important issues not at the top of the work listImportant issues not at the top of the work list
on Sep 3, 2020 I'm really not sure how to fix this in a driver CI setup where there's no person to tap the button on the device. The app itself doesn't have access to that popup (or that would defeat the purpose of forcing the user to allow the app to do things). Even the integration_test package is an
XCTest, so it also doesn't have access to SpringBoard popups. That package would need to convert to XCUITests to pull a trick like:
https://github.com/flutter/cocoon/blob/13876a4f9e4ba48be5fbbbec8940b9528482f77d/agent/tool/infra-dialog/infra-dialogUITests/infra_dialogUITests.swift#L12let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
One guess/untested solution for xctest is we could potentially force the uri via --*-vmservice-port and --vmservice-port-file and some combination of (these things have been changing recently) to connect to. Some plumbing may be needed for the driver mechanism.
I think that suggested port always gets passed in now. You're saying the engine should detect it's being
driven and not publish the port? And we rely on other discovery mechanisms?Somewhat, we don't need the bonjour mechanism if we know the observatory uri. There's no permissions needed to just open a listen port for the observatory. There's probably various plumbing needed but we could attempt to not add the plist entry for driven tests, have the tool write out the uri to a file (I didn't know we had the --vmservice-port-file flag but it seems like that's what it's for) and let the tool watch for that file when trying to connect during the drive than waiting for mdns.
- changed the title
[-]flutter drive tests fail targeting iOS 14, stuck on local network permission popup[/-][+]flutter drive CI tests fail targeting iOS 14, stuck on local network permission popup[/+]on Sep 15, 2020 The tool already passes in a suggested port, and that's the first one that gets tried. #49735. But I guess the port-file is for getting
attachworking.Ah cool, it even does
--disable-service-auth-codeswish would be the next blocker I'd assume. I'm not sure it works since I always see an auth path in the observatory URI in the console. If it does, maybe we just need another flag to disable the new xcode_backend.sh function in flutter run. If the design of #49735 is sound, maybe there's just a bug?the --vmservice-out-file doesn't seem to make sense unfortunately. It seems like it's just writing it after finding the vmservice https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/run_hot.dart#L285.
the --vmservice-out-file doesn't seem to make sense unfortunately. It seems like it's just writing it after finding the vmservice https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/run_hot.dart#L285.
Not for
flutter drive, but it makes sense if youflutter runthenflutter attachor something like that.Right. That one's not very useful for this case it seems.
- addedP1High-priority issues at the top of the work listHigh-priority issues at the top of the work listand removedP2Important issues not at the top of the work listImportant issues not at the top of the work list
on Sep 17, 2020 Does #66092 mean that we might decrease the need for the additional plist line and the dialog for the standard production use case if we can pull it out via the debugger and connect to the debug-uri/observatory uri directly?
@xster Yes, at least for
run/drive, that's the hope!Reacted by xsterDoes #66092 unblock us on this now?
#67452 and flutter-team-archive/engine#21632 are merged.
flutter driveno longer prompts the permission dialog.This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 11, 2021
On iOS 14, launching a debug/profile Flutter app will prompt the user to allow local network access when the observatory publishes:
Steps to Reproduce
and the test will time out.
If you hit OK in the dialog, the tests run and pass.