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

Test pass on Android without really running on emulator #1106

Closed
AlexisDeslandes opened this issue Mar 21, 2023 · 15 comments
Closed

Test pass on Android without really running on emulator #1106

AlexisDeslandes opened this issue Mar 21, 2023 · 15 comments

Comments

@AlexisDeslandes
Copy link

Describe the bug

The test pass without running on the device.

To Reproduce

Steps to reproduce the behavior:

  1. Start the emulator, in our case Pixel 4a API 33
  2. Run patrol test --flavor qa
  3. Result:
No device specified, using the first one (emulator-5554)
Every test target will be run 1 time(s)
• Building apk with entrypoint authentication_test.dart...
        Note: /Users/adeslandes/.pub-cache/hosted/pub.dev/device_info-2.0.3/android/src/main/java/io/flutter/plugins/deviceinfo/DeviceInfoPlugin.java uses unchecked or unsafe operations.
        Note: Recompile with -Xlint:unchecked for details.
        Note: Some input files use or override a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
        Note: /Users/adeslandes/.pub-cache/hosted/pub.dev/firebase_messaging-14.2.1/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingPlugin.java uses unchecked or unsafe operations.
        Note: Recompile with -Xlint:unchecked for details.
        Note: Some input files use or override a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
        Note: Some input files use unchecked or unsafe operations.
        Note: Recompile with -Xlint:unchecked for details.
        Note: Some input files use or override a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
        Note: /Users/adeslandes/.pub-cache/hosted/pub.dev/local_auth_android-1.0.17/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java uses or overrides a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
        Note: /Users/adeslandes/.pub-cache/hosted/pub.dev/uni_links-0.5.1/android/src/main/java/name/avioli/unilinks/UniLinksPlugin.java uses or overrides a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
✓ Completed building apk with entrypoint authentication_test.dart (18.4s)
• Executing tests of apk with entrypoint authentication_test.dart on emulator-5554...
✓ Completed executing apk with entrypoint authentication_test.dart on emulator-5554 (5.9s)
 PASS  authentication_test.dart on emulator-5554

Expected behavior

I expect the test to run on the device.

Device information

  • Device: Pixel 4a emulator
  • OS version: Android API33
  • Does it also both on physical and virtual devices? Didn't check
Additional information

Flutter 3.7.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 12cb4eb7a0 (3 weeks ago) • 2023-03-01 10:29:26 -0800
Engine • revision ada363ee93
Tools • Dart 2.19.3 • DevTools 2.20.1

patrol: ^1.0.8

patrol_cli v1.1.0

@bartekpacia
Copy link
Contributor

Thanks for reporting this and sorry for the problems. This looks like a duplicate of #1079. Can you confirm?

For now, you can install an older version of patrol_cli like this:

dart pub global activate --source git https://github.com/leancodepl/patrol --git-path packages/patrol_cli --git-ref patrol_cli-v1.0.7

@AlexisDeslandes
Copy link
Author

I don't think so, my tests succeed and take only few seconds.

@mbilalakmal
Copy link

Facing the same issue when using older version of patrol_cli. My project also uses flavors and I haven't faced this issue on other projects which do not have flavors.

@djmasic
Copy link

djmasic commented Mar 25, 2023

Hello, I am having the same issue. My project also uses flavors, so that could be a lead. The previous version v1.0.7 didn't work for me. I also tried even older versions. I reproduced the issue on the physical device.

@bartekpacia
Copy link
Contributor

Hi y'all, sorry for the problems. At LeanCode we test apps with flavors and they work just fine, so I'm gonna bet that something is misconfigured in your apps. But it might be a bug as well :)

Could you please create and share a Minimal, Reproducible Example so that I can look into it and deploy a fix?

@mbilalakmal
Copy link

mbilalakmal commented Mar 26, 2023

Hi @bartekpacia , I hope this is sufficient. I am using patrol_cli v1.0.7 as suggested. Let me know if i missed something:
https://github.com/mbilalakmal/example_patrol_app

@bartekpacia
Copy link
Contributor

Thanks, @mbilalakmal!

I made a PR in your repo with a small change and the tests work.

Screen.Recording.2023-03-26.at.2.59.54.PM.mov

Can you confirm it works for you as well?

Details
patrol: ^1.0.8
$ patrol --version
patrol_cli v1.1.2

