Skip to content
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

Issue when starting Patrol tests on iOS physical (real) device #1828

Open
proximilian opened this issue Oct 24, 2023 · 6 comments
Open

Issue when starting Patrol tests on iOS physical (real) device #1828

proximilian opened this issue Oct 24, 2023 · 6 comments
Labels
platform: ios iOS is affected

Comments

@proximilian
Copy link

Steps to reproduce

I tried running my Patrol tests on iOS real(physical) device, but hit some problem - please refer to logs. Despite that, all tests are running without any issues at Android devices. Flavors are used as well.
Here is some additional info:

  • MacBook Pro
  • chip: Apple M1 Pro
  • Xcode Version 14.3 (14E222b)
  • Android Studio Giraffe 2022.3.1

Actual results

Tests start successfully but soon become in waiting state and need to be killed -> refer to log.

Logs

Logs
2023-10-23 15:29:03.144 xcodebuild[57854:1999630]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> updated testing environment variables {
            "RUN_DESTINATION_DEVICE_ECID" = 2703901095404;
            "RUN_DESTINATION_DEVICE_NAME" = "ivan\U2019s iPhone";
            "RUN_DESTINATION_DEVICE_PLATFORM_IDENTIFIER" = "com.apple.platform.iphoneos";
            "RUN_DESTINATION_DEVICE_UDID" = f0a8ebbbb669e6ac637ba2988c0649c643ed9674;
            XCTestBundlePath = "PlugIns/RunnerUITests.xctest";
            XCTestConfigurationFilePath = "";
            XCTestSessionIdentifier = "3C00F336-0DD8-4CD4-9179-8EB5434DAC35";
        }
        2023-10-23 15:29:03.146 xcodebuild[57854:1999652]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:03.220 xcodebuild[57854:1999657]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.255 xcodebuild[57854:1999657]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.260 xcodebuild[57854:1999657]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.261 xcodebuild[57854:1999657]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:03.265 xcodebuild[57854:1999652]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.382 xcodebuild[57854:1999652]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.452 xcodebuild[57854:1999652]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.457 xcodebuild[57854:1999652]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:03.457 xcodebuild[57854:1999652]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:03.867183+0300 RunnerUITests-Runner[13751:2111357] Running tests...
        2023-10-23 15:29:07.621659+0300 RunnerUITests-Runner[13751:2111357] PatrolServer: INFO: PATROL_PORT is null, falling back to default (8081)
        2023-10-23 15:29:07.622004+0300 RunnerUITests-Runner[13751:2111357] PatrolServer: INFO: PatrolServer constructor called
        2023-10-23 15:29:07.622114+0300 RunnerUITests-Runner[13751:2111357] PatrolServer: INFO: PATROL_ENABLED flag is defined
        2023-10-23 15:29:07.624348+0300 RunnerUITests-Runner[13751:2111357] PatrolServer: INFO: Starting server...
        2023-10-23 15:29:07.628552+0300 RunnerUITests-Runner[13751:2111357] PatrolServer: INFO: Server started on http://0.0.0.0:8081
        2023-10-23 15:29:07.628745+0300 RunnerUITests-Runner[13751:2111357] PatrolAppServiceClient: created, port: 8082
            t =      nans Checking existence of `"Allow" Button`
            t =      nans Ignoring failure to get hierarchy for remote element in process 4772 (Error getting main window kAXErrorServerNotFound)
            t =      nans Open bg.pb.pbmobile.sit
            t =      nans     Launch bg.pb.pbmobile.sit
            t =      nans         Terminate bg.pb.pbmobile.sit:13184
        2023-10-23 15:29:08.925 xcodebuild[57854:1999657]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> installing bg.pb.pbmobile.sit using MobileInstall
        2023-10-23 15:29:08.927 xcodebuild[57854:2000135]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:08.931 xcodebuild[57854:2000135]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:09.004 xcodebuild[57854:2000135]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:09.009 xcodebuild[57854:2000135]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:09.011 xcodebuild[57854:2000135]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:09.011 xcodebuild[57854:2000135]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:09.014 xcodebuild[57854:2000140]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> app uninstall set - {(
        )}
        2023-10-23 15:29:09.014 xcodebuild[57854:2000140]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> app install set - {(
<DVTFilePath:0x60000173a220:'/Users/ivan.stoyanov/AndroidStudioProjects/mobile-application-flutter/apps/pbmobile/build/ios_integ/Build/Products/Release-sit-iphoneos/Runner.app'>
        )}
        2023-10-23 15:29:25.529 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: MISProvisioningProfileInstalled
        2023-10-23 15:29:25.529 xcodebuild[57854:2000340]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:25.533 xcodebuild[57854:2000340]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:25.611 xcodebuild[57854:2000340]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:25.678 xcodebuild[57854:2000340]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:25.680 xcodebuild[57854:2000340]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:25.680 xcodebuild[57854:2000340]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.782 elapsed -- Processing install set completed.
        2023-10-23 15:29:28.796 xcodebuild[57854:2000326]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 0.000 sec, +0.000 sec -- start
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 0.002 sec, +0.002 sec -- Installing "Runner.app"
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 15.097 sec, +15.095 sec -- Performed Action: TransferringPackage
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 15.097 sec, +0.000 sec -- Performed Action: CreatingStagingDirectory
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 15.097 sec, +0.000 sec -- Performed Action: ExtractingPackage
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 15.109 sec, +0.012 sec -- Performed Action: InspectingPackage
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 15.140 sec, +0.031 sec -- Performed Action: TakingInstallLock
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 15.140 sec, +0.000 sec -- Performed Action: PreflightingApplication
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 16.486 sec, +1.346 sec -- Performed Action: PatchingApplication
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 16.497 sec, +0.011 sec -- Performed Action: InstallingEmbeddedProfile
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.022 sec, +2.525 sec -- Performed Action: VerifyingApplication
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.031 sec, +0.009 sec -- Performed Action: CreatingContainer
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.044 sec, +0.013 sec -- Performed Action: InstallingApplication
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.045 sec, +0.001 sec -- Performed Action: PostflightingApplication
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.058 sec, +0.014 sec -- Performed Action: SandboxingApplication
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.781 sec, +0.723 sec -- Performed Action: GeneratingApplicationMap
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.782 sec, +0.001 sec -- Done installing "Runner.app"
        2023-10-23 15:29:28.796 xcodebuild[57854:2000140]  AppInstallation: 19.782 sec, +0.000 sec -- end
        2023-10-23 15:29:28.798 xcodebuild[57854:2000326]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:28.835 xcodebuild[57854:2000326]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.014 xcodebuild[57854:2000326]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.015 xcodebuild[57854:2000326]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.015 xcodebuild[57854:2000326]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:29.018 xcodebuild[57854:1999657]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> fetching applications...
        2023-10-23 15:29:29.018 xcodebuild[57854:2000140]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:29.021 xcodebuild[57854:2000140]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.075 xcodebuild[57854:2000140]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.207 xcodebuild[57854:1999650]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.208 xcodebuild[57854:1999650]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:29.209 xcodebuild[57854:2000339]  DTDeviceKit: DTDKExecuteInSession() entering session limit gate
        2023-10-23 15:29:29.209 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.210 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.210 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.210 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.210 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.210 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.211 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.212 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.212 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.212 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.212 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.212 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.212 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.213 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.213 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.213 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.213 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.213 xcodebuild[57854:2000341]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.326 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.327 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.327 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.327 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.365 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.365 xcodebuild[57854:2000140]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.365 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.366 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.366 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.367 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.367 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.367 xcodebuild[57854:2000326]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.368 xcodebuild[57854:2000135]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.368 xcodebuild[57854:1999657]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> done fetching applications...
        2023-10-23 15:29:29.368 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.369 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.369 xcodebuild[57854:1999618]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.mobile.application_installed
        2023-10-23 15:29:29.369 xcodebuild[57854:1999657]  iPhoneConnect: 📱<DVTiOSDevice (0x1366ffbb0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> remoteExecutable setInstalledPath:/private/var/containers/Bundle/Application/37729CAD-684B-45B1-800B-854A3EA9C335/Runner.app
        2023-10-23 15:29:29.372 xcodebuild[57854:2000140]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:29.372 xcodebuild[57854:2000140]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:29.374 xcodebuild[57854:1999650]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.079 xcodebuild[57854:1999650]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.353 xcodebuild[57854:1999650]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.360 xcodebuild[57854:1999650]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.361 xcodebuild[57854:1999650]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-23 15:29:30.367 xcodebuild[57854:2000339]  DTDeviceKit: Started connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.454 xcodebuild[57854:2000339]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.604 xcodebuild[57854:2000339]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.611 xcodebuild[57854:2000339]  DTDeviceKit: Ending connection with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:29:30.611 xcodebuild[57854:2000339]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
            t =      nans         Setting up automation session
            t =      nans         Wait for bg.pb.pbmobile.sit to idle
        2023-10-23 15:34:31.798 xcodebuild[57854:2004293]  DTDeviceKit: Device f0a8ebbbb669e6ac637ba2988c0649c643ed9674 received darwin note: com.apple.system.powersources.percent
        2023-10-23 15:34:31.929 xcodebuild[57854:2004293]  DTDeviceKit: Started session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674
        2023-10-23 15:34:31.935 xcodebuild[57854:2004293]  DTDeviceKit: Ending session with f0a8ebbbb669e6ac637ba2988c0649c643ed9674

Patrol version

patrol: 2.3.1
patrol_cli: 2.2.1

Patrol Doctor output

Patrol Doctor output
Patrol CLI version: 2.2.1
Program adb not found 
Env var $ANDROID_HOME is not set
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller not found (install with `brew install ideviceinstaller`)

Flutter Doctor output

Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.2 22D49 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2022.3.1)
[✓] Connected device (3 available)
[✓] Network resources
@bartekpacia
Copy link
Contributor

