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

Patrol does not run with Xcode 16.2 and iOS 18.2 #2485

Open
Friesenjung opened this issue Jan 11, 2025 · 3 comments
Open

Patrol does not run with Xcode 16.2 and iOS 18.2 #2485

Friesenjung opened this issue Jan 11, 2025 · 3 comments
Labels
bug Something isn't working P1 High-priority issues at the top of the work list package: patrol_cli Related to the patrol_cli package platform: ios iOS is affected

Comments

@Friesenjung
Copy link

Steps to reproduce

  1. Install the newest Xcode Version (16.2) and load the newest iOS SDK 18.2
  2. Create Simulator for iPhone 15 with iOS 17.5
  3. Run Patrol with the example_test.dart
  4. See the results

Is there anything I can do to make it work?

Actual results

Some error occurs and the run does not complete. See logs.
Worth Mentioning the following warning printed in red:
2025-01-12 00:15:22.526 xcodebuild[3549:1888040] DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
2025-01-12 00:15:22.642 xcodebuild[3549:1888004] [MT] DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.

Logs

Logs
 patrol test --tags="iOS" -d "iPhone 15 Pro" -t integration_test/example_test.dart --verbose
Verbose mode enabled. More logs will be printed.
Received 1 test target(s)
Received test target: /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/integration_test/example_test.dart
Received tag(s): iOS
Generated entrypoint /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/integration_test/test_bundle.dart with 1 bundled test(s)
$ flutter --no-version-check --suppress-analytics devices --machine
Received 1 device(s) to run on
Received device: iPhone 15 Pro
$ flutter --suppress-analytics --no-version-check pub deps --style=list
Received 10 --dart-define(s) (0 custom, 10 internal)
Received internal --dart-define: PATROL_WAIT=0
Received internal --dart-define: PATROL_APP_PACKAGE_NAME=de.hexagonstudios.money_ops
Received internal --dart-define: PATROL_APP_BUNDLE_ID=de.hexagonstudios.moneyops
Received internal --dart-define: PATROL_ANDROID_APP_NAME=money_ops
Received internal --dart-define: PATROL_IOS_APP_NAME=money_ops
Received internal --dart-define: INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false
Received internal --dart-define: PATROL_TEST_LABEL_ENABLED=true
Received internal --dart-define: PATROL_TEST_SERVER_PORT=8081
Received internal --dart-define: PATROL_APP_SERVER_PORT=8082
Received internal --dart-define: COVERAGE_ENABLED=false
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
$ flutter build ios --no-version-check --suppress-analytics --config-only --no-codesign --debug --simulator --target /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/integration_test/test_bundle.dart --dart-define PATROL_WAIT=0 --dart-define PATROL_APP_PACKAGE_NAME=de.hexagonstudios.money_ops --dart-define PATROL_APP_BUNDLE_ID=de.hexagonstudios.moneyops --dart-define PATROL_ANDROID_APP_NAME=money_ops --dart-define PATROL_IOS_APP_NAME=money_ops --dart-define INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false --dart-define PATROL_TEST_LABEL_ENABLED=true --dart-define PATROL_TEST_SERVER_PORT=8081 --dart-define PATROL_APP_SERVER_PORT=8082 --dart-define COVERAGE_ENABLED=false
        Building de.hexagonstudios.moneyops for simulator (ios)...
$ xcodebuild build-for-testing -workspace Runner.xcworkspace -scheme Runner -configuration Debug -sdk iphonesimulator -destination generic/platform=iOS Simulator -quiet -derivedDataPath ../build/ios_integ OTHER_SWIFT_FLAGS=$(inherited) -D PATROL_ENABLED
        2025-01-12 00:17:46.059 xcodebuild[7665:1911687]  DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
        2025-01-12 00:17:46.219 xcodebuild[7665:1911664] [MT] DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'CocoaAsyncSocket' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'Mantle' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'SDWebImage-SDWebImage' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'SDWebImage' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'libwebp' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'SDWebImageWebPCoder' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'flutter_native_splash-flutter_native_splash_privacy' from project 'Pods')
        /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.2.99. (in target 'patrol-patrol_privacy' from project 'Pods')
        note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
        note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
        warning: Run script build phase 'xcode_backend build' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RunnerUITests' from project 'Runner')
        warning: Run script build phase 'xcode_backend embed_and_thin' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RunnerUITests' from project 'Runner')