@mbilalakmal
Copy link

mbilalakmal commented Mar 26, 2023

Thanks, @mbilalakmal!

I made a PR in your repo with a small change and the tests work.

Can you confirm it works for you as well?

Details

Yes! It works fine for me. Now I need to double check which setup step I am not doing correctly in the real app. Thanks!

I might be mixing some Firebase Lab integration stuff with patrol integration steps in the real app. Is there by any chance an example repo that does integrate both? It would make it much easier to setup the MainActivityTest.java file for devs not coming from native background

@djmasic
Copy link

djmasic commented Mar 29, 2023

Hi @bartekpacia, I generated the Flutter Counter app and can still reproduce the issue on the device.
The example tests work correctly in the Patrol repo, but I cannot run tests with patrol test command in my project and the project I generated for this purpose: counterPatrol. You can see from the video that the tests passed, even should fail, and the app didn't run on the device on the right.

App_not_launched_when_patrol.mov

It is important to me to be able to run the tests with patrol test command because as I run the tests with flutter test, I get the strange exception on the flutter side 'package:flutter/src/foundation/binding.dart': Failed assertion: line 149 pos 12: '_debugInitializedType == null': is not true. whenever the nativeAutomation: true is included.

Here are my Flutter and Patrol doctor outputs:

Flutter doctor output

flutter doctor -v
[✓] Flutter (Channel stable, 3.7.8, on macOS 13.2.1 22D68 darwin-x64, locale en-US)
• Flutter version 3.7.8 on channel stable at /Users/dj.masic/Development/flutter_sdk/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

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/dj.masic/Development/android_sdk
• Platform android-33, build-tools 33.0.1
• ANDROID_HOME = /Users/dj.masic/Development/android_sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• 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.11.3

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

[✓] Android Studio (version 2021.1)
• 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.11+0-b60-7590822)

