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

Failed to build app with entrypoint test_bundle.dart for iOS simulator (xcodebuild exited with code 65) #2492

Open
aibekdv opened this issue Jan 15, 2025 · 7 comments
Assignees

Comments

@aibekdv
Copy link

aibekdv commented Jan 15, 2025

Steps to reproduce

  1. Open project in VS Code.
  2. Start ios simulator (ios 18.1)
  3. Run patrol test -t integration_test/example_test.dart

Actual results

patrol test -t integration_test/example_test.dart doesn't work on iOS 18.1.

Logs

Logs
** TEST BUILD FAILED **

✗ Failed to build app with entrypoint test_bundle.dart for iOS simulator (xcodebuild exited with code 65) (68.6s)
Error: xcodebuild exited with code 65
#0      throwToolExit (package:patrol_cli/src/base/exceptions.dart:7:3)
#1      IOSTestBackend.build.<anonymous closure> (package:patrol_cli/src/ios/ios_test_backend.dart:141:9)
<asynchronous suspension>
#2      DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:46:7)
<asynchronous suspension>
#3      IOSTestBackend.build (package:patrol_cli/src/ios/ios_test_backend.dart:80:5)
<asynchronous suspension>
#4      TestCommand._build (package:patrol_cli/src/commands/test.dart:332:7)
<asynchronous suspension>
#5      TestCommand.run (package:patrol_cli/src/commands/test.dart:250:5)
<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/aibekdv/.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.
Error: xcodebuild exited with code 65
#0      throwToolExit (package:patrol_cli/src/base/exceptions.dart:7:3)
#1      IOSTestBackend.build.<anonymous closure> (package:patrol_cli/src/ios/ios_test_backend.dart:141:9)
<asynchronous suspension>
#2      DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:46:7)
<asynchronous suspension>
#3      IOSTestBackend.build (package:patrol_cli/src/ios/ios_test_backend.dart:80:5)
<asynchronous suspension>
#4      TestCommand._build (package:patrol_cli/src/commands/test.dart:332:7)
<asynchronous suspension>
#5      TestCommand.run (package:patrol_cli/src/commands/test.dart:250:5)
<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/aibekdv/.pub-cache/hosted/pub.dev/patrol_cli-3.4.1/bin/main.dart:6:20)
<asynchronous suspension>

Patrol version

patrol: ^3.13.2

Patrol Doctor output

Patrol Doctor output
Patrol doctor:
Patrol CLI version: 3.4.1
Flutter command: flutter 
  Flutter 3.27.2 • channel stable
Android: 
• Program adb found in /Users/aibekdv/Library/Android/sdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/aibekdv/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
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.2, on macOS 15.2 24C101 darwin-arm64, locale en-KG)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.96.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
@aibekdv
Copy link
Author

aibekdv commented Jan 15, 2025

example_test.dart

import 'package:ar/main.dart' as app;
import 'package:patrol/patrol.dart';

void main() {
  patrolTest("main flow", ($) async {
    // ignore: avoid_print
    print('--- 🚀 Start test ---');

    $.tester.testTextInput.register();

    await app.main();

    await $.tester.pumpAndSettle();

    await $.tester.pump(const Duration(seconds: 3));

    // ignore: avoid_print
    print('--- 🚀 End test ---');
  });
}

@zoskar
Copy link

zoskar commented Jan 20, 2025

Hi @aibekdv
It's difficult to determine anything from those logs. Can you resend them when you run patrol test -t integration_test/example_test.dart --verbose ?

@zoskar zoskar added the waiting for response Waiting for user's response label Jan 20, 2025
@zoskar zoskar self-assigned this Jan 20, 2025
@aibekdv
Copy link
Author

aibekdv commented Jan 20, 2025

Hi @aibekdv It's difficult to determine anything from those logs. Can you resend them when you run patrol test -t integration_test/example_test.dart --verbose ?

aibekdv@Aibeks-MacBook-Pro app % patrol test -t integration_test/example_test.dart --verbose
Verbose mode enabled. More logs will be printed.
Received 1 test target(s)
Received test target: /Users/aibekdv/Others/akademia-rosta/app/integration_test/example_test.dart
Generated entrypoint /Users/aibekdv/Others/akademia-rosta/app/integration_test/test_bundle.dart with 1 bundled test(s)
$ flutter --no-version-check --suppress-analytics devices --machine
No device specified, using the first one (iPhone 16 Pro)
Received 1 device(s) to run on
Received device: iPhone 16 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=kg.helloit.akademia_rosta
Received internal --dart-define: PATROL_APP_BUNDLE_ID=kg.helloit.akademiaRosta
Received internal --dart-define: PATROL_ANDROID_APP_NAME=Akademia Rosta
Received internal --dart-define: PATROL_IOS_APP_NAME=Akademia Rosta
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/aibekdv/Others/akademia-rosta/app/integration_test/test_bundle.dart --dart-define PATROL_WAIT=0 --dart-define PATROL_APP_PACKAGE_NAME=kg.helloit.akademia_rosta --dart-define PATROL_APP_BUNDLE_ID=kg.helloit.akademiaRosta --dart-define PATROL_ANDROID_APP_NAME=Akademia Rosta --dart-define PATROL_IOS_APP_NAME=Akademia Rosta --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 kg.helloit.akademiaRosta for simulator (ios)...
Running pod install... 722ms
CocoaPods' output:

Preparing

        Analyzing dependencies

        Inspecting targets to integrate
          Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
          Using `ARCHS` setting to build architectures of target `Pods-Runner-RunnerUITests`: (``)

        Finding Podfile changes
          - Flutter
          - cloud_firestore
          - connectivity_plus
          - device_info_plus
          - firebase_auth
          - firebase_core
          - firebase_messaging
          - flutter_inappwebview_ios
          - flutter_local_notifications
          - flutter_native_splash
          - google_sign_in_ios
          - image_picker_ios
          - package_info_plus
          - path_provider_foundation
          - patrol
          - share_plus
          - shared_preferences_foundation
          - sign_in_with_apple
          - sqflite_darwin
          - syncfusion_flutter_pdfviewer
          - url_launcher_ios
          - video_player_avfoundation
          - wakelock_plus

        Fetching external sources
        -> Fetching podspec for `Flutter` from `Flutter`
        -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
        cloud_firestore: Using Firebase SDK version '11.6.0' defined in 'firebase_core'
        -> Fetching podspec for `connectivity_plus` from `.symlinks/plugins/connectivity_plus/darwin`
        -> Fetching podspec for `device_info_plus` from `.symlinks/plugins/device_info_plus/ios`
        -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
        firebase_auth: Using Firebase SDK version '11.6.0' defined in 'firebase_core'
        -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
        firebase_core: Using Firebase SDK version '11.6.0' defined in 'firebase_core'
        -> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
        firebase_messaging: Using Firebase SDK version '11.6.0' defined in 'firebase_core'
        -> Fetching podspec for `flutter_inappwebview_ios` from `.symlinks/plugins/flutter_inappwebview_ios/ios`
        -> Fetching podspec for `flutter_local_notifications` from `.symlinks/plugins/flutter_local_notifications/ios`
        -> Fetching podspec for `flutter_native_splash` from `.symlinks/plugins/flutter_native_splash/ios`
        -> Fetching podspec for `google_sign_in_ios` from `.symlinks/plugins/google_sign_in_ios/darwin`
        -> Fetching podspec for `image_picker_ios` from `.symlinks/plugins/image_picker_ios/ios`
        -> Fetching podspec for `package_info_plus` from `.symlinks/plugins/package_info_plus/ios`
        -> Fetching podspec for `path_provider_foundation` from `.symlinks/plugins/path_provider_foundation/darwin`
        -> Fetching podspec for `patrol` from `.symlinks/plugins/patrol/darwin`
        -> Fetching podspec for `share_plus` from `.symlinks/plugins/share_plus/ios`
        -> Fetching podspec for `shared_preferences_foundation` from `.symlinks/plugins/shared_preferences_foundation/darwin`
        -> Fetching podspec for `sign_in_with_apple` from `.symlinks/plugins/sign_in_with_apple/ios`
        -> Fetching podspec for `sqflite_darwin` from `.symlinks/plugins/sqflite_darwin/darwin`
        -> Fetching podspec for `syncfusion_flutter_pdfviewer` from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`
        -> Fetching podspec for `url_launcher_ios` from `.symlinks/plugins/url_launcher_ios/ios`
        -> Fetching podspec for `video_player_avfoundation` from `.symlinks/plugins/video_player_avfoundation/darwin`
        -> Fetching podspec for `wakelock_plus` from `.symlinks/plugins/wakelock_plus/ios`

        Resolving dependencies of `Podfile`
          CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/0/3/5/Firebase/11.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_4_2_c.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/4/2/c/FlutterMacOS/3.16.0/FlutterMacOS.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_6_8_6.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/6/8/6/OrderedSet/6.0.3/OrderedSet.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_b_b_9.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/b/b/9/AppAuth/1.7.6/AppAuth.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_c_e_3.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/c/e/3/GTMSessionFetcher/4.2.0/GTMSessionFetcher.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_d_4_0.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.0.0/GoogleSignIn.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: all_pods_versions_1_d_4.txt exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/1/d/4/CocoaAsyncSocket/7.6.5/CocoaAsyncSocket.podspec.json exists! Returning local because checking is only performed in repo update
          CDN: trunk Relative path: Specs/0/3/5/Firebase/11.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
        [!] CocoaPods could not find compatible versions for pod "Firebase/Messaging":
          In snapshot (Podfile.lock):
            Firebase/Messaging (= 11.4.0)

          In Podfile:
            firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) was resolved to 15.2.0, which depends on
              Firebase/Messaging (= 11.6.0)


        You have either:
         * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
         * changed the constraints of dependency `Firebase/Messaging` inside your development pod `firebase_messaging`.
           You should run `pod update Firebase/Messaging` to apply changes you've made.

        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in `process_topmost_state'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:94:in `resolve'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:422:in `analyze'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:162:in `install!'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in `run'
        /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in `<top (required)>'
        /usr/local/bin/pod:23:in `load'
        /usr/local/bin/pod:23:in `<main>'

    Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
    To update the CocoaPods specs, run:
      pod repo update

    Error running pod install

✗ Failed to build app with entrypoint test_bundle.dart for iOS simulator (flutter build ios exited with code 1) (13.1s)
Error: flutter build ios exited with code 1
#0 throwToolExit (package:patrol_cli/src/base/exceptions.dart:7:3)
#1 IOSTestBackend.build. (package:patrol_cli/src/ios/ios_test_backend.dart:114:9)

#2 DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:46:7)

#3 IOSTestBackend.build (package:patrol_cli/src/ios/ios_test_backend.dart:80:5)

#4 TestCommand._build (package:patrol_cli/src/commands/test.dart:332:7)

#5 TestCommand.run (package:patrol_cli/src/commands/test.dart:250:5)

#6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)

#7 PatrolCommandRunner.runCommand (package:patrol_cli/src/runner/patrol_command_runner.dart:384:18)

#8 PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:328:18)

#9 patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:75:20)

#10 main (file:///Users/aibekdv/.pub-cache/hosted/pub.dev/patrol_cli-3.5.0/bin/main.dart:6:20)

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.
Error: flutter build ios exited with code 1
#0 throwToolExit (package:patrol_cli/src/base/exceptions.dart:7:3)
#1 IOSTestBackend.build. (package:patrol_cli/src/ios/ios_test_backend.dart:114:9)

#2 DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:46:7)

#3 IOSTestBackend.build (package:patrol_cli/src/ios/ios_test_backend.dart:80:5)

#4 TestCommand._build (package:patrol_cli/src/commands/test.dart:332:7)

#5 TestCommand.run (package:patrol_cli/src/commands/test.dart:250:5)

#6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)

#7 PatrolCommandRunner.runCommand (package:patrol_cli/src/runner/patrol_command_runner.dart:384:18)

#8 PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:328:18)

#9 patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:75:20)

#10 main (file:///Users/aibekdv/.pub-cache/hosted/pub.dev/patrol_cli-3.5.0/bin/main.dart:6:20)

@github-actions github-actions bot removed the waiting for response Waiting for user's response label Jan 20, 2025
@zoskar
Copy link

zoskar commented Jan 22, 2025

And does the app build without error on this emulator when you build it? Not for tests, just flutter run.

@zoskar zoskar added the waiting for response Waiting for user's response label Jan 22, 2025
@aibekdv
Copy link
Author

aibekdv commented Jan 22, 2025

Image

And does the app build without error on this emulator when you build it? Not for tests, just flutter run.

@github-actions github-actions bot removed the waiting for response Waiting for user's response label Jan 22, 2025
@pdenert
Copy link
Collaborator

pdenert commented Jan 22, 2025

Please run:
flutter build ios --config-only integration_test/example_test.dart
then:
pod install --repo-update
and after that:
patrol test -t integration_test/example_test.dart --verbose

@aibekdv
Copy link
Author

aibekdv commented Jan 22, 2025

Please run: flutter build ios --config-only integration_test/example_test.dart then: pod install --repo-update and after that: patrol test -t integration_test/example_test.dart --verbose

Image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants