leancodepl/patrol

cannot flutter pub get patrol on beta flutter branch

Closed this issue · 7 comments

Steps to reproduce

when using flutter pub get receiving "Because patrol >=3.0.2 depends on test_api ^0.6.1 and every version of integration_test from sdk depends on test_api 0.7.0, patrol >=3.0.2 is incompatible with integration_test from sdk."

when overriding to test_api: ^0.6.1 there is a run error of: Error: Too many positional arguments: 1 allowed, but 3 found.
Try removing the extra positional arguments.
await tester.pumpWidget(widget, duration, phase);

Actual results

Error: Too many positional arguments: 1 allowed, but 3 found.
Try removing the extra positional arguments.
await tester.pumpWidget(widget, duration, phase);
test not starting

Logs

Logs
patrol test -t integration_test/ --verbose
Verbose mode enabled. More logs will be printed.
$ flutter --suppress-analytics --no-version-check pub deps --style=list
Received 3 test target(s)
Received test target: /Users/adi/Development/veni/Veni/integration_test/a_create_product_test.dart
Received test target: /Users/adi/Development/veni/Veni/integration_test/b_buy_product_test.dart
Received test target: /Users/adi/Development/veni/Veni/integration_test/c_subscribe_a_seller_test.dart
Generated entrypoint /Users/adi/Development/veni/Veni/integration_test/test_bundle.dart with 3 bundled test(s)
Received Android flavor: integrationtest
Received iOS flavor: integrationtest
$ flutter --no-version-check --suppress-analytics devices --machine
No device specified, using the first one (iPhone 15)
Received 1 device(s) to run on
Received device: iPhone 15
Received 9 --dart-define(s) (0 custom, 9 internal)
Received internal --dart-define: PATROL_WAIT=0
Received internal --dart-define: PATROL_APP_PACKAGE_NAME=com.veni.veniApp.local
Received internal --dart-define: PATROL_APP_BUNDLE_ID=com.veni.veniApp.local
Received internal --dart-define: PATROL_ANDROID_APP_NAME=veniApp
Received internal --dart-define: PATROL_IOS_APP_NAME=veniApp
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
• 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 --flavor integrationtest --target /Users/adi/Development/veni/Veni/integration_test/test_bundle.dart --dart-define PATROL_WAIT=0 --dart-define PATROL_APP_PACKAGE_NAME=com.veni.veniApp.local --dart-define PATROL_APP_BUNDLE_ID=com.veni.veniApp.local --dart-define PATROL_ANDROID_APP_NAME=veniApp --dart-define PATROL_IOS_APP_NAME=veniApp --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
        Building com.veni.veniApp.local for simulator (ios)...
$ xcodebuild build-for-testing -workspace Runner.xcworkspace -scheme integrationtest -configuration Debug-integrationtest -sdk iphonesimulator -destination generic/platform=iOS Simulator -quiet -derivedDataPath ../build/ios_integ OTHER_SWIFT_FLAGS=$(inherited) -D PATROL_ENABLED
        error: ../../../.pub-cache/hosted/pub.dev/patrol_finders-2.0.1/lib/src/custom_finders/patrol_tester.dart:150:28: Error: Too many positional arguments: 1 allowed, but 3 found.
        Try removing the extra positional arguments.
            await tester.pumpWidget(widget, duration, phase);
                                   ^
        ../../../.pub-cache/hosted/pub.dev/patrol_finders-2.0.1/lib/src/custom_finders/patrol_tester.dart:210:28: Error: Too many positional arguments: 1 allowed, but 3 found.
        Try removing the extra positional arguments.
            await tester.pumpWidget(widget, duration, phase);
                                   ^
        Target kernel_snapshot failed: Exception
        Failed to package /Users/adi/Development/veni/Veni.
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'shared_preferences_foundation-shared_preferences_foundation_privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'nanopb-nanopb_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'Mantle' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'Mixpanel-swift' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'CocoaAsyncSocket' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'libwebp' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'wakelock_plus-thermal' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'path_provider_foundation-path_provider_foundation_privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'flutter_native_splash-flutter_native_splash_privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'SDWebImage-SDWebImage' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'PromisesObjC-FBLPromises_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'AppAuth-AppAuthCore_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'SDWebImage' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'AppAuth' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'PromisesObjC' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'nanopb' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'flutter_appauth-flutter_appauth_privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'SDWebImageWebPCoder' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'GoogleUtilities-GoogleUtilities_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/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 17.4.99. (in target 'GoogleUtilities' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseCoreInternal-FirebaseCoreInternal_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseCoreInternal' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseCore-FirebaseCore_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseCore' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseInstallations-FirebaseInstallations_Privacy' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseInstallations' from project 'Pods')
        warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, 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 'Runner' from project 'Runner')
        note: Run script build phase '[CP] Check Pods Manifest.lock' 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')
        /Users/adi/Development/veni/Veni/ios/Runner.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's entitlements file '/Users/adi/Development/veni/Veni/ios/Runner/Runner.entitlements'. (in target 'Runner' from project 'Runner')
        warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, 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 'Runner' from project 'Runner')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'FirebaseAnalytics' from project 'Pods')
        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 warning, 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 build' will be run during every build because it does not specify any outputs. To address this warning, 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')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'GoogleAppMeasurement' from project 'Pods')
        /Users/adi/Development/veni/Veni/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'Firebase' from project 'Pods')
        ** TEST BUILD FAILED **

