appium / appium-uiautomator2-driver

Appium driver for Android UIAutomator2
Apache License 2.0
604 stars 176 forks source link

No driver found for chrome after upgraded to v2.44.2 #732

Closed Redinbox closed 9 months ago

Redinbox commented 9 months ago

Hello,

I have upgraded to latest version v2.44.2,then we are facing the issue

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome '120.0.6099'. Host info: host: Build info: version: '4.17.0', revision: 'e52b1be057*' System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '14.2.1', java.version: '17.0.6' Driver info: io.appium.java_client.android.AndroidDriver Command: [null, newSession {capabilities=[{appium:uiautomator2ServerLaunchTimeout=250000, appium:autoGrantPermissions=true, goog:chromeOptions={args=[--disable-popup-blocking, --start-maximized, chromeDriverExecutable, src/test/resources/drivers/chromedriver], extensions=[]}, appium:nativeWebScreenshot=true, browserName=chrome, appium:avd=Pixel_4_API_34, appium:deviceName=Pixel_4_API_34, platformName=ANDROID, appium:automationName=UIAutomator2}], desiredCapabilities=Capabilities {appium:autoGrantPermissions: true, appium:automationName: UIAutomator2, appium:avd: Pixel_4_API_34, appium:deviceName: Pixel_4_API_34, appium:nativeWebScreenshot: true, appium:uiautomator2ServerLaunchTimeout: 250000, browserName: chrome, goog:chromeOptions: {args: [--disable-popup-blocking, --start-maximized, chromeDriverExecutable, src/test/resources/drivers/...], extensions: []}, platformName: ANDROID}}] Capabilities {appium:autoGrantPermissions: true, appium:automationName: UIAutomator2, appium:avd: Pixel_4_API_34, appium:deviceName: Pixel_4_API_34, appium:nativeWebScreenshot: true, appium:uiautomator2ServerLaunchTimeout: 250000, browserName: chrome, goog:chromeOptions: {args: [--disable-popup-blocking, --start-maximized, chromeDriverExecutable, src/test/resources/drivers/...], extensions: []}, platformName: ANDROID}

in the previous latest version was working fine.

can you fix this?

KazuCocoa commented 9 months ago

https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#automatic-discovery-of-compatible-chromedriver should help to download a proper chromedriver.

Redinbox commented 9 months ago

Hello, I have tried by upgrading with correct version of chrome driver and by adding also. but now I am facing different issue. one thing I can say till yesterday everything was fine ,after upgrading tuiautomator2 ..we are facing al issues