[✓] VS Code (version 1.76.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.60.0

[✓] Connected device (3 available)
• SM S901B (mobile) • R3CT804W1GZ • android-arm64 • Android 12 (API 31)
• macOS (desktop) • macos • darwin-x64 • macOS 13.2.1 22D68 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.110

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

Patrol doctor

Patrol CLI version: 1.1.3
Program adb found in /Users/dj.masic/Development/android_sdk/platform-tools/adb
Env var $ANDROID_HOME set to /Users/dj.masic/Development/android_sdk
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller found in /usr/local/bin/ideviceinstaller
Program ios-deploy found in /usr/local/bin/ios-deploy

I look forward to hearing from you to give me a heads-up if I am missing something. Thanks!
PS: if you need some additional info, let me know. Thanks!

@bartekpacia
Copy link
Contributor

bartekpacia commented Mar 29, 2023

Thanks for creating the reproduction repository, @djmasic!

Your app doesn't have native automation set up. The detailed instruction explaining how to do it are in our docs.

This is not a bug on our side, but on Android's, but we track it nevertheless in #843.

@bartekpacia
Copy link
Contributor

I'm pretty confident this is not a valid issue, but a misconfiguration/complete lack of it from the user's side.

Please open a new issue and fill it out carefully in case you encounter this problem again, but before you do so, make sure you've set up the native automation correctly.

@bartekpacia bartekpacia closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@djmasic
Copy link

djmasic commented Mar 29, 2023

I'm pretty confident it is. It behaves the same whether the nativeAutomation: true is set or not. I closely followed the docs. I feel you didn't even read what I said. However, thanks. I'll find another way around it.

@bartekpacia
Copy link
Contributor

bartekpacia commented Mar 29, 2023

Sorry, I didn't mean to sound rude. I did read your comment and cloned your repo, and saw that you're missing Android configuration.

For native automation features (so essentially $.native), you have to use the patrol test command, because it implements some specific things that are needed for it to work. flutter test doesn't work, and in the near future, it won't.

But to use patrol test command, you have to perform a one-time setup on the native side of your app. This process is described here.

@PeterBriggsGreggs
Copy link

Hi @bartekpacia,
I'm also having problems getting the tests to run on the emulator or a physical device. I didn't have the Android configuration for running Native so I have added that, however, I also found that I was having problems with builds using the JDK version 19 which I had to install. After checking StackOverflow I found other people having problems with Gradle builds on JDK versions above JDK17. I have now down graded my Java JDK to openjdk-17 and set the necessary PATH details.

The problem I am now getting is to do with the builder not being able to find some Patrol class that are needed for the build, as shown below.

Please can you tell me what I'm missing or doing wrong.
Thank you for you help.

image

Patrol version: patrol_cli v1.1.3

Patrol Doctor details:
image

Contents of MainActivityTest.java

package uk.co.greggs.gotg_apps_grecords.unstable;

import org.junit.Rule;
import org.junit.runner.RunWith;
import pl.leancode.patrol.PatrolTestRule;
import pl.leancode.patrol.PatrolTestRunner;

@RunWith(PatrolTestRunner.class)
public class MainActivityTest {
@rule
public PatrolTestRule rule = new PatrolTestRule<>(MainActivity.class);
}

Verbose output when running the test

peterbriggs@Peters-MBP-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:compressUnstableDebugAssets
    : Execution optimizations have been disabled for task ':app:compressUnstableDebugAssets' to ensure correctness due to the following reasons:
    :   - Gradle detected a problem with the following location: '/Users/peterbriggs/GOTG.Apps.GRecords/gotg_apps_grecords/build/app/intermediates/merged_assets/unstableDebug/out'. Reason: Task ':app:compressUnstableDebugAssets' uses this output of task ':app:copyFlutterAssetsUnstableDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
    : 
    : > Task :app:packageUnstableDebug UP-TO-DATE
    : > Task :app:assembleUnstableDebug
    : 
    : 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
    : 
    : Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
    : Please consult deprecation warnings for more details.
    : 
    : BUILD SUCCESSFUL in 17s
    : 230 actionable tasks: 7 executed, 223 up-to-date

$ ./gradlew :app:assembleUnstableDebugAndroidTest -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: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: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 UP-TO-DATE
: > Task :connectivity_plus:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :flutter_plugin_android_lifecycle:generateDebugBuildConfig UP-TO-DATE
: > Task :flutter_plugin_android_lifecycle:javaPreCompileDebug UP-TO-DATE
: > Task :flutter_plugin_android_lifecycle:compileDebugJavaWithJavac UP-TO-DATE
: > Task :flutter_plugin_android_lifecycle:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :image_picker_android:generateDebugBuildConfig UP-TO-DATE
: > Task :image_picker_android:javaPreCompileDebug UP-TO-DATE
: > Task :image_picker_android:compileDebugJavaWithJavac UP-TO-DATE
: > Task :image_picker_android:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :integration_test:generateDebugBuildConfig UP-TO-DATE
: > Task :integration_test:javaPreCompileDebug UP-TO-DATE
: > Task :integration_test:compileDebugJavaWithJavac UP-TO-DATE
: > Task :integration_test:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :isar_flutter_libs:generateDebugBuildConfig UP-TO-DATE
: > Task :isar_flutter_libs:javaPreCompileDebug UP-TO-DATE
: > Task :isar_flutter_libs:compileDebugJavaWithJavac UP-TO-DATE
: > Task :isar_flutter_libs:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :move_to_background:generateDebugBuildConfig UP-TO-DATE
: > Task :move_to_background:javaPreCompileDebug UP-TO-DATE
: > Task :move_to_background:compileDebugJavaWithJavac UP-TO-DATE
: > Task :move_to_background:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :package_info_plus:generateDebugBuildConfig UP-TO-DATE
: > Task :package_info_plus:compileDebugKotlin UP-TO-DATE
: > Task :package_info_plus:javaPreCompileDebug UP-TO-DATE
: > Task :package_info_plus:compileDebugJavaWithJavac UP-TO-DATE
: > Task :package_info_plus:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :path_provider_android:generateDebugBuildConfig UP-TO-DATE
: > Task :path_provider_android:javaPreCompileDebug UP-TO-DATE
: > Task :path_provider_android:compileDebugJavaWithJavac UP-TO-DATE
: > Task :path_provider_android:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :patrol:generateDebugBuildConfig UP-TO-DATE
: > Task :patrol:extractDebugProto UP-TO-DATE
: > Task :integration_test:processDebugJavaRes NO-SOURCE
: > Task :integration_test:bundleLibResDebug NO-SOURCE
: > Task :integration_test:bundleLibRuntimeToJarDebug UP-TO-DATE
: > Task :integration_test:createFullJarDebug UP-TO-DATE
: > Task :patrol:extractIncludeDebugProto UP-TO-DATE
: > Task :patrol:extractProto UP-TO-DATE
: > Task :patrol:generateDebugProto NO-SOURCE
: > Task :patrol:compileDebugKotlin UP-TO-DATE
: > Task :patrol:javaPreCompileDebug UP-TO-DATE
: > Task :patrol:compileDebugJavaWithJavac UP-TO-DATE
: > Task :patrol:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :syncfusion_flutter_pdfviewer:generateDebugBuildConfig UP-TO-DATE
: > Task :syncfusion_flutter_pdfviewer:javaPreCompileDebug UP-TO-DATE
: > Task :syncfusion_flutter_pdfviewer:compileDebugJavaWithJavac UP-TO-DATE
: > Task :syncfusion_flutter_pdfviewer:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :url_launcher_android:generateDebugBuildConfig UP-TO-DATE
: > Task :url_launcher_android:javaPreCompileDebug UP-TO-DATE
: > Task :url_launcher_android:compileDebugJavaWithJavac UP-TO-DATE
: > Task :url_launcher_android:bundleLibCompileToJarDebug UP-TO-DATE
: > Task :app:javaPreCompileUnstableDebug UP-TO-DATE
: > Task :app:preUnstableDebugAndroidTestBuild SKIPPED
: > Task :app:compileUnstableDebugAndroidTestAidl NO-SOURCE
: > Task :app:processUnstableDebugAndroidTestManifest UP-TO-DATE
: > Task :app:compileUnstableDebugAndroidTestRenderscript NO-SOURCE
: > Task :app:generateUnstableDebugAndroidTestBuildConfig UP-TO-DATE
: > Task :app:checkUnstableDebugAndroidTestAarMetadata UP-TO-DATE
: > Task :app:generateUnstableDebugAndroidTestResValues UP-TO-DATE
: > Task :app:generateUnstableDebugAndroidTestResources UP-TO-DATE
: > Task :app:mergeUnstableDebugAndroidTestResources UP-TO-DATE
: > Task :app:processUnstableDebugAndroidTestResources UP-TO-DATE
: > Task :app:javaPreCompileUnstableDebugAndroidTest UP-TO-DATE
: > Task :app:mergeUnstableDebugAndroidTestShaders UP-TO-DATE
: > Task :app:compileUnstableDebugAndroidTestShaders NO-SOURCE
: > Task :app:generateUnstableDebugAndroidTestAssets 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 :app:compileUnstableDebugKotlin
: > Task :image_picker_android:packageDebugAssets UP-TO-DATE
: > Task :app:compileUnstableDebugJavaWithJavac UP-TO-DATE
: > Task :app:bundleUnstableDebugClasses UP-TO-DATE
: > Task :app:compileUnstableDebugAndroidTestKotlin NO-SOURCE
:
: > Task :app:compileUnstableDebugAndroidTestJavaWithJavac FAILED
/Users/peterbriggs/GOTG.Apps.GRecords/gotg_apps_grecords/android/app/src/androidTest/java/uk/co/greggs/gotg_apps_grecords/unstable/MainActivityTest.java:11: error: cannot find symbol
public PatrolTestRule rule = new PatrolTestRule<>(MainActivity.class);
^
symbol: class MainActivity
location: class MainActivityTest
/Users/peterbriggs/GOTG.Apps.GRecords/gotg_apps_grecords/android/app/src/androidTest/java/uk/co/greggs/gotg_apps_grecords/unstable/MainActivityTest.java:11: error: cannot find symbol
public PatrolTestRule rule = new PatrolTestRule<>(MainActivity.class);
^
symbol: class MainActivity
location: class MainActivityTest
2 errors

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:compileUnstableDebugAndroidTestJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.
    
    * 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 4s
    : 
    : 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
    : 168 actionable tasks: 2 executed, 166 up-to-date

✗ Failed to build apk with entrypoint login_test.dart (Gradle build failed with code 1) (22.6s)
Exception: Gradle build failed with code 1
#0 AndroidTestBackend.build. (package:patrol_cli/src/android/android_test_backend.dart:90: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
peterbriggs@Peters-MBP-2 gotg_apps_grecords %

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants