Closed maaxg closed 1 month ago
@maaxg have you tried re-running the failed job with SSH and ssh'ing into the instance? Is adb
installed? Maybe the PATH is incorrectly setup?
Unfortunately I don't have a working example with the rn/android_test
job (source), as we are using an android machine executor and the commands directly in order to speed up things.
Here is how our setup looks like:
version: 2.1
aliases:
- &android_machine_image 2023.09.1
- &android_platform_version android-28
- &android_device Pixel_4_API_28
orbs:
android: circleci/android@2.0.0
rn: react-native-community/react-native@7.4.0
jobs:
# […]
android_test:
executor:
name: android/android-machine
tag: *android_machine_image
resource-class: large
parameters:
device:
description: The type of device you want to test on.
type: string
default: *android_device
platform_version:
description: The version of Android to run on the emulator.
type: string
default: *android_platform_version
detox_configuration:
description: The Detox configuration to test.
type: string
default: android.emu.release
steps:
- attach_workspace:
at: .
- run:
name: Install Yarn
command: npm install --global yarn
- run:
name: Install Detox
command: npm install --global detox-cli
- rn/yarn_install:
cache_folder: ~/.cache/yarn
- android/create-avd:
avd-name: <<parameters.device>>
system-image: system-images;<<parameters.platform_version>>;default;x86_64
install: true
additional-args: -d pixel
- android/start-emulator:
avd-name: <<parameters.device>>
gpu: auto
memory: 1024
additional-args: -accel on -logcat *:W | grep -i 'ReactNative\|com.reactnativecommunity'
restore-gradle-cache-post-emulator-launch: false
post-emulator-launch-assemble-command: ''
- rn/detox_test:
configuration: <<parameters.detox_configuration>>
workflows:
ci:
jobs:
# […]
- android_test:
name: android:test
requires:
- android:build
Hopefully that helps!
Alternatively, I suggest creating an example project on GH and I can try to take a closer look.
@fotos Hi! Thanks for your response. I didn't try re-running with SSH, I will give it a shot with your configuration and change my executor also, maybe that will do the trick for running it in circle ci.
I've opted to run the Detox tests on GitHub Actions, but it's a temporary solution until I figure out how to run it on Circle ci.
I've opened the issue thinking that would probably be a problem with the orb but since it's not, I think we can close this issue
Thank you for your time :)
Cool – I'll close the issue with the assumption that what you experience is not a problem with the orb.
If it is, and you have a repo that replicates the problem, feel free to re-open and I'll take a closer look.
Orb version
rn: react-native-community/react-native@8.0.0
What happened
Build's working fine but when the
rn/android_test
job starts, it breaks in the "ADB Start Stop" step with the following errorHere's my Config.yml file
Any idea of what is wrong?
Expected behavior
Ideally, the "ADB Start Stop" should not return an error