✓ Completed building app with entrypoint test_bundle.dart for iOS simulator (26.0s)
Will uninstall apps before running tests
$ xcrun simctl uninstall 8781CDB9-F1BE-4831-87CD-81BB876A46EF de.hexagonstudios.moneyops
$ xcrun simctl uninstall 8781CDB9-F1BE-4831-87CD-81BB876A46EF de.hexagonstudios.moneyops.RunnerUITests.xctrunner
$ log stream
• Running app with entrypoint test_bundle.dart for iOS simulator on simulator iPhone 15 Pro...
$ xcodebuild -showsdks -json
Assuming SDK version 18.2 for iphonesimulator
Looking for .xctestrun matching Runner_*iphonesimulator18.2*.xctestrun at /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_integ/Build/Products
Found 1 match(es), the first one will be used
Found /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_integ/Build/Products/Runner_iphonesimulator18.2-arm64-x86_64.xctestrun
$ xcodebuild test-without-building -xctestrun /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_integ/Build/Products/Runner_iphonesimulator18.2-arm64-x86_64.xctestrun -only-testing RunnerUITests/RunnerUITests -destination platform=iOS Simulator,name=iPhone 15 Pro -destination-timeout 1 -resultBundlePath /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_results_1736637486892.xcresult
        Command line invocation:
            /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_integ/Build/Products/Runner_iphonesimulator18.2-arm64-x86_64.xctestrun -only-testing RunnerUITests/RunnerUITests -destination "platform=iOS Simulator,name=iPhone 15 Pro" -destination-timeout 1 -resultBundlePath /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_results_1736637486892.xcresult
        
        User defaults from command line:
            IDEBuildOperationResultBundlePath = /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_results_1736637486892.xcresult
            IDEPackageSupportUseBuiltinSCM = YES
        
        2025-01-12 00:18:07.774 xcodebuild[8883:1916916]  DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
        2025-01-12 00:18:07.779 xcodebuild[8883:1916885] [MT] DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
        Writing result bundle at path:
                /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_results_1736637486892.xcresult
        
        xcodebuild: error: Unable to find a device matching the provided destination specifier:
                        { platform:iOS Simulator, OS:latest, name:iPhone 15 Pro }
        
                The requested device could not be found because no available devices matched the request.
        
                Available destinations for the "Runner" scheme:
                        { platform:macOS, arch:arm64e, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:arm64, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:x86_64, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:arm64e, variant:Mac Catalyst, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:arm64, variant:Mac Catalyst, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:arm64e, variant:DriverKit, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:arm64, variant:DriverKit, id:00006030-001828D02E28001C, name:My Mac }
                        { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006030-001828D02E28001C, name:My Mac }
                        { platform:watchOS, arch:undefined_arch, id:00008310-0007044C0A08A01E, name:Apple Watch von Jonas }
                        { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
                        { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
                        { platform:macOS, name:Any Mac }
                        { platform:macOS, variant:Mac Catalyst, name:Any Mac }
                        { platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Any tvOS Device }
                        { platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Any tvOS Simulator Device }
                        { platform:visionOS, id:dvtdevice-DVTiOSDevicePlaceholder-xros:placeholder, name:Any visionOS Device }
                        { platform:visionOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-xrsimulator:placeholder, name:Any visionOS Simulator Device }
                        { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device }
                        { platform:watchOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-watchsimulator:placeholder, name:Any watchOS Simulator Device }
                        { platform:iOS Simulator, id:8781CDB9-F1BE-4831-87CD-81BB876A46EF, OS:17.5, name:iPhone 15 Pro }
                        { platform:iOS Simulator, id:8781CDB9-F1BE-4831-87CD-81BB876A46EF, OS:17.5, name:iPhone 15 Pro }
                        { platform:iOS Simulator, id:46A1D6B5-D058-48BE-9721-28BF4BA8CFD9, OS:18.2, name:iPhone 15 Pro 18.2 }
                        { platform:iOS Simulator, id:46A1D6B5-D058-48BE-9721-28BF4BA8CFD9, OS:18.2, name:iPhone 15 Pro 18.2 }
                        { platform:iOS Simulator, id:0086851B-336F-4589-97C9-5429551C6E49, OS:18.2, name:iPhone 16 Pro }
                        { platform:iOS Simulator, id:0086851B-336F-4589-97C9-5429551C6E49, OS:18.2, name:iPhone 16 Pro }

Test summary:
📝 Total: 0
✅ Successful: 0
❌ Failed: 0
⏩ Skipped: 0
📊 Report: /Users/jonasrosskamp/IdeaProjects/MoneyOps/money_ops/build/ios_results_1736637486892.xcresult
⏱️  Duration: 3s

✗ Failed to execute tests of app with entrypoint test_bundle.dart for iOS simulator on simulator iPhone 15 Pro (xcodebuild exited with code 70) (3.2s)
Error: xcodebuild exited with code 70
#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:233: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:160:5)
<asynchronous suspension>
#4      TestCommand._execute (package:patrol_cli/src/commands/test.dart:392:7)
<asynchronous suspension>
#5      TestCommand.run (package:patrol_cli/src/commands/test.dart:265: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:366:18)
<asynchronous suspension>
#8      PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:310:18)
<asynchronous suspension>
#9      patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:71:20)
<asynchronous suspension>
#10     main (file:///Users/jonasrosskamp/.pub-cache/hosted/pub.dev/patrol_cli-3.4.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.
$ xcrun simctl uninstall 8781CDB9-F1BE-4831-87CD-81BB876A46EF de.hexagonstudios.moneyops
$ xcrun simctl uninstall 8781CDB9-F1BE-4831-87CD-81BB876A46EF de.hexagonstudios.moneyops.RunnerUITests.xctrunner

Patrol version

[patrol](patrol: ^3.13.1)

Patrol Doctor output

Patrol Doctor output
 patrol doctor
Patrol doctor:
Patrol CLI version: 3.4.1
Flutter command: flutter 
  Flutter 3.27.1 • channel stable
Android: 
• Program adb found in /Users/jonasrosskamp/Library/Android/sdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/jonasrosskamp/Library/Android/sdk
iOS / macOS: 
• Program xcodebuild found in /usr/bin/xcodebuild
• Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Flutter Doctor output
flutter doctor --verbose
[✓] Flutter (Channel stable, 3.27.1, on macOS 15.1.1 24B91 darwin-arm64, locale en-DE)
    • Flutter version 3.27.1 on channel stable at /Users/jonasrosskamp/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (4 weeks ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/jonasrosskamp/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/jonasrosskamp/Library/Android/sdk
    • Java binary at: /opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] IntelliJ IDEA Community Edition (version 2024.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 83.0.4
    • Dart plugin version 243.23177

[✓] Connected device (6 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
    • iPhone 15 Pro 18.2 (mobile)     • 46A1D6B5-D058-48BE-9721-28BF4BA8CFD9 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-2 (simulator)
    • iPhone 15 Pro (mobile)          • 8781CDB9-F1BE-4831-87CD-81BB876A46EF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 15.1.1 24B91 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 15.1.1 24B91 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 131.0.6778.265

[✓] Network resources
    • All expected network resources are available.

• No issues found!

@jBorkowska
Copy link
Collaborator

Hi @Friesenjung ! Unfortunately it is a known issue. Here is a workaround: #2003 (comment)
I'm not sure you need older Xcode though, if it's running iOS 17 on Xcode 16 I think changing mentioned line in patrol_cli would be enough

@jBorkowska
Copy link
Collaborator

Related to #2003

@jBorkowska
Copy link
Collaborator

Though it is a duplicate, I'm not closing this issue as it contains valuable info

@jBorkowska jBorkowska added bug Something isn't working package: patrol_cli Related to the patrol_cli package platform: ios iOS is affected P1 High-priority issues at the top of the work list labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 High-priority issues at the top of the work list package: patrol_cli Related to the patrol_cli package platform: ios iOS is affected
Projects
None yet
Development

No branches or pull requests

2 participants