Home > Back-end >  A snapshot operation for ‘pixel_4a_api30’ is pending and timeout has expired
A snapshot operation for ‘pixel_4a_api30’ is pending and timeout has expired

Time:12-28

I'm trying to launch android emulator on Jenkins(deployed on linux machine) by the command:

$ANDROID_HOME/emulator/emulator @pixel_4a_api30 -no-snapshot-load

And I have the next input from command

INFO    | Android emulator version 31.3.14.0 (build_id 9322596) (CL:N/A)
emulator: INFO: Found systemPath /opt/android-sdk-linux/system-images/android-30/google_apis_playstore/x86_64/
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
ERROR   | A snapshot operation for 'pixel_4a_api30' is pending and timeout has expired. Exiting...
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.

What does I do wrong I how to fix that?

I've tried to use this answer - https://stackoverflow.com/a/57327650/14056328 but for me its not working, because I haven't any *.lock files in emulator directory - the all what I have is only 2 files: config.ini and userdata.img

Also the important note, I created emulator using on user and after that I moved *.avd folder and *.ini file which was created into another folder and for another user, maybe this can lead to my problem?

CodePudding user response:

After a long investigation the problem was that the original ownership of files was for root user and not for jenkins user. I created emulator again from root user and moved all created files ~/.android/avd/pixel_4a_api30.avd and ~/.android/avd/pixel_4a_api30.ini to jenkins root/.android/avd and also moved ownership from root user to jenkins user so the ownership for .ini file became

-rw-r--r-- 1 jenkins    jenkins     127 Dec 16 07:57 pixel_4a_api30.ini

and owner rights for .avd folder became

drwxr-xr-x 2 jenkins    jenkins    4096 Dec 17 08:32 pixel_4a_api30.avd

And also make sure that in file with .ini extention lays correct path to avd folder

  • Related