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

Running into hardware acceleration issues with the android_test job #144

Open
DaveyNedap opened this issue Mar 11, 2022 · 3 comments
Open
Labels
bug Something isn't working

Comments

@DaveyNedap
Copy link

Orb version

6.8.1

What happened

When running the android_test job we run into the following issue during the Start Android Emulator (background) step:

ERROR   | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: Android Emulator requires an Intel processor with VT-x and NX support.  (VT-x is not supported)
More info on configuring VM acceleration on macOS:
https://developer.android.com/studio/run/emulator-acceleration#vm-mac
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

This is our current config for the android_test job

      - rn/android_test:
          detox_configuration: android.emu.release
          node_version: '16.9.1'
          # Disabled Yarn cache because of issues: https://github.com/react-native-community/react-native-circleci-orb/issues/66
          yarn_cache: false
          xcode_version: '13.2.1'
          # requires:
          #   - build_android_release

Expected behavior

To be able to run the emulator in the rn/android_test

@DaveyNedap DaveyNedap added the bug Something isn't working label Mar 11, 2022
@jesperjohansson
Copy link

I'm having the same issue. Thought I could try running $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh but extras doesn't seem to exist on the VM.

@jesperjohansson
Copy link

jesperjohansson commented Mar 21, 2022

I finally got Detox on Android emulator working on CircleCI using their Android orb:

version: 2.1

orbs:
  rn: react-native-community/react-native@6.8.1
  android: circleci/android@2.0.0 # Added orb

jobs:
  android_build_detox:
    executor:
      name: rn/linux_android
      resource_class: 'medium'
    steps:
      - checkout
      - rn/yarn_install
      - run: yarn detox build -c android.emu.release
      - persist_to_workspace:
          root: ~/project
          paths:
            - android/app/build

  # Added job
  android_test:
    executor:
      name: android/android-machine
      resource-class: medium
      tag: 2021.10.1
    steps:
      - attach_workspace:
          at: .
      - android/create-avd:
          avd-name: Pixel_API_29_AOSP
          install: true
          system-image: system-images;android-29;default;x86
      - android/start-emulator:
          avd-name: Pixel_API_29_AOSP
          no-window: true
          post-emulator-launch-assemble-command: ""
      - run: npm install --global yarn
      - run: yarn detox test -c android.emu.release

@DaveyNedap
Copy link
Author

@jesperjohansson Thanks for this! We also switched to the android-machine yesterday and we almost got it working.

However, I do think that this should work in the orb without the use of a different orb/executor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants