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

Getting Unknown platform error occurred when running the UTP test suite #263

Closed
TimPushkin opened this issue Aug 20, 2022 · 1 comment
Closed

Comments

@TimPushkin
Copy link

TimPushkin commented Aug 20, 2022

I run the action like this on macos-latest:

- name: Cache AVD
  uses: actions/cache@v3
  id: avd-cache
  with:
    path: |
      ~/.android/avd/*
      ~/.android/adb*
    key: avd

- name: Create AVD and generate a snapshot for caching
  if: steps.avd-cache.outputs.cache-hit != 'true'
  uses: reactivecircus/android-emulator-runner@v2
  with:
    api-level: 31
    arch: x86_64
    force-avd-creation: false
    emulator-options: -no-audio -no-window -no-boot-anim -camera-back none -camera-front none -gpu swiftshader_indirect
    script: echo "Generated AVD snapshot for caching"

- name: Run instrumented tests
  uses: reactivecircus/android-emulator-runner@v2
  with:
    api-level: 31
    arch: x86_64
    force-avd-creation: false
    emulator-options: -no-audio -no-window -no-snapshot-save -no-boot-anim -camera-back none -camera-front none -gpu swiftshader_indirect
    script: ./gradlew connectedDebugAndroidTest

And get this error, even though the tests run absolutely fine locally:

> Task :app:connectedDebugAndroidTest

Test results saved as file:/Users/runner/work/DepNav/DepNav/app/build/outputs/androidTest-results/connected/test-result.pb. Inspect these results in Android Studio by selecting Run > Import Tests From File from the menu bar and importing test-result.pb.
Unknown platform error occurred when running the UTP test suite. Please check logs for details.

> Task :app:connectedDebugAndroidTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:connectedDebugAndroidTest'.
> There were failing tests. See the report at: file:///Users/runner/work/DepNav/DepNav/app/build/reports/androidTests/connected/index.html

* 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/

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

BUILD FAILED in 2m 51s
70 actionable tasks: 70 executed
Error: The process '/bin/sh' failed with exit code 1

I tried clearing CI cache, but nothing changed. I also tried using target: google-apis and api-level: 32, but this setup just keeps time-outing.

@mrk-han
Copy link
Collaborator

mrk-han commented Oct 6, 2022

@TimPushkin I had to go into my config.ini and quadrupled the size of my emulator which fixed this. Well, I put the data partition from 800M to 3200M. Had the exact same issue. I think it came after updating to 3.5.0 espresso alpha, my AGP, my gradle and adding testInstrumentationRunnerArguments useTestStorageService: 'true' to my defaultConfig

@mrk-han mrk-han closed this as completed Oct 19, 2022
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

2 participants