Hi @proximilian 👋🏻

Tests start successfully but soon become in waiting state

Could you clarify this? Do some of them run? Is the moment when they "get stuck" seemingly random?

@bartekpacia bartekpacia added the platform: ios iOS is affected label Oct 25, 2023
@bartekpacia
Copy link
Contributor

For now, I recommend you try out latest dev versions:

I fixed a race condition in this release. It might be the cause of the problem, but if not, we'll keep looking.

@proximilian
Copy link
Author

Hi @proximilian 👋🏻

Tests start successfully but soon become in waiting state

Could you clarify this? Do some of them run? Is the moment when they "get stuck" seemingly random?

No. After run of 'patrol test' the app was built OK. The test was started successfully and let's say at the first screen it got stuck. So I can't consider the moment as random.

@proximilian
Copy link
Author

proximilian commented Oct 26, 2023

For now, I recommend you try out latest dev versions:

I fixed a race condition in this release. It might be the cause of the problem, but if not, we'll keep looking.

Hi @bartekpacia
Thank you again for your quick response.
We've tried the latest dev versions, but unfortunately now even the app hasn't been loaded during the test. Please see the log below:

2023-10-26 11:48:10.402 xcodebuild[8327:34975]  DTDeviceKit: DTDKExecuteInSession() exiting session limit gate
        2023-10-26 11:49:14.335 xcodebuild[8327:36370]  iPhoneConnect: 📱<DVTiOSDevice (0x110d066e0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> notified that pid 22905 terminated with signal 9
        2023-10-26 11:49:14.335 xcodebuild[8327:34510] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x110d066e0), ivan’s iPhone, iPhone, 15.7.9 (19H365), f0a8ebbbb669e6ac637ba2988c0649c643ed9674> ############## DID EXECUTE #################
        2023-10-26 11:49:14.348 xcodebuild[8327:34510] [MT] IDETestOperationsObserverDebug: 81.316 elapsed -- Testing started completed.
        2023-10-26 11:49:14.348 xcodebuild[8327:34510] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
        2023-10-26 11:49:14.348 xcodebuild[8327:34510] [MT] IDETestOperationsObserverDebug: 81.316 sec, +81.316 sec -- end
        Test session results, code coverage, and logs:
                /Users/ivan.stoyanov/AndroidStudioProjects/mobile-application-flutter/apps/pbmobile/build/ios_results_1698310070831.xcresult
        Testing failed:
                RunnerUITests-Runner (22905) encountered an error (Exception raised during test suite construction: _XCTestCaseInterruptionException: Interrupting test
        Exception callstack: (
                0   CoreFoundation                      0x0000000181677c74 717D70C9-3B8E-3ABC-AE16-050588FC3EE8 + 601204
                1   libobjc.A.dylib                     0x0000000198ea3ee4 objc_exception_throw + 56
                2   CoreFoundation                      0x00000001816cae64 717D70C9-3B8E-3ABC-AE16-050588FC3EE8 + 941668
                3   XCUIAutomation                      0x00000001033bb920 XCUIInterruptCurrentTestWithIssue + 76
                4   XCUIAutomation                      0x00000001033bbb80 _XCUIFailWithError + 360
                5   XCUIAutomation                      0x00000001033a36ac __32-[XCUIApplicationImpl terminate]_block_invoke + 596
                6   XCTestCore                          0x000000010322ae08 -[XCTContext _runActivityNamed:type:block:] + 196
                7   XCTestCore                          0x0000000103229d20 -[XCTContext runInternalActivityNamed:block:] + 124
                8   XCUIAutomation                      0x00000001033a33f4 -[XCUIApplicationImpl terminate] + 204
                9   XCUIAutomation                      0x00000001033a195c __42-[XCUIApplicationImpl _launchWithRequest:]_block_invoke + 148
                10  XCTestCore                          0x000000010322ae08 -[XCTContext _runActivityNamed:type:block:] + 196
                11  XCTestCore                          0x0000000103229d20 -[XCTContext runInternalActivityNamed:block:] + 124
                12  XCUIAutomation                      0x00000001033a1880 -[XCUIApplicationImpl _launchWithRequest:] + 224
                13  XCTestCore                          0x000000010322ae08 -[XCTContext _runActivityNamed:type:block:] + 196
                14  XCTestCore                          0x0000000103229d20 -[XCTContext runInternalActivityNamed:block:] + 124
                15  XCUIAutomation                      0x00000001033a1300 -[XCUIApplicationImpl serviceOpenRequest:] + 344
                16  XCUIAutomation                      0x00000001033b67b0 -[XCUIApplication _launchUsingXcode:withoutAccessibility:launchURL:] + 296
                17  RunnerUITests                       0x000000010761f354 +[RunnerUITests testInvocations] + 552
                18  XCTestCore                          0x00000001032443d0 +[XCTestCase _testInvocationDescriptors] + 72
                19  XCTestCore                          0x000000010322c624 +[XCTestSuite testSuiteForTestCaseClass:] + 272
                20  XCTestCore                          0x000000010322bec0 +[XCTestSuite suitesForBundlesIncludingEmptySuites:] + 328
                21  XCTestCore                          0x000000010322e44c -[XCTestSuite _initWithTestConfiguration:] + 324
                22  XCTestCore                          0x000000010322e9f0 +[XCTestSuite testSuiteForTestConfiguration:] + 48
                23  XCTestCore                          0x00000001031ffe58 __53-[XCTTestRunSession initWithTestConfiguration:error:]_block_invoke_2 + 64
                24  XCTestCore                          0x000000010322b344 +[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172
                25  XCTestCore                          0x000000010322b270 +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 140
                26  XCTestCore                          0x00000001031ffe04 __53-[XCTTestRunSession initWithTestConfiguration:error:]_block_invoke + 96
                27  XCTestCore                          0x00000001031ffb4c +[XCTTestRunSession performTestSuiteConstructionInBlock:] + 52
                28  XCTestCore                          0x00000001031ffcdc -[XCTTestRunSession initWithTestConfiguration:error:] + 188
                29  XCTestCore                          0x0000000103200970 -[XCTTestRunSessionProvider executionExtensionWithTestConfiguration:reportingSession:completion:] + 80
                30  XCTestCore                          0x0000000103204958 __128+[XCTExtensionProvider(XCTExecutionExtension_Internal) allExecutionExtensionsWithTestConfiguration:reportingSession:completion:]_block_invoke + 120
                31  XCTestCore                          0x000000010323b27c __69-[NSArray(XCTestAdditions) xct_arrayByApplyingAsyncBlock:completion:]_block_invoke + 156
                32  XCTestCore                          0x000000010323b3d4 __XCTAsyncEnumerate_block_invoke.18 + 52
                33  XCTestCore                          0x000000010323b0b8 -[NSArray(XCTestAdditions) xct_arrayByApplyingAsyncBlock:completion:] + 628
                34  XCTestCore                          0x0000000103204848 +[XCTExtensionProvider allExecutionExtensionsWithTestConfiguration:reportingSession:completion:] + 280
                35  XCTestCore                          0x000000010322832c -[XCTestDriver _runTests] + 588
                36  XCTestCore                          0x00000001031ff144 _XCTestMain + 84
                37  RunnerUITests-Runner                0x0000000102cedd0c -[_XCTRunnerAppDelegate application:didFinishLaunchingWithOptions:] + 0
                38  CoreFoundation                      0x000000018165268c 717D70C9-3B8E-3ABC-AE16-050588FC3EE8 + 448140
                39  CoreFoundation                      0x00000001816534b0 717D70C9-3B8E-3ABC-AE16-050588FC3EE8 + 451760
                40  CoreFoundation                      0x00000001815efe1c 717D70C9-3B8E-3ABC-AE16-050588FC3EE8 + 44572
                41  CoreFoundation                      0x0000000181603174 CFRunLoopRunSpecific + 572
                42  GraphicsServices                    0x00000001a211e988 GSEventRunModal + 160
                43  UIKitCore                           0x0000000183e05a88 36AE0870-FED0-3B87-8A60-BB2EE5192744 + 5134984
                44  UIKitCore                           0x0000000183b9ef78 UIApplicationMain + 336
                45  RunnerUITests-Runner                0x0000000102cedec0 main + 160
                46  dyld                                0x0000000102d8c4d0 start + 444
        ). If you believe this error represents a bug, please attach the result bundle at /Users/ivan.stoyanov/AndroidStudioProjects/mobile-application-flutter/apps/pbmobile/build/ios_results_1698310070831.xcresult)
        ** TEST EXECUTE FAILED **
        Testing started
✗ Failed to execute tests of app with entrypoint test_bundle.dart for iOS device on device ivan’s iPhone (xcodebuild exited with code 65) (83.6s)
Error: xcodebuild exited with code 65
0      throwToolExit (package:patrol_cli/src/base/exceptions.dart:7:3)
1      IOSTestBackend.execute.<anonymous closure> (package:patrol_cli/src/ios/ios_test_backend.dart:188:9)
<asynchronous suspension>
2      DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:46:7)
<asynchronous suspension>
3      IOSTestBackend.execute (package:patrol_cli/src/ios/ios_test_backend.dart:148:5)
<asynchronous suspension>
4      TestCommand._execute (package:patrol_cli/src/commands/test.dart:277:7)
<asynchronous suspension>
5      TestCommand.run (package:patrol_cli/src/commands/test.dart:169:23)
<asynchronous suspension>
6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
7      PatrolCommandRunner.runCommand (package:patrol_cli/src/runner/patrol_command_runner.dart:321:18)
<asynchronous suspension>
8      PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:265:18)
<asynchronous suspension>
9      patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:77:20)
<asynchronous suspension>
10     main (file:///Users/ivan.stoyanov/.pub-cache/hosted/pub.dev/patrol_cli-2.3.0-dev.1/bin/main.dart:6:20)
<asynchronous suspension>
 
See the logs above to learn what happened. Also consider running with --verbose. If the logs still aren't useful, then it's a bug - please report it.

@bartekpacia
Copy link
Contributor

bartekpacia commented Oct 26, 2023

Thanks for trying it out – that's actually pretty worrying. But hey, that's why it's on a dev channel.

We've seen reports of problems very similar to yours over the last few weeks, but we have not yet found the root cause. The best thing you could do is to try set up a new Flutter app project, set up Patrol for iOS in it, and try to reproduce this issue. If you succeed, share the repo with us, and we'll investigate.

Another clarifying question:

  • does this issue occur on iOS simulator as well?
  • what's your Xcode version, and iOS simulator version?
  • what's the iOS version of the physical device you previously ran your tests on?

@proximilian
Copy link
Author

Thanks for trying it out – that's actually pretty worrying. But hey, that's why it's on a dev channel.

We've seen reports of problems very similar to yours over the last few weeks, but we have not yet found the root cause. The best thing you could do is to try set up a new Flutter app project, set up Patrol for iOS in it, and try to reproduce this issue. If you succeed, share the repo with us, and we'll investigate.

Another clarifying question:

  • does this issue occur on iOS simulator as well?
  • what's your Xcode version, and iOS simulator version?
  • what's the iOS version of the physical device you previously ran your tests on?

Hello, @bartekpacia
Please find below answers to your questions:

  • In my case a Simulator cannot be applied as the project is using a library that is not compatible with iOS Simulators. The app is not able to be built under such conditions. Only physical iOS devices are possible.
  • XCode Version 14.3 (994), SimulatorKit 629, CoreSimulator 885.2
  • It is the first time when the tests are tried to be run on iOS physical device. Never run before. So far tests were run only on Android emulators and everything there was OK. As regards to the iOS device used currently: iPhone 6s iOS15.7.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ios iOS is affected
Projects
None yet
Development

No branches or pull requests

2 participants