leancodepl / patrol

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

Trouble to get Patrol working with Android 15 #2438

Open Friesenjung opened 1 day ago

Friesenjung commented 1 day ago

Steps to reproduce

  1. Installing Patrol like described on the website
  2. running the example_test.dart on Android Pixel 7 Pro API 35 emulator with the following command: patrol test -t integration/example_test.dart -d emulator-5554 --verbose

Actual results

I got the following response from patrol process:

✗ Failed to execute tests of apk with entrypoint test_bundle.dart on emulator-5554 (Gradle test execution failed with code 1) (8.7s)
Exception: Gradle test execution failed with code 1

I thought the reason might be the Java version, so I installed openjdk@17 through homebrew. Afterwards I used the following command:

flutter config --jdk-dir /opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home

to ensure that this version is used. But it made no difference. Are there any additional tweaks or entries I should look at?

Thanks for your help. On iOS it works fine, and it is really awesome. Thanks for that tool! Hope to get it running on Android as well. Kind regards, Jonas

Logs

Logs [logs.txt](https://github.com/user-attachments/files/17968945/logs.txt)

Patrol version

patrol: ^3.13.0 patrol_cli v3.4.0

Patrol Doctor output

Patrol Doctor output ``` patrol doctor --verbose Verbose mode enabled. More logs will be printed. Patrol doctor: Patrol CLI version: 3.4.0 Flutter command: flutter Flutter 3.24.4 • channel stable Android: • Program adb found in /Users/jonasrosskamp/Library/Android/sdk/platform-tools/adb • Env var $ANDROID_HOME set to /Users/jonasrosskamp/Library/Android/sdk iOS / macOS: • Program xcodebuild found in /usr/bin/xcodebuild • Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller ```

Flutter Doctor output

Flutter Doctor output ``` flutter doctor --verbose [✓] Flutter (Channel stable, 3.24.4, on macOS 15.1.1 24B91 darwin-arm64, locale en-DE) • Flutter version 3.24.4 on channel stable at /Users/jonasrosskamp/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 603104015d (5 weeks ago), 2024-10-24 08:01:25 -0700 • Engine revision db49896cf2 • Dart version 3.5.4 • DevTools version 2.37.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/jonasrosskamp/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/jonasrosskamp/Library/Android/sdk • Java binary at: /opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.16.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2024.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11) [✓] IntelliJ IDEA Community Edition (version 2024.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 82.2.4 • Dart plugin version 243.22562.3 [✓] Connected device (6 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 15 (API 35) (emulator) • iPhone von Jonas (mobile) • XXXX • ios • iOS 18.1.1 22B91 • iPhone 15 Pro (mobile) • XXXX • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 15.1.1 24B91 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.1.1 24B91 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.86 [✓] Network resources • All expected network resources are available. • No issues found! ```
Friesenjung commented 1 day ago

I just read a comment in an other issue that it could run with API 34 and it does! But why does it not run with API 35?

zoskar commented 2 hours ago

hi @Friesenjung Thank you for report. There is a problem with Patrol and API 35. We are currently investigating it.