leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
901 stars 135 forks source link

Gradle Build failed when running Patrol test #1145

Closed PeterBriggsGreggs closed 1 year ago

PeterBriggsGreggs commented 1 year ago

Build failed when running patrol test

Upgraded to patrol version 1.1.3 earlier today. What do I need to do to resolve the issue ?

Build failed with the following error:

image

Verbose logs using the same command are below: peterbriggs@Peters-MacBook-Pro-2 gotg_apps_grecords % patrol test --target integration_test/tests/login/login_test.dart --verbose
Verbose mode enabled. More logs will be printed. Received 1 test target(s) Received test target: /Users/peterbriggs/GOTG.Apps.GRecords/gotg_apps_grecords/integration_test/tests/login/login_test.dart Received Android flavor: unstable Received iOS flavor: unstable $ flutter --no-version-check devices --machine No device specified, using the first one (emulator-5554) Received 1 device(s) to run on Received device: emulator-5554 Every test target will be run 1 time(s) Received 5 --dart-define(s) (0 custom, 5 internal) Received internal --dart-define: PATROL_WAIT=0 Received internal --dart-define: PATROL_APP_PACKAGE_NAME=uk.co.greggs.gotg_apps_grecords.unstable Received internal --dart-define: PATROL_APP_BUNDLE_ID=uk.co.greggs.gotg_apps_grecords.unstable Received internal --dart-define: PATROL_ANDROID_APP_NAME=G-Records Received internal --dart-define: PATROL_IOS_APP_NAME=G-Records • Building apk with entrypoint login_test.dart... $ ./gradlew :app:assembleUnstableDebug -Ptarget=/Users/peterbriggs/GOTG.Apps.GRecords/gotg_apps_grecords/integration_test/tests/login/login_test.dart -Pdart-defines=UEFUUk9MX1dBSVQ9MA==,UEFUUk9MX0FQUF9QQUNLQUdFX05BTUU9dWsuY28uZ3JlZ2dzLmdvdGdfYXBwc19ncmVjb3Jkcy51bnN0YWJsZQ==,UEFUUk9MX0FQUF9CVU5ETEVfSUQ9dWsuY28uZ3JlZ2dzLmdvdGdfYXBwc19ncmVjb3Jkcy51bnN0YWJsZQ==,UEFUUk9MX0FORFJPSURfQVBQX05BTUU9Ry1SZWNvcmRz,UEFUUk9MX0lPU19BUFBfTkFNRT1HLVJlY29yZHM=,UEFUUk9MX1RFU1RfTEFCRUw9bG9naW5fdGVzdC5kYXJ0 : : > Configure project :syncfusion_flutter_pdfviewer : WARNING: The option setting 'android.enableR8=true' is deprecated. : It will be removed in version 5.0 of the Android Gradle plugin. : You will no longer be able to disable R8 : : > Task :app:compileFlutterBuildUnstableDebug : > Task :app:packLibsflutterBuildUnstableDebug UP-TO-DATE : > Task :app:preBuild UP-TO-DATE : > Task :app:preUnstableDebugBuild UP-TO-DATE : > Task :connectivity_plus:preBuild UP-TO-DATE : > Task :connectivity_plus:preDebugBuild UP-TO-DATE : > Task :connectivity_plus:compileDebugAidl NO-SOURCE : > Task :flutter_plugin_android_lifecycle:preBuild UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:preDebugBuild UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:compileDebugAidl NO-SOURCE : > Task :image_picker_android:preBuild UP-TO-DATE : > Task :image_picker_android:preDebugBuild UP-TO-DATE : > Task :image_picker_android:compileDebugAidl NO-SOURCE : > Task :integration_test:preBuild UP-TO-DATE : > Task :integration_test:preDebugBuild UP-TO-DATE : > Task :integration_test:compileDebugAidl NO-SOURCE : > Task :isar_flutter_libs:preBuild UP-TO-DATE : > Task :isar_flutter_libs:preDebugBuild UP-TO-DATE : > Task :isar_flutter_libs:compileDebugAidl NO-SOURCE : > Task :move_to_background:preBuild UP-TO-DATE : > Task :move_to_background:preDebugBuild UP-TO-DATE : > Task :move_to_background:compileDebugAidl NO-SOURCE : > Task :package_info_plus:preBuild UP-TO-DATE : > Task :package_info_plus:preDebugBuild UP-TO-DATE : > Task :package_info_plus:compileDebugAidl NO-SOURCE : > Task :path_provider_android:preBuild UP-TO-DATE : > Task :path_provider_android:preDebugBuild UP-TO-DATE : > Task :path_provider_android:compileDebugAidl NO-SOURCE : > Task :patrol:preBuild UP-TO-DATE : > Task :patrol:preDebugBuild UP-TO-DATE : > Task :patrol:compileDebugAidl NO-SOURCE : > Task :syncfusion_flutter_pdfviewer:preBuild UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:preDebugBuild UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:compileDebugAidl NO-SOURCE : > Task :url_launcher_android:preBuild UP-TO-DATE : > Task :url_launcher_android:preDebugBuild UP-TO-DATE : > Task :url_launcher_android:compileDebugAidl NO-SOURCE : > Task :app:compileUnstableDebugAidl NO-SOURCE : > Task :connectivity_plus:packageDebugRenderscript NO-SOURCE : > Task :flutter_plugin_android_lifecycle:packageDebugRenderscript NO-SOURCE : > Task :image_picker_android:packageDebugRenderscript NO-SOURCE : > Task :integration_test:packageDebugRenderscript NO-SOURCE : > Task :isar_flutter_libs:packageDebugRenderscript NO-SOURCE : > Task :move_to_background:packageDebugRenderscript NO-SOURCE : > Task :package_info_plus:packageDebugRenderscript NO-SOURCE : > Task :path_provider_android:packageDebugRenderscript NO-SOURCE : > Task :patrol:packageDebugRenderscript NO-SOURCE : > Task :syncfusion_flutter_pdfviewer:packageDebugRenderscript NO-SOURCE : > Task :url_launcher_android:packageDebugRenderscript NO-SOURCE : > Task :app:compileUnstableDebugRenderscript NO-SOURCE : > Task :app:generateUnstableDebugBuildConfig UP-TO-DATE : > Task :connectivity_plus:writeDebugAarMetadata UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:writeDebugAarMetadata UP-TO-DATE : > Task :image_picker_android:writeDebugAarMetadata UP-TO-DATE : > Task :integration_test:writeDebugAarMetadata UP-TO-DATE : > Task :isar_flutter_libs:writeDebugAarMetadata UP-TO-DATE : > Task :move_to_background:writeDebugAarMetadata UP-TO-DATE : > Task :package_info_plus:writeDebugAarMetadata UP-TO-DATE : > Task :path_provider_android:writeDebugAarMetadata UP-TO-DATE : > Task :patrol:writeDebugAarMetadata UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:writeDebugAarMetadata UP-TO-DATE : > Task :url_launcher_android:writeDebugAarMetadata UP-TO-DATE : > Task :app:checkUnstableDebugAarMetadata UP-TO-DATE : > Task :app:cleanMergeUnstableDebugAssets : > Task :app:mergeUnstableDebugShaders UP-TO-DATE : > Task :app:compileUnstableDebugShaders NO-SOURCE : > Task :app:generateUnstableDebugAssets UP-TO-DATE : > Task :connectivity_plus:mergeDebugShaders UP-TO-DATE : > Task :connectivity_plus:compileDebugShaders NO-SOURCE : > Task :connectivity_plus:generateDebugAssets UP-TO-DATE : > Task :connectivity_plus:packageDebugAssets UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:mergeDebugShaders UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:compileDebugShaders NO-SOURCE : > Task :flutter_plugin_android_lifecycle:generateDebugAssets UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:packageDebugAssets UP-TO-DATE : > Task :image_picker_android:mergeDebugShaders UP-TO-DATE : > Task :image_picker_android:compileDebugShaders NO-SOURCE : > Task :image_picker_android:generateDebugAssets UP-TO-DATE : > Task :image_picker_android:packageDebugAssets UP-TO-DATE : > Task :integration_test:mergeDebugShaders UP-TO-DATE : > Task :integration_test:compileDebugShaders NO-SOURCE : > Task :integration_test:generateDebugAssets UP-TO-DATE : > Task :integration_test:packageDebugAssets UP-TO-DATE : > Task :isar_flutter_libs:mergeDebugShaders UP-TO-DATE : > Task :isar_flutter_libs:compileDebugShaders NO-SOURCE : > Task :isar_flutter_libs:generateDebugAssets UP-TO-DATE : > Task :isar_flutter_libs:packageDebugAssets UP-TO-DATE : > Task :move_to_background:mergeDebugShaders UP-TO-DATE : > Task :move_to_background:compileDebugShaders NO-SOURCE : > Task :move_to_background:generateDebugAssets UP-TO-DATE : > Task :move_to_background:packageDebugAssets UP-TO-DATE : > Task :package_info_plus:mergeDebugShaders UP-TO-DATE : > Task :package_info_plus:compileDebugShaders NO-SOURCE : > Task :package_info_plus:generateDebugAssets UP-TO-DATE : > Task :package_info_plus:packageDebugAssets UP-TO-DATE : > Task :path_provider_android:mergeDebugShaders UP-TO-DATE : > Task :path_provider_android:compileDebugShaders NO-SOURCE : > Task :path_provider_android:generateDebugAssets UP-TO-DATE : > Task :path_provider_android:packageDebugAssets UP-TO-DATE : > Task :patrol:mergeDebugShaders UP-TO-DATE : > Task :patrol:compileDebugShaders NO-SOURCE : > Task :patrol:generateDebugAssets UP-TO-DATE : > Task :patrol:packageDebugAssets UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:mergeDebugShaders UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:compileDebugShaders NO-SOURCE : > Task :syncfusion_flutter_pdfviewer:generateDebugAssets UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:packageDebugAssets UP-TO-DATE : > Task :url_launcher_android:mergeDebugShaders UP-TO-DATE : > Task :url_launcher_android:compileDebugShaders NO-SOURCE : > Task :url_launcher_android:generateDebugAssets UP-TO-DATE : > Task :url_launcher_android:packageDebugAssets UP-TO-DATE : > Task :app:mergeUnstableDebugAssets : > Task :app:copyFlutterAssetsUnstableDebug : > Task :app:generateUnstableDebugResValues UP-TO-DATE : > Task :app:generateUnstableDebugResources UP-TO-DATE : > Task :connectivity_plus:compileDebugRenderscript NO-SOURCE : > Task :connectivity_plus:generateDebugResValues UP-TO-DATE : > Task :connectivity_plus:generateDebugResources UP-TO-DATE : > Task :connectivity_plus:packageDebugResources UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:compileDebugRenderscript NO-SOURCE : > Task :flutter_plugin_android_lifecycle:generateDebugResValues UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:generateDebugResources UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:packageDebugResources UP-TO-DATE : > Task :image_picker_android:compileDebugRenderscript NO-SOURCE : > Task :image_picker_android:generateDebugResValues UP-TO-DATE : > Task :image_picker_android:generateDebugResources UP-TO-DATE : > Task :image_picker_android:packageDebugResources UP-TO-DATE : > Task :integration_test:compileDebugRenderscript NO-SOURCE : > Task :integration_test:generateDebugResValues UP-TO-DATE : > Task :integration_test:generateDebugResources UP-TO-DATE : > Task :integration_test:packageDebugResources UP-TO-DATE : > Task :isar_flutter_libs:compileDebugRenderscript NO-SOURCE : > Task :isar_flutter_libs:generateDebugResValues UP-TO-DATE : > Task :isar_flutter_libs:generateDebugResources UP-TO-DATE : > Task :isar_flutter_libs:packageDebugResources UP-TO-DATE : > Task :move_to_background:compileDebugRenderscript NO-SOURCE : > Task :move_to_background:generateDebugResValues UP-TO-DATE : > Task :move_to_background:generateDebugResources UP-TO-DATE : > Task :move_to_background:packageDebugResources UP-TO-DATE : > Task :package_info_plus:compileDebugRenderscript NO-SOURCE : > Task :package_info_plus:generateDebugResValues UP-TO-DATE : > Task :package_info_plus:generateDebugResources UP-TO-DATE : > Task :package_info_plus:packageDebugResources UP-TO-DATE : > Task :path_provider_android:compileDebugRenderscript NO-SOURCE : > Task :path_provider_android:generateDebugResValues UP-TO-DATE : > Task :path_provider_android:generateDebugResources UP-TO-DATE : > Task :path_provider_android:packageDebugResources UP-TO-DATE : > Task :patrol:compileDebugRenderscript NO-SOURCE : > Task :patrol:generateDebugResValues UP-TO-DATE : > Task :patrol:generateDebugResources UP-TO-DATE : > Task :patrol:packageDebugResources UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:compileDebugRenderscript NO-SOURCE : > Task :syncfusion_flutter_pdfviewer:generateDebugResValues UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:generateDebugResources UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:packageDebugResources UP-TO-DATE : > Task :url_launcher_android:compileDebugRenderscript NO-SOURCE : > Task :url_launcher_android:generateDebugResValues UP-TO-DATE : > Task :url_launcher_android:generateDebugResources UP-TO-DATE : > Task :url_launcher_android:packageDebugResources UP-TO-DATE : > Task :app:mergeUnstableDebugResources UP-TO-DATE : > Task :app:createUnstableDebugCompatibleScreenManifests UP-TO-DATE : > Task :app:extractDeepLinksUnstableDebug UP-TO-DATE : > Task :connectivity_plus:extractDeepLinksDebug UP-TO-DATE : > Task :connectivity_plus:processDebugManifest UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:extractDeepLinksDebug UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:processDebugManifest UP-TO-DATE : > Task :image_picker_android:extractDeepLinksDebug UP-TO-DATE : > Task :image_picker_android:processDebugManifest UP-TO-DATE : > Task :integration_test:extractDeepLinksDebug UP-TO-DATE : > Task :integration_test:processDebugManifest UP-TO-DATE : > Task :isar_flutter_libs:extractDeepLinksDebug UP-TO-DATE : > Task :isar_flutter_libs:processDebugManifest UP-TO-DATE : > Task :move_to_background:extractDeepLinksDebug UP-TO-DATE : > Task :move_to_background:processDebugManifest UP-TO-DATE : > Task :package_info_plus:extractDeepLinksDebug UP-TO-DATE : > Task :package_info_plus:processDebugManifest UP-TO-DATE : > Task :path_provider_android:extractDeepLinksDebug UP-TO-DATE : > Task :path_provider_android:processDebugManifest UP-TO-DATE : > Task :patrol:extractDeepLinksDebug UP-TO-DATE : > Task :patrol:processDebugManifest UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:extractDeepLinksDebug UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:processDebugManifest UP-TO-DATE : > Task :url_launcher_android:extractDeepLinksDebug UP-TO-DATE : > Task :url_launcher_android:processDebugManifest UP-TO-DATE : > Task :app:processUnstableDebugMainManifest UP-TO-DATE : > Task :app:processUnstableDebugManifest UP-TO-DATE : > Task :app:processUnstableDebugManifestForPackage UP-TO-DATE : > Task :connectivity_plus:compileDebugLibraryResources UP-TO-DATE : > Task :connectivity_plus:parseDebugLocalResources UP-TO-DATE : > Task :connectivity_plus:generateDebugRFile UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:compileDebugLibraryResources UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:parseDebugLocalResources UP-TO-DATE : > Task :flutter_plugin_android_lifecycle:generateDebugRFile UP-TO-DATE : > Task :image_picker_android:compileDebugLibraryResources UP-TO-DATE : > Task :image_picker_android:parseDebugLocalResources UP-TO-DATE : > Task :image_picker_android:generateDebugRFile UP-TO-DATE : > Task :integration_test:compileDebugLibraryResources UP-TO-DATE : > Task :integration_test:parseDebugLocalResources UP-TO-DATE : > Task :integration_test:generateDebugRFile UP-TO-DATE : > Task :isar_flutter_libs:compileDebugLibraryResources UP-TO-DATE : > Task :isar_flutter_libs:parseDebugLocalResources UP-TO-DATE : > Task :isar_flutter_libs:generateDebugRFile UP-TO-DATE : > Task :move_to_background:compileDebugLibraryResources UP-TO-DATE : > Task :move_to_background:parseDebugLocalResources UP-TO-DATE : > Task :move_to_background:generateDebugRFile UP-TO-DATE : > Task :package_info_plus:compileDebugLibraryResources UP-TO-DATE : > Task :package_info_plus:parseDebugLocalResources UP-TO-DATE : > Task :package_info_plus:generateDebugRFile UP-TO-DATE : > Task :path_provider_android:compileDebugLibraryResources UP-TO-DATE : > Task :path_provider_android:parseDebugLocalResources UP-TO-DATE : > Task :path_provider_android:generateDebugRFile UP-TO-DATE : > Task :patrol:compileDebugLibraryResources UP-TO-DATE : > Task :patrol:parseDebugLocalResources UP-TO-DATE : > Task :patrol:generateDebugRFile UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:compileDebugLibraryResources UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:parseDebugLocalResources UP-TO-DATE : > Task :syncfusion_flutter_pdfviewer:generateDebugRFile UP-TO-DATE : > Task :url_launcher_android:compileDebugLibraryResources UP-TO-DATE : > Task :url_launcher_android:parseDebugLocalResources UP-TO-DATE : > Task :url_launcher_android:generateDebugRFile UP-TO-DATE : > Task :app:processUnstableDebugResources UP-TO-DATE : > Task :connectivity_plus:generateDebugBuildConfig UP-TO-DATE : > Task :connectivity_plus:javaPreCompileDebug UP-TO-DATE : > Task :connectivity_plus:compileDebugJavaWithJavac FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':connectivity_plus:compileDebugJavaWithJavac'.
    > Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 10s
    : 
    : Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
    : 
    : You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
    : 
    : See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
    : 129 actionable tasks: 5 executed, 124 up-to-date

