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

config.ini: No such file or directory #138

Closed
soriyathach opened this issue Mar 22, 2021 · 4 comments
Closed

config.ini: No such file or directory #138

soriyathach opened this issue Mar 22, 2021 · 4 comments

Comments

@soriyathach
Copy link

I have a CI worklow using android-emulator-runner@v2, it was working well until the last update I think (2.15.0). I am getting now this error :

/bin/sh -c \echo no | avdmanager create avd --force -n test --abi 'google_apis/x86' --package 'system-images;android-30;google_apis;x86' --device 'Nexus 6'
Loading local repository...                                                     
[=========                              ] 25% Loading local repository...       
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
/bin/sh -c \printf 'hw.cpu.ncore=2
' >> ~/.android/avd/test.avd/config.ini
/bin/sh: line 1: /Users/soriya-x64/.android/avd/test.avd/config.ini: No such file or directory
/Users/soriya-x64/android-sdk/platform-tools/adb -s emulator-5554 emu kill
OK: killing emulator, bye bye
OK

It seems to be linked to this commit : #130. My build is working correctly if I force the version back to 2.14.3.

@ychescale9
Copy link
Member

Looks like you're using a self-hosted runner? can you confirm if /Users/soriya-x64/.android/avd/test.avd exist?
It would also help if you could share the logs for a successful build (with 2.14.3) :)

@soriyathach
Copy link
Author

Yep, self-hosted runner on a macbook x64. I wasn't able to see if the emulator has correctly been created, the .android folder is always deleted at the end of the flow. For me the issue is at this moment :

await exec.exec(`sh -c \\"printf 'hw.cpu.ncore=${cores}\n' >> ~/.android/avd/"${avdName}".avd"/config.ini`);
.

Here is the log at the same moment for 2.14.3 :

/bin/sh -c \echo no | avdmanager create avd --force -n test --abi 'google_apis/x86' --package 'system-images;android-30;google_apis;x86' --device 'Nexus 6'
Loading local repository...                                                     
[=========                              ] 25% Loading local repository...       
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
Starting emulator.
/bin/sh -c \/Users/soriya-x64/android-sdk/emulator/emulator -avd test -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim &
handleCpuAcceleration: feature check for hvf
cannot add library /Users/soriya-x64/android-sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
added library /Users/soriya-x64/android-sdk/emulator/lib64/vulkan/libvulkan.dylib
emulator: WARNING: Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
emulator: feeding guest with passive gps data, in headless mode
emulator: INFO: GrpcServices.cpp:301: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: Cold boot: requested by the user

@jacobras
Copy link

jacobras commented Jun 3, 2021

New user of this library here, getting the same error. (Also on a self-hosted runner).

Logs for v2:

Creating AVD.
/bin/sh -c \echo no | avdmanager create avd --force -n test --abi 'default/x86' --package 'system-images;android-29;default;x86' --device 'pixel_2'
Loading local repository...                                                     
[=========                              ] 25% Loading local repository...       
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
/bin/sh -c \printf 'hw.cpu.ncore=2
' >> ~/.android/avd/test.avd/config.ini
/bin/sh: line 1: /Users/jenkins/.android/avd/test.avd/config.ini: No such file or directory
/Users/jenkins/android-sdk/platform-tools/adb -s emulator-5554 emu kill
error: could not connect to TCP port 5554: Connection refused
The process '/Users/jenkins/android-sdk/platform-tools/adb' failed with exit code 1
Error: The process '/bin/sh' failed with exit code 1

I don't see the .android folder at all but maybe it's deleted after the action finishes. Would it make sense to add an option to keep the emulator instead of deleting it?

Because @soriyathach mentioned that 2.14.3 used to work, I downgraded to that version and the emulator booted.

@mrk-han
Copy link
Collaborator

mrk-han commented Nov 2, 2022

Check out #197 for a workaround

@mrk-han mrk-han closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants