Virtual-device-testing-for-android (exit code: 1)

Bitrise Build Issue Report template

Description of the issue

Sometimes the step fails without any error description. about 50% of the time.

Environment:

Where did the issue happen?
Android & Docker, on Ubuntu 16.04

Which build Step causes the issue and which version of the step?

virtual-device-testing-for-android v1.0.1

Reproducibility

  • _Does a “Rebuild” help? YES
  • _Does a rebuild without caches help? haven’t tried
  • Does the issue happen sporadically, or every time? : 50%
  • Does upgrading the build Step to the latest version help? : no newer version
  • When did the issue start? : since we started using this step.

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Haven’t tried.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( Bitrise CLI )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: Redirecting… .
Haven’t tried.

Build log

1 Like

Hi @giladgotman,

Did you check the results on the Virtual Device Test tab?

Hello. I do not see the Virtual Device Tests tab? Did I mess up with the configuration somewhere?

---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
trigger_map: 
"-push_branch": weather_4.8
workflows:
  deploy:
    description: |
      ## How to get a signed APK

      This workflow contains the **Sign APK** step. To sign your APK all you have to do is to:

      1. Click on **Code Signing** tab
      1. Find the **ANDROID KEYSTORE FILE** section
      1. Click or drop your file on the upload file field
      1. Fill the displayed 3 input fields:
       1. **Keystore password**
       1. **Keystore alias**
       1. **Private key password**
      1. Click on **[Save metadata]** button

      That's it! From now on, **Sign APK** step will receive your uploaded files.

      ## To run this workflow

      If you want to run this workflow manually:

      1. Open the app's build list page
      2. Click on **[Start/Schedule a Build]** button
      3. Select **deploy** in **Workflow** dropdown input
      4. Click **[Start Build]** button

      Or if you need this workflow to be started by a GIT event:

      1. Click on **Triggers** tab
      2. Setup your desired event (push/tag/pull) and select **deploy** workflow
      3. Click on **[Done]** and then **[Save]** buttons

      The next change in your repository that matches any of your trigger map event will start **deploy** workflow.
    steps:
    - activate-ssh-key@4:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone@6: {}
    - cache-pull@2: {}
    - install-missing-android-tools@3:
        inputs:
        - gradlew_path: "$PROJECT_LOCATION/gradlew"
    - change-android-versioncode-and-versionname@1:
        inputs:
        - build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
    - android-build@1:
        inputs:
        - module: app
        - variant: Debug
    - gradle-runner@2:
        inputs:
        - gradle_task: assembleDebugAndroidTest
        - gradlew_path: "./gradlew"
        - gradle_file: "$PROJECT_LOCATION/app/build.gradle"
    - virtual-device-testing-for-android@1:
        inputs:
        - test_devices: NexusLowRes,27,en,portrait
        - test_type: instrumentation
    - sign-apk@1:
        run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
    - deploy-to-bitrise-io@2: {}
    - cache-push@2: {}
meta:
  bitrise.io:
    stack: linux-docker-android-20.04
    machine_type_id: elite
app:
  envs:
  - opts:
      is_expand: false
    PROJECT_LOCATION: "."
  - opts:
      is_expand: false
    MODULE: app
  - opts:
      is_expand: false
    VARIANT: debug