✗ Failed to build apk with entrypoint login_test.dart (Gradle build failed with code 1) (11.1s) Exception: Gradle build failed with code 1

0 AndroidTestBackend.build. (package:patrol_cli/src/android/android_test_backend.dart:67:9)

#1 DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:44:7) #2 AndroidTestBackend.build (package:patrol_cli/src/android/android_test_backend.dart:42:5) #3 TestCommand._builderFor. (package:patrol_cli/src/commands/test.dart:222:9) #4 _NativeTestRunner.run.runTestsOnDevice (package:patrol_cli/src/test_runner.dart:230:13) #5 Future.wait. (dart:async/future.dart:522:21) #6 _NativeTestRunner.run (package:patrol_cli/src/test_runner.dart:258:5) #7 TestCommand.run (package:patrol_cli/src/commands/test.dart:182:21) #8 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #9 PatrolCommandRunner.runCommand (package:patrol_cli/src/runner/patrol_command_runner.dart:284:18) #10 PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:223:18) #11 patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:47:20) #12 main (file:///Users/peterbriggs/.pub-cache/hosted/pub.dev/patrol_cli-1.1.3/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. FAIL login_test.dart on emulator-5554 **Patrol Doctor output** image **Flutter Doctor output** peterbriggs@Peters-MacBook-Pro-2 gotg_apps_grecords % flutter doctor --verbose [✓] Flutter (Channel stable, 3.7.8, on macOS 13.2.1 22D68 darwin-x64, locale en-GB) • Flutter version 3.7.8 on channel stable at /Users/peterbriggs/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 90c64ed42b (8 days ago), 2023-03-21 11:27:08 -0500 • Engine revision 9aa7816315 • Dart version 2.19.5 • DevTools version 2.20.1 Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at /Users/peterbriggs/Library/Android/sdk • Platform android-33, build-tools 32.0.0 • ANDROID_HOME = /Users/peterbriggs/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.12.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840) [✓] Connected device (3 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31) (emulator) • macOS (desktop) • macos • darwin-x64 • macOS 13.2.1 22D68 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.146 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found!
bartekpacia commented 1 year ago

I'm sorry but I have to close this issue since it doesn't contain all the needed information.

If you look closely at the logs, you'll see that connectivity_plus plugin failed to build. Since it's an external dependency, I can't help.