Issue
I am trying to set up my mobile automation pack in Jenkins. As a first step, when I try to launch a emulator using Jenkins Android Emulator plugin, I am getting below error
Job Config
Android SDK details
Below is the error
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe start-server
[android] Snapshots are enabled, but cannot be used as they are not supported by the current SDK Tools
[android] Starting Android emulator
[android] Erasing existing emulator data...
$ C:\Users\Divakar\AppData\Local\Android\sdk/emulator/emulator.exe -ports 5764,5765 -report-console tcp:5850,max=60 -avd Pixel_2_Pie_9.0 -wipe-data -no-window
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
dsound: Could not set cooperative level for window 0000000000000000
dsound: Reason: An invalid parameter was passed to the returning function
audio: Could not init `dsound' audio driver
emulator: WARNING: Requested adb port (5765) is outside the recommended range [5555,5586]. ADB may not function properly for the emulator. See -help-port for details.
[android] Emulator reported that the console is available on port 5,764
[android] Waiting for emulator to finish booting...
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
ERROR: Timeout after 90000 milliseconds
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
emulator: INFO: boot completed
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: Revoking microphone permissions for Google App.
ERROR: Timeout after 90000 milliseconds
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
ERROR: Timeout after 90000 milliseconds
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
ERROR: Timeout after 90000 milliseconds
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
ERROR: Timeout after 90000 milliseconds
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
ERROR: Timeout after 90000 milliseconds
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5764 wait-for-device shell getprop dev.bootcomplete
ERROR: Timeout after 90000 milliseconds
[android] Timed-out after waiting 720 seconds for emulator
[android] Stopping Android emulator
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe kill-server
emulator: Saving state on exit with session uptime 730379 ms
Finished: NOT_BUILT
After reducing the emulator RAM to 768MB, I can rid off the above issue. However I cant see any devices connected in adb devices command. If you see the below log, it started and immediately stopped.
Building in workspace C:\Program Files\Jenkins\Jenkins.jenkins\workspace\AVD_Manager_Start_Emulator
[android] Failed to create file or directory: C:\WINDOWS\system32\config\systemprofile\.android
[android] Using Android SDK: C:\Users\Divakar\AppData\Local\Android\sdk
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe start-server
* daemon not running; starting now at tcp:5813
* daemon started successfully
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe start-server
[android] Snapshots are enabled, but cannot be used as they are not supported by the current SDK Tools
[android] Starting Android emulator
[android] Erasing existing emulator data...
$ C:\Users\Divakar\AppData\Local\Android\sdk/emulator/emulator.exe -ports 5754,5755 -report-console tcp:5838,max=60 -avd Pixel_2_Pie_9.0 -wipe-data -no-window
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
dsound: Could not set cooperative level for window 0000000000000000
dsound: Reason: An invalid parameter was passed to the returning function
audio: Could not init `dsound' audio driver
emulator: WARNING: Requested adb port (5755) is outside the recommended range [5555,5586]. ADB may not function properly for the emulator. See -help-port for details.
[android] Emulator reported that the console is available on port 5,754
[android] Waiting for emulator to finish booting...
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is ''
emulator: INFO: boot completed
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: Revoking microphone permissions for Google App.
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop dev.bootcomplete
[android] Emulator reported that the startup process is '1'
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe -s emulator-5754 shell logcat -v time
[android] Emulator is ready for use (took 283 seconds)
[AVD_Manager_Start_Emulator] $ cmd /c call C:\WINDOWS\TEMP\jenkins8495526174755772173.bat
C:\Program Files\Jenkins\Jenkins.jenkins\workspace\AVD_Manager_Start_Emulator>exit 0
[android] Stopping Android emulator
emulator: Saving state on exit with session uptime 257552 ms
[android] Archiving emulator log
$ C:\Users\Divakar\AppData\Local\Android\sdk/platform-tools/adb.exe kill-server
Finished: SUCCESS
Solution
The issue has been resolved. Please find the steps that I have followed
- Uninstall Jenkins
- Install war file
Thats all
Answered By - Divakar Ragupathy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.