在 Azure pipeline Mac Agents 上随机启动 Android 模拟器失败

问题描述 投票:0回答:0

在我们的管道中,Mac 代理上的 Android 模拟器有 10% 的几率无法启动。 到目前为止,一旦失败,我们必须重新启动该阶段。 有人遇到过类似的问题吗?

错误信息是

  /Users/runner/Library/Android/sdk/cmdline-tools/latest/bin/avdmanager create avd --name ort_android --package 'system-images;android-31;default;x86_64' --force
Loading local repository...                                                     
[=========                              ] 25% Loading local repository...       
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
Auto-selecting single ABI x86_64
Do you wish to create a custom hardware profile? [no] 2023-05-11 21:31:38,089 util.run [DEBUG] - Subprocess completed. Return code: 0
2023-05-11 21:31:38,090 util.android [DEBUG] - Starting process - args: ['/Users/runner/Library/Android/sdk/tools/emulator', '-avd', 'ort_android', '-memory', '4096', '-timezone', 'America/Los_Angeles', '-no-snapshot', '-no-audio', '-no-boot-anim', '-no-window', '-partition-size', '4096']
2023-05-11 21:31:38,095 util.android [DEBUG] - Starting process - args: ['/Users/runner/Library/Android/sdk/platform-tools/adb', 'wait-for-device', 'shell', 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82']
* daemon not running; starting now at tcp:5037
* daemon started successfully
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
WARNING | Your GPU drivers may have a bug. Switching to software rendering.
WARNING | cannot add library /Users/runner/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
objc[7310]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x7ffb56a28ec8) and /Users/runner/Library/Android/sdk/emulator/lib64/gles_angle/libGLESv2.dylib (0x110e38748). One of the two will be used. Which one is undefined.
INFO    | Storing crashdata in: /tmp/android-runner/emu-crash.db, detection is enabled
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null))
INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null))
INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_resizable_requested(PresetEmulatorSizeType) ((null):0, (null))
INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_resizable_dialog() ((null):0, (null))
INFO    | added library /Users/runner/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
INFO    | Sending adb public key [****************************************************************************************************************************************************************************************************]
INFO    | Warning: QCssParser::parseHexColor: Unknown color name '#FFFFFFs' ((null):0, (null))
pc_memory_init: above 4g size: 40000000
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
[7337:37834:20230511,213152.538710:WARNING crash_report_exception_handler.cc:235] UniversalExceptionRaise: (os/kern) failure (5)
2023-05-11 21:31:53,049 util.android [DEBUG] - Stopping process - args: ['/Users/runner/Library/Android/sdk/platform-tools/adb', 'wait-for-device', 'shell', 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82']
2023-05-11 21:31:53,051 util.android [DEBUG] - Stopping process - args: ['/Users/runner/Library/Android/sdk/tools/emulator', '-avd', 'ort_android', '-memory', '4096', '-timezone', 'America/Los_Angeles', '-no-snapshot', '-no-audio', '-no-boot-anim', '-no-window', '-partition-size', '4096']

我曾经尝试过

retryCountOnTaskFailure
作为解决方法。但它没有用。 阶段/作业只能通过重新运行才能通过。

macos azure-devops android-emulator
© www.soinside.com 2019 - 2024. All rights reserved.