2024-02-07 10:13:49:322 [HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"ANDROID","appium:automationName":"UIAutomator2","goog:chromeOptions":{"args":["chromeDriverExecutable","src/test/resources/drivers/chromedriver"],"extensions":[]},"appium:avd":"Pixel_4_API_34","browserName":"chrome"}}} 2024-02-07 10:13:49:322 [AppiumDriver@5cd6] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"ANDROID","appium:automationName":"UIAutomator2","goog:chromeOptions":{"args":["chromeDriverExecutable","src/test/resources/drivers/chromedriver"],"extensions":[]},"appium:avd":"Pixel_4_API_34","browserName":"chrome"}}] 2024-02-07 10:13:49:322 [AppiumDriver@5cd6] Event 'newSessionRequested' logged at 1707300829322 2024-02-07 10:13:49:324 [Appium] Attempting to find matching driver for automationName 'UIAutomator2' and platformName 'ANDROID' 2024-02-07 10:13:49:324 [Appium] The 'uiautomator2' driver was installed and matched caps. 2024-02-07 10:13:49:324 [Appium] Will require it at /Users/.appium/node_modules/appium-uiautomator2-driver 2024-02-07 10:13:49:325 [Appium] Requiring driver at /Users/.appium/node_modules/appium-uiautomator2-driver/build/index.js 2024-02-07 10:13:49:325 [Appium] Requiring driver at /Users/.appium/node_modules/appium-uiautomator2-driver/build/index.js 2024-02-07 10:13:49:325 [AppiumDriver@5cd6] Appium v2.4.1 creating new AndroidUiautomator2Driver (v2.44.2) session 2024-02-07 10:13:49:325 [AppiumDriver@5cd6] Checking BaseDriver versions for Appium and AndroidUiautomator2Driver 2024-02-07 10:13:49:325 [AppiumDriver@5cd6] Appium's BaseDriver version is 9.5.0 2024-02-07 10:13:49:325 [AppiumDriver@5cd6] AndroidUiautomator2Driver's BaseDriver version is 9.5.0 2024-02-07 10:13:49:326 [AppiumDriver@5cd6] There are no active sessions for cleanup 2024-02-07 10:13:49:328 [AppiumDriver@5cd6] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure 2024-02-07 10:13:49:328 [AppiumDriver@5cd6] Explicitly enabling use of insecure features: 2024-02-07 10:13:49:328 [AppiumDriver@5cd6] chromedriver_autodownload 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] Creating session with W3C capabilities: { 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "alwaysMatch": { 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "platformName": "ANDROID", 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "goog:chromeOptions": { 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "args": [ 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "chromeDriverExecutable", 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "src/test/resources/drivers/chromedriver" 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] ], 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "extensions": [] 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] }, 2024-02-07 10:13:49:328 [AndroidUiautomator2Driver@d4f1] "browserName": "chrome", 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] "appium:automationName": "UIAutomator2", 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] "appium:avd": "Pixel_4_API_34" 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] }, 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] "firstMatch": [ 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] {} 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] ] 2024-02-07 10:13:49:329 [AndroidUiautomator2Driver@d4f1] } 2024-02-07 10:13:49:332 [AndroidUiautomator2Driver@d4f1] The following provided capabilities were not recognized by this driver: 2024-02-07 10:13:49:332 [AndroidUiautomator2Driver@d4f1] goog:chromeOptions 2024-02-07 10:13:49:332 [AndroidUiautomator2Driver@d4f1 (a500a9ef)] Session created with session id: a500a9ef-3dca-4a48-b367-c455d6be8840 2024-02-07 10:13:49:332 [AndroidUiautomator2Driver@d4f1 (a500a9ef)] We're going to run a Chrome-based session 2024-02-07 10:13:49:332 [AndroidUiautomator2Driver@d4f1 (a500a9ef)] Deleting UiAutomator2 session 2024-02-07 10:13:49:332 [AndroidUiautomator2Driver@d4f1 (a500a9ef)] Unable to stop ChromeDriver proxies: Cannot read properties of undefined (reading 'proxyReqRes') 2024-02-07 10:13:49:333 [AppiumDriver@5cd6] Event 'newSessionStarted' logged at 1707300829333 (15:43:49 GMT+0530 (India Standard Time)) 2024-02-07 10:13:49:346 [AppiumDriver@5cd6] Encountered internal error running command: TypeError: Cannot read properties of undefined (reading 'getApiLevel')

KazuCocoa commented 9 months ago

I think the issue was fixed by https://github.com/appium/appium-uiautomator2-driver/pull/733

Redinbox commented 9 months ago

Really the newer version blocking us, can you suggest any stable version? Logs what we are facing issues; [AndroidUiautomator2Driver@c848] Creating session with W3C capabilities: { [AndroidUiautomator2Driver@c848] "alwaysMatch": { [AndroidUiautomator2Driver@c848] "goog:chromeOptions": { [AndroidUiautomator2Driver@c848] "args": [ [AndroidUiautomator2Driver@c848] "--disable-popup-blocking", [AndroidUiautomator2Driver@c848] "--start-maximized" [AndroidUiautomator2Driver@c848] ], [AndroidUiautomator2Driver@c848] "extensions": [] [AndroidUiautomator2Driver@c848] }, [AndroidUiautomator2Driver@c848] "browserName": "chrome", [AndroidUiautomator2Driver@c848] "platformName": "ANDROID", [AndroidUiautomator2Driver@c848] "appium:autoGrantPermissions": true, [AndroidUiautomator2Driver@c848] "appium:avdLaunchTimeout": 400000, [AndroidUiautomator2Driver@c848] "appium:androidInstallTimeout": 15000, [AndroidUiautomator2Driver@c848] "appium:adbExecTimeout": 1200000, [AndroidUiautomator2Driver@c848] "appium:skipDeviceInitialization": true, [AndroidUiautomator2Driver@c848] "appium:unicodeKeyboard": true, [AndroidUiautomator2Driver@c848] "appium:resetKeyboard": true, [AndroidUiautomator2Driver@c848] "appium:nativeWebScreenshot": true, [AndroidUiautomator2Driver@c848] "appium:avd": "Pixel_4_API_34", [AndroidUiautomator2Driver@c848] "appium:clearDeviceLogsOnStart": true, [AndroidUiautomator2Driver@c848] "appium:uiautomator2ServerLaunchTimeout": 400000, [AndroidUiautomator2Driver@c848] "appium:ignoreHiddenApiPolicyError": true, [AndroidUiautomator2Driver@c848] "appium:deviceName": "Pixel_4_API_34", [AndroidUiautomator2Driver@c848] "appium:newCommandTimeout": 10000, [AndroidUiautomator2Driver@c848] "appium:avdReadyTimeout": 400000, [AndroidUiautomator2Driver@c848] "appium:automationName": "UIAutomator2" [AndroidUiautomator2Driver@c848] }, [AndroidUiautomator2Driver@c848] "firstMatch": [ [AndroidUiautomator2Driver@c848] {} [AndroidUiautomator2Driver@c848] ] [AndroidUiautomator2Driver@c848] } [AndroidUiautomator2Driver@c848] The following provided capabilities were not recognized by this driver: [AndroidUiautomator2Driver@c848] goog:chromeOptions [AndroidUiautomator2Driver@c848] resetKeyboard [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Session created with session id: b9ad2ce2-846e-4a6c-9d82-23a0056a3009 [ADB] Found 5 'build-tools' folders under '/Users/user/Library/Android/sdk' (newest first): [ADB] /Users/user/Library/Android/sdk/build-tools/34.0.0 [ADB] /Users/user/Library/Android/sdk/build-tools/33.0.2 [ADB] /Users/user/Library/Android/sdk/build-tools/33.0.0 [ADB] /Users/user/Library/Android/sdk/build-tools/30.0.3 [ADB] /Users/user/Library/Android/sdk/build-tools/28.0.3 [ADB] Using 'adb' from '/Users/user/Library/Android/sdk/platform-tools/adb' [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 start-server' [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Emulator 'Pixel_4_API_34' is not running: Error getting AVD with retry. Original error: Condition unmet after 5077 ms. Timing out. [ADB] Launching Emulator with AVD Pixel_4_API_34, launchTimeout 400000ms and readyTimeout 400000ms [ADB] Using 'emulator' from '/Users/user/Library/Android/sdk/emulator/emulator' [ADB] Running '/Users/user/Library/Android/sdk/emulator/emulator' with args: -avd Pixel_4_API_34 -delay-adb [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] [AVD OUTPUT] INFO | Android emulator version 33.1.24.0 (build_id 11237101) (CL:N/A) [ADB] [AVD OUTPUT] INFO | Found systemPath /Users/user/Library/Android/sdk/system-images/android-34/google_apis_playstore/arm64-v8a/ [ADB] [AVD OUTPUT] INFO | Storing crashdata in: , detection is enabled for process: 59295 [ADB] [AVD OUTPUT] INFO | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag. [ADB] [AVD OUTPUT] INFO | Increasing RAM size to 2048MB [ADB] [AVD OUTPUT] INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null)) [ADB] [AVD OUTPUT] INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null)) [ADB] [AVD OUTPUT] INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_resizable_requested(PresetEmulatorSizeType) ((null):0, (null)) [ADB] [AVD OUTPUT] INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_resizable_dialog() ((null):0, (null)) [ADB] [AVD OUTPUT] module_list[0].crashpad_annotations["qemu-main-loop-args.txt"] (type = 1) = ===== QEMU main loop arguments ===== [ADB] [AVD OUTPUT] /Users/user/Library/Android/sdk/emulator/qemu/darwin-aarch64/qemu-system-aarch64 [ADB] [AVD OUTPUT] -dns-server [ADB] [AVD OUTPUT] 2409:40f2:1e:5966::27,192.168.201.147 [ADB] [AVD OUTPUT] -serial [ADB] [AVD OUTPUT] null [ADB] [AVD OUTPUT] -cpu [ADB] [AVD OUTPUT] cortex-a53 [ADB] [AVD OUTPUT] -machine [ADB] [AVD OUTPUT] type=virt [ADB] [AVD OUTPUT] -enable-hvf [ADB] [AVD OUTPUT] -smp [ADB] [AVD OUTPUT] cores=4 [ADB] [AVD OUTPUT] -m [ADB] [AVD OUTPUT] module_list[0].crashpad_annotations["avd_ini_path"] (type = 1) = /Users/user/.android/avd/../avd/Nexus_5X_API_34.avd/hardware-qemu.ini [ADB] [AVD OUTPUT] module_list[0].crashpad_annotations["avd_info.txt"] (type = 1) = hw.cpu.arch = arm64 [ADB] [AVD OUTPUT] hw.cpu.ncore = 4 [ADB] [AVD OUTPUT] hw.ramSize = 2048 [ADB] [AVD OUTPUT] hw.screen = multi-touch [ADB] [AVD OUTPUT] hw.mainKeys = false [ADB] [AVD OUTPUT] hw.trackBall = false [ADB] [AVD OUTPUT] hw.keyboard = true [ADB] [AVD OUTPUT] hw.keyboard.lid = false [ADB] [AVD OUTPUT] hw.keyboard.charmap = qwerty2 [ADB] [AVD OUTPUT] hw.dPad = false [ADB] [AVD OUTPUT] hw.rotaryInput = false [ADB] [AVD OUTPUT] hw.gsmModem = true [ADB] [AVD OUTPUT] hw.gp [ADB] [AVD OUTPUT] module_list[0].crashpad_annotations["internal-msg"] (type = 1) = emuglConfig_init: blacklisted=0 has_guest_renderer=0, mode: auto, option: (null) [ADB] [AVD OUTPUT] emuglConfig_init: auto-selected host based on conditions and UI preference 0 [ADB] [AVD OUTPUT] emuglConfig_init: GPU emulation enabled using 'host' mode [ADB] [AVD OUTPUT] Deciding if GLDirectMem/Vulkan should be enabled. Selected renderer: 1 API level: 34 host GPU on the denylist? 0 [ADB] [AVD OUTPUT] Host GPU selected, enabling Vulkan. [ADB] [AVD OUTPUT] Enabling Vulkandetected a hanging thread 'QEMU2 main loop'. No response for 105042 ms [ADB] [AVD OUTPUT] module_list[0].crashpad_annotations["qt_log.txt"] (type = 1) = 0x16d2af9d8 [ADB] [AVD OUTPUT] 0x16d2af9d8 [ADB] [AVD OUTPUT] 0x16d2af9d8 [ADB] [AVD OUTPUT] 0x16d2af9d8 [ADB] [AVD OUTPUT] 0x16d2ae828 [ADB] [AVD OUTPUT] 0x16d2ae828 [ADB] [AVD OUTPUT] 0x16d2ae118 [ADB] [AVD OUTPUT] 0x16d2ae368 [ADB] [AVD OUTPUT] 0x16d2ae288 [ADB] [AVD OUTPUT] 0x16d2ae2c8 [ADB] [AVD OUTPUT] 0x16d2ae318 [ADB] [AVD OUTPUT] 0x16d2ae308 [ADB] [AVD OUTPUT] 0x16d2ae308 [ADB] [AVD OUTPUT] 0x16d2ae288 [ADB] [AVD OUTPUT] 0x16d2ae2c8 [ADB] [AVD OUTPUT] 0x16d2ae318 [ADB] [AVD OUTPUT] 0x16d2ae308 [ADB] [AVD OUTPUT] 0x16d2ae308 [ADB] [AVD OUTPUT] 0x16d2ae368 [ADB] [AVD OUTPUT] 0x16d2ae8d8 [ADB] [AVD OUTPUT] 0x16d2ae8d8 [ADB] [AVD OUTPUT] 0x16d2ae8d8 [ADB] [AVD OUTPUT] 0x16d2ae8d8 [ADB] [AVD OUTPUT] module_list[0].crashpad_annotations["command-line-and-environment.txt"] (type = 1) = ===== Command-line arguments ===== [ADB] [AVD OUTPUT] /Users/user/Library/Android/sdk/emulator/qemu/darwin-aarch64/qemu-system-aarch64 -avd Nexus_5X_API_34 -delay-adb [ADB] [AVD OUTPUT] ===== Environment ===== [ADB] [AVD OUTPUT] PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/Users/ravi.ch [ADB] [AVD OUTPUT] address_mask = 18446603336221196288 [ADB] [AVD OUTPUT] address_mask = 18446603336221196288 [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] [AVD OUTPUT] INFO | No consent for crashreport 6aa23159-d6b9-435c-9d2c-5647e7b8a6ad, deleting. [ADB] [AVD OUTPUT] library_mode host gpu mode host [ADB] [AVD OUTPUT] I0208 19:53:22.046611 f8c1000 HealthMonitor.cpp:279] HealthMonitor disabled. [ADB] [AVD OUTPUT] cannot add library /Users/user/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed [ADB] [AVD OUTPUT] added library /Users/user/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib [ADB] [AVD OUTPUT] createGlobalVkEmulation:963 Selecting Vulkan device: SwiftShader Device (LLVM 10.0.0) [ADB] [AVD OUTPUT] initialize: Supports id properties, got a vulkan device UUID [ADB] [AVD OUTPUT] I0208 19:53:22.091811 f8c1000 VkCommonOperations.cpp:1225] Initializing VkEmulation features: [ADB] [AVD OUTPUT] I0208 19:53:22.091826 f8c1000 VkCommonOperations.cpp:1226] glInteropSupported: false [ADB] [AVD OUTPUT] I0208 19:53:22.091833 f8c1000 VkCommonOperations.cpp:1227] useDeferredCommands: true [ADB] [AVD OUTPUT] I0208 19:53:22.091835 f8c1000 VkCommonOperations.cpp:1229] createResourceWithRequirements: true [ADB] [AVD OUTPUT] I0208 19:53:22.091837 f8c1000 VkCommonOperations.cpp:1230] useVulkanComposition: false [ADB] [AVD OUTPUT] I0208 19:53:22.091839 f8c1000 VkCommonOperations.cpp:1231] useVulkanNativeSwapchain: false [ADB] [AVD OUTPUT] I0208 19:53:22.091841 f8c1000 VkCommonOperations.cpp:1232] enable guestRenderDoc: false [ADB] [AVD OUTPUT] I0208 19:53:22.091843 f8c1000 VkCommonOperations.cpp:1233] ASTC LDR emulation mode: 2 [ADB] [AVD OUTPUT] I0208 19:53:22.091845 f8c1000 VkCommonOperations.cpp:1234] enable ETC2 emulation: true [ADB] [AVD OUTPUT] I0208 19:53:22.091847 f8c1000 VkCommonOperations.cpp:1235] enable Ycbcr emulation: false [ADB] [AVD OUTPUT] I0208 19:53:22.091849 f8c1000 VkCommonOperations.cpp:1236] guestUsesAngle: false [ADB] [AVD OUTPUT] I0208 19:53:22.091851 f8c1000 VkCommonOperations.cpp:1237] [ADB] [AVD OUTPUT] useDedicatedAllocations: false [ADB] [AVD OUTPUT] I0208 19:53:22.092271 f8c1000 FrameBuffer.cpp:486] Graphics Adapter Vendor Google (Apple) [ADB] [AVD OUTPUT] I0208 19:53:22.092277 f8c1000 FrameBuffer.cpp:487] Graphics Adapter Android Emulator OpenGL ES Translator (Apple M1 Pro) [ADB] [AVD OUTPUT] I0208 19:53:22.092280 f8c1000 FrameBuffer.cpp:488] Graphics API Version OpenGL ES 3.0 (4.1 Metal - 88) [ADB] [AVD OUTPUT] I0208 19:53:22.092282 f8c1000 FrameBuffer.cpp:489] Graphics API Extensions GL_OES_EGL_sync GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 [ADB] [AVD OUTPUT] I0208 19:53:22.092286 f8c1000 FrameBuffer.cpp:490] Graphics Device Extensions N/A [ADB] [AVD OUTPUT] INFO | Sending adb public key [QAAAAKFepSCf+kG0kN6d4WWLKnbyAal5S4KmMmmt35lSDb1CvjJClP84nR8kXdptmR0LuOgssnEj6rCiMJ8XIXGr9hIVhc5DY5m3pkM1Ssl2NF/l8j+fDFM1fPMcyWPI4sWHy562vkhq2O+rqiT5r0oDxICSmDLN4L/qqzJiSLmP4y681I2VaoFm4jow1nejhlQNaiCt3zl7Vxa0MP05nV/qTAjqtn7kqooBNsAh1WEybXbO9YkbklGzYevNFMP5Uv2IuQevruct4ZBz2ShUMP/Ww+CaJXAbyLUF46mmx0FfXmofd7g5sZSbPHWwvOGVTRz0M+zKOo4Ce8Wxc07wdxJ+u8RKJwDf5/z/qVquHPoAKJwrTzq/w7DLnpytc11oWWe3RBWnSFv4b2oddb+GSzI3f/+sCjNRZQvGSe7378HadpBCY6bsKhnRB5ZlXCCofn8Xulwi6jS6blSi7ZvLEuRPQWCRs5kBxPEJy9S8i5rFfwr9Lx1+MIMc0cYgJcLmz8+EVaCU+DDdS9teM2ao4U8vjrMi6OKPMZRYryIw/uYm9OArjfueQ7RsxzTd9hRG1Lg3lpmT+QrIOt/nLdp1VvOn9Qv7ZLCNAdtb7WiLSoEbY21drdS1q8IpClBKWYs/4tFjBI4YdVxgGeLAmfStmHXgaBC8KiWEkmsvntx1fISfgU+CoXgFugEAAQA= user@unknown] [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] [AVD OUTPUT] WARNING | The emulator now requires a signed jwt token for gRPC access! Use the -grpc flag if you really want an open unprotected grpc port [ADB] [AVD OUTPUT] INFO | Using security allow list from: /Users/user/Library/Android/sdk/emulator/lib/emulator_access.json [ADB] [AVD OUTPUT] WARNING | Basic token auth should only be used by android-studio [ADB] [AVD OUTPUT] INFO | The active JSON Web Key Sets can be found here: /Users/user/Library/Caches/TemporaryItems/avd/running/59295/jwks/bfa14718-3317-4eb1-b5e9-4832ba45fc84/active.jwk [ADB] [AVD OUTPUT] INFO | Scanning /Users/user/Library/Caches/TemporaryItems/avd/running/59295/jwks/bfa14718-3317-4eb1-b5e9-4832ba45fc84 for jwk keys. [ADB] [AVD OUTPUT] INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: +token [ADB] [AVD OUTPUT] INFO | Advertising in: /Users/user/Library/Caches/TemporaryItems/avd/running/pid_59295.ini [ADB] [AVD OUTPUT] I0208 19:53:22.448460 b597000 FrameBuffer.cpp:3682] setDisplayConfigs w 1080 h 2280 dpiX 440 dpiY 440 [ADB] [AVD OUTPUT] I0208 19:53:22.448487 b597000 FrameBuffer.cpp:3695] setDisplayActiveConfig 0 [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] [AVD OUTPUT] INFO | Loading snapshot 'default_boot'... [ADB] [AVD OUTPUT] WARNING | Device 'encrypt' does not have the requested snapshot 'default_boot' [ADB] [AVD OUTPUT] WARNING | Failed to load snapshot 'default_boot' [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] [AVD OUTPUT] INFO | Activated packet streamer for bluetooth emulation [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] No connected devices have been detected [ADB] 0 emulators connected [ADB] Emulator 'Pixel_4_API_34' not running [ADB] Trying to find 'Pixel_4_API_34' emulator [ADB] Getting connected emulators [ADB] Getting connected devices [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}] [ADB] 1 emulator connected [ADB] Overriding /Users/user/.emulator_console_auth_token with an empty string to avoid telnet authentication for emulator commands [ADB] Executing Emulator console command: avd name [ADB] Found emulator 'Pixel_4_API_34' on port 5554 [ADB] Setting device id to emulator-5554 [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device' [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' [ADB] Current device property 'ro.build.version.sdk': 34 [ADB] Getting device platform version [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [ADB] Current device property 'ro.build.version.release': 14 [ADB] Device API level: 34 [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cmd reboot_readiness check-subsystems-state --list-blocking' [ADB] The device under test does not have reboot_readiness service. Falling back to the alternative boot detection method. [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell service list' [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell service list' [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Using device: emulator-5554 [ADB] Using 'adb' from '/Users/user/Library/Android/sdk/platform-tools/adb' [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 start-server' [ADB] Setting device id to emulator-5554 [AndroidUiautomator2Driver@c848 (b9ad2ce2)] We're going to run a Chrome-based session [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' [ADB] Current device property 'ro.build.version.sdk': 34 [ADB] Getting device platform version [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [ADB] Current device property 'ro.build.version.release': 14 [ADB] Device API level: 34 [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cmd package resolve-activity --brief com.android.chrome' [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Using the default com.android.chrome activity com.google.android.apps.chrome.Main. Original error: Unable to resolve the launchable activity of 'com.android.chrome'. Original error: No activity found [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Starting 'com.android.chrome' directly on the device [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Relaxing hidden api policy [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1'' [AndroidUiautomator2Driver@c848 (b9ad2ce2)] No app sent in, not parsing package/activity [AndroidUiautomator2Driver@c848 (b9ad2ce2)] 'skipDeviceInitialization' is set. Skipping device initialization. [Logcat] Clearing logcat logs from device [AndroidUiautomator2Driver@c848 (b9ad2ce2)] The 'unicodeKeyboard' capability has been deprecated and will be removed. Set the 'hideKeyboard' capability to 'true' in order to make the on-screen keyboard invisible. [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Enabling Unicode keyboard support [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get secure default_input_method' [Logcat] Starting logs capture with command: /Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Unsetting previous IME com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Setting IME to 'io.appium.settings/.UnicodeIME' [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Deleting UiAutomator2 session [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Unable to stop ChromeDriver proxies: Cannot read properties of undefined (reading 'proxyReqRes') [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings/.recorder.RecorderService' [Logcat] Stopping logcat capture [AndroidUiautomator2Driver@c848 (b9ad2ce2)] Restoring hidden api policy to the device default configuration [ADB] Running '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy'' [AppiumDriver@51d8] Event 'newSessionStarted' logged at 1707402215056 (19:53:35 GMT+0530 (user Standard Time)) [AppiumDriver@51d8] Encountered internal error running command: Error executing adbExec. Original error: 'Command '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' exited with code 255'; Command output: Unknown input method io.appium.settings/.UnicodeIME cannot be enabled for user #0 [AppiumDriver@51d8] [AppiumDriver@51d8] Error: Command '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' exited with code 255 [AppiumDriver@51d8] at ChildProcess. (/Users/user/.appium/node_modules/appium-uiautomator2-driver/node_modules/teen_process/lib/exec.js:128:19) [AppiumDriver@51d8] at ChildProcess.emit (node:events:513:28) [AppiumDriver@51d8] at maybeClose (node:internal/child_process:1091:16) [AppiumDriver@51d8] at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) [HTTP] <-- POST /session 500 21221 ms - 1120 [HTTP] Feb 08, 2024 7:53:35 PM customexceptions.SeleniumExceptionHandling logException SEVERE: Exception occurred: java.lang.RuntimeException: Failed to initialize the DriverManager at core.DriverManager.initializeDriver(DriverManager.java:86) at tests.BaseTest.setUp(BaseTest.java:101) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:390) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:325) at org.testng.internal.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:180) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:122) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.testng.TestRunner.privateRun(TestRunner.java:848) at org.testng.TestRunner.run(TestRunner.java:621) at org.testng.SuiteRunner.runTest(SuiteRunner.java:443) at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:481) at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

java.lang.RuntimeException: Failed to initialize the DriverManager at core.DriverManager.initializeDriver(DriverManager.java:86) at tests.BaseTest.setUp(BaseTest.java:101) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:390) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:325) at org.testng.internal.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:180) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:122) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.testng.TestRunner.privateRun(TestRunner.java:848) at org.testng.TestRunner.run(TestRunner.java:621) at org.testng.SuiteRunner.runTest(SuiteRunner.java:443) at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:481) at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

java.lang.RuntimeException: Failed to initialize the diver: {}

at tests.BaseTest.setUp(BaseTest.java:118)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:390)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:325)
at org.testng.internal.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:180)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:122)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:848)
at org.testng.TestRunner.run(TestRunner.java:621)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:443)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:481)
at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
mykola-mokhnach commented 9 months ago

[AndroidUiautomator2Driver@c848 (b9ad2ce2)] The 'unicodeKeyboard' capability has been deprecated and will be removed. Set the 'hideKeyboard' capability to 'true' in order to make the on-screen keyboard invisible. [AppiumDriver@51d8] Error: Command '/Users/user/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' exited with code 255

I assume the emulator is just too slow to boot, so it fails to start all services in time.

You can:

Redinbox commented 9 months ago

HI, I have removed deprecated capability, may I know how to choose faster host?

KazuCocoa commented 9 months ago

Faster host is better spec's machine your Appium server works. Possibly increasing avdReadyTimeout more could help.

Btw, did a rebooted device work (to skip the slow boot time)?