ReactiveCircus / android-emulator-runner

A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines.
Apache License 2.0
977 stars 193 forks source link

Failed to open the device 'kvm': No such file or directory #367

Closed antoniosb closed 10 months ago

antoniosb commented 10 months ago

I'm following the README.md and using the action in my workflow as follows:

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v3

      - name: Enable KVM
        run: |
          echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
          sudo udevadm control --reload-rules
          sudo udevadm trigger --name-match=kvm

      - name: run tests
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 29
          script: ./gradlew connectedCheck

Although, when I open/push to my repo, I receive the following error:

Failed to open the device 'kvm': No such file or directory
Error: Process completed with exit code 1.

The full output of the step is:

Run echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
  echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
  sudo udevadm control --reload-rules
  sudo udevadm trigger --name-match=kvm
  shell: /usr/bin/bash -e {0}
KERNEL=="kvm", GROUP="kvm", MODE="0[6](https://github.com/betrybe/android-000-projeto-login-social-2024-01-23-17-25-28/actions/runs/7631892624/job/20791440958#step:3:7)66", OPTIONS+="static_node=kvm"
Failed to open the device 'kvm': No such file or directory
Error: Process completed with exit code 1.
image
ychescale9 commented 10 months ago

Is your repo public or are you paying for larger runners? KVM is only available for free for public repos. See https://github.com/ReactiveCircus/android-emulator-runner/issues/46#issuecomment-1901774678

antoniosb commented 10 months ago

The repo is private 😓 Changing it to public and now the tests are being executed!

Thanks for the quick response and ref! 🤝