✗ Failed to build app with entrypoint test_bundle.dart for iOS simulator (xcodebuild exited with code 65) (56.3s)
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:137: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:76:5)
<asynchronous suspension>
#4      TestCommand._build (package:patrol_cli/src/commands/test.dart:279:7)
<asynchronous suspension>
#5      TestCommand.run (package:patrol_cli/src/commands/test.dart:213: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:347:18)
<asynchronous suspension>
#8      PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:291:18)
<asynchronous suspension>
#9      patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:70:20)
<asynchronous suspension>
#10     main (file:///Users/adi/.pub-cache/hosted/pub.dev/patrol_cli-2.7.0/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:137: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:76:5)
<asynchronous suspension>
#4      TestCommand._build (package:patrol_cli/src/commands/test.dart:279:7)
<asynchronous suspension>
#5      TestCommand.run (package:patrol_cli/src/commands/test.dart:213: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:347:18)
<asynchronous suspension>
#8      PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:291:18)
<asynchronous suspension>
#9      patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:70:20)
<asynchronous suspension>
#10     main (file:///Users/adi/.pub-cache/hosted/pub.dev/patrol_cli-2.7.0/bin/main.dart:6:20)
<asynchronous suspension>

Patrol version

patrol: 3.6.1

Patrol Doctor output

Patrol Doctor output
<!-- Replace this line with your logs. Do not remove the backticks! -->

Flutter Doctor output

Flutter Doctor output
Patrol doctor:
Patrol CLI version: 2.7.0
Flutter command: flutter 
  Flutter 3.21.0-1.0.pre.2 • channel beta
Android: 
• Program adb found in /Users/adi/Library/Android/sdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/adi/Library/Android/sdk
iOS / macOS: 
• Program xcodebuild found in /usr/bin/xcodebuild
• Program ideviceinstaller found in /usr/local/bin/ideviceinstaller

Why has this issue been left unattended for two weeks?
My product uses the beta branch, so I couldn't use patrol, but fortunately, the problem was easily solved.

As a workaround, you can solve the problem by describing it in pubspec.yaml as follows:

dependency_overrides:
  patrol_finders:
    git:
      url: https://github.com/KoheiKanagu/patrol.git
      ref: patrol_tester
      path: packages/patrol_finders
  test_api: any
[✓] Flutter (Channel beta, 3.22.0-0.1.pre, on macOS 14.4.1 23E224 darwin-arm64, locale ja-JP)

Any news on this issue?

Why has this issue been left unattended for two weeks?

Because this project is the herculian effort of a sole developer, and its open source!

stable is going to be cut from beta very shortly so this will break for a lot of people, and some of us are dying for flutter web wasm support :)

master...KoheiKanagu:patrol:patrol_tester

@KoheiKanagu your fix here looks simple enough, seems like they changed to named params for pumpWidget function?

maybe raise this as PR :)

Hi everyone. Thanks for reporting this. I just opened a PR preparing Patrol for the upcoming release of Flutter. We will release new versions of patrol and patrol_finders as soon as new stable version of Flutter will be released.

The new versions of the patrol and patrol_finders, adapted for Flutter 3.22.0, have just been released as the dev versions.

The new versions of patrol_finders and patrol with the support for Flutter 3.22.0 has been released.

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.