bitrise-steplib / steps-virtual-device-testing-for-android

MIT License
22 stars 23 forks source link

latest virtual-device-testing-for-android throwing weird go error #5

Closed cl1ent closed 6 years ago

cl1ent commented 6 years ago

hello,

i've set up a android job on bitrise with the following bitrise.yml

---
format_version: '3'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
trigger_map:
- push_branch: "*"
  workflow: primary
- pull_request_source_branch: "*"
  workflow: primary
workflows:
  primary:
    steps:
    - activate-ssh-key:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone:
        inputs:
        - clone_depth: '3'
    - cache-pull: {}
    - android-sdk-update:
        inputs:
        - tools: 'on'
        - platform_tools: stable
        - build_tools: 26.0.1
    - install-missing-android-tools: {}
    - gradle-runner:
        inputs:
        - gradle_task: assembleDebug assembleDebugAndroidTest
        - gradle_options: "--stacktrace"
        title: Gradle Runner - UI testing
    - virtual-device-testing-for-android:
        inputs:
        - test_type: instrumentation
        - test_apk_path: "$BITRISE_APK_PATH"
    - cache-push:
        is_always_run: true
app:
  envs:
  - opts:
      is_expand: false
    GRADLE_BUILD_FILE_PATH: build.gradle
  - opts:
      is_expand: false
    GRADLEW_PATH: "./gradlew"

everything runs fine until the virtual-device-testing-for-android step comes, which failes with a seemingly weird go error

+------------------------------------------------------------------------------+

| (6) virtual-device-testing-for-android                                       |
+------------------------------------------------------------------------------+
| id: virtual-device-testing-for-android                                       |
| version: 0.9.7                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-10-11T13:36:04Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[13:36:04] Start installing (golang) with apt-get       
INFO[13:36:04]  * [OK] Step dependency (go) installed, available. 
Configs:
- ApkPath: /bitrise/deploy/app-debug-androidTest.apk
- TestTimeout: 900
- DirectoriesToPull: 
- EnvironmentVariables: 
- TestDevices:
---
Model         API Level   Locale     Orientation   
NexusLowRes   24          portrait   en            
---
- AppPackageID: 
- TestType: instrumentation
- TestApkPath: /bitrise/deploy/app-debug-androidTest.apk
- InstTestPackageID: 
- InstTestRunnerClass: 
- InstTestTargets: 
Upload APKs
=> APKs uploaded
Start test
=> Test started
Waiting for test results
- Validating
Failed to unmarshal response body, error: [invalid character 'F' looking for beginning of value Failed to get test matrix, error: No executions found for this matrixID(matrix-3s98uq965s5jh), state: INVALID(TEST_SAME_AS_APP)], body: %!s(MISSING)
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | virtual-device-testing-for-android (exit code: 1)             | 25 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...se-steplib/steps-virtual-device-testing-for-android/issues |
| Source: ...thub.com/bitrise-steplib/steps-virtual-device-testing-for-android |
+---+---------------------------------------------------------------+----------+

can someone investigate the Failed to unmarshal response body, error: [invalid character 'F' looking for beginning of value Failed to get test matrix, error: No executions found for this matrixID(matrix-3s98uq965s5jh), state: INVALID(TEST_SAME_AS_APP)], body: %!s(MISSING) error or tell me how to fix it?

any help would be appreciated, thanks!

trapacska commented 6 years ago

Hey @cl1ent ! Thank you for reporting here, however this is not a step or VDT server issue, regarding to the error message it is an issue with the inputs. Seems like you've given the same APK for both input field: apk_path and test_apk_path. If you need further help to separate your two APKs, please read this post: https://discuss.bitrise.io/t/how-to-run-android-ui-tests-on-virtual-devices/2496/4?u=tamaspapik

Closing the issue for now, but please feel free to re-open if you encounter any issue with it.