appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
116 stars 24 forks source link

WebDriverAgentMac will crash when execute "macos: click" #122

Open linyayu opened 2 years ago

linyayu commented 2 years ago

Hi, I created a driver for Mac2, then executed "macos: click" and found WebDriverAgentMac back to itself teardown

Appium version:Appium v1.22.2

2022-03-17 16:44:17:275 - [debug] [HTTP] Request idempotency key: 219e808f-85f9-49dd-8a37-c189bef8230d 2022-03-17 16:44:17:277 - [HTTP] --> POST /wd/hub/session 2022-03-17 16:44:17:277 - [HTTP] {"desiredCapabilities":{"noReset":true,"createSessionTimeout":30000,"showServerLogs":"true","newCommandTimeout":600,"platformVersion":"12","automationName":"Mac2","bundleId":"comxx.xx","platformName":"Mac","udid":"10.32.35.72","deviceName":"XMN066","systemPort":8806},"capabilities":{"firstMatch":[{"appium:automationName":"Mac2","appium:bundleId":"comxx.xx","createSessionTimeout":30000,"appium:deviceName":"XMN066","appium:newCommandTimeout":600,"appium:noReset":true,"platformName":"mac","appium:platformVersion":"12","showServerLogs":"true","appium:systemPort":8806,"appium:udid":"10.32.35.72"}]}} 2022-03-17 16:44:17:278 - [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"noReset":true,"createSessionTimeout":30000,"showServerLogs":"true","newCommandTimeout":600,"platformVersion":"12","automationName":"Mac2","bundleId":"comxx.xx","platformName":"Mac","udid":"10.32.35.72","deviceName":"XMN066","systemPort":8806},null,{"firstMatch":[{"appium:automationName":"Mac2","appium:bundleId":"comxx.xx","createSessionTimeout":30000,"appium:deviceName":"XMN066","appium:newCommandTimeout":600,"appium:noReset":true,"platformName":"mac","appium:platformVersion":"12","showServerLogs":"true","appium:systemPort":8806,"appium:udid":"10.32.35.72"}]}] 2022-03-17 16:44:17:278 - [debug] [BaseDriver] Event 'newSessionRequested' logged at 1647506657278 (16:44:17 GMT+0800 (China Standard Time)) 2022-03-17 16:44:17:280 - [BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix: 2022-03-17 16:44:17:280 - [BaseDriver] createSessionTimeout 2022-03-17 16:44:17:280 - [BaseDriver] showServerLogs 2022-03-17 16:44:17:282 - [Appium] Appium v1.22.2 creating new Mac2Driver (v0.14.1) session 2022-03-17 16:44:17:284 - [Appium] Explicitly enabling use of insecure features: 2022-03-17 16:44:17:284 - [Appium] get_server_logs 2022-03-17 16:44:17:284 - [debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided 2022-03-17 16:44:17:284 - [debug] [BaseDriver] Creating session with W3C capabilities: { 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "alwaysMatch": { 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:createSessionTimeout": 30000, 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "platformName": "mac", 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:showServerLogs": "true", 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:automationName": "Mac2", 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:bundleId": "comxx.xx", 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:deviceName": "XMN066", 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:newCommandTimeout": 600, 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:noReset": true, 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:platformVersion": "12", 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:systemPort": 8806, 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "appium:udid": "10.32.35.72" 2022-03-17 16:44:17:284 - [debug] [BaseDriver] }, 2022-03-17 16:44:17:284 - [debug] [BaseDriver] "firstMatch": [ 2022-03-17 16:44:17:284 - [debug] [BaseDriver] {} 2022-03-17 16:44:17:284 - [debug] [BaseDriver] ] 2022-03-17 16:44:17:285 - [debug] [BaseDriver] } 2022-03-17 16:44:17:286 - [BaseDriver] Capability 'showServerLogs' changed from string to boolean. This may cause unexpected behavior 2022-03-17 16:44:17:286 - [BaseDriver] The following capabilities were provided, but are not recognized by Appium: 2022-03-17 16:44:17:286 - [BaseDriver] createSessionTimeout 2022-03-17 16:44:17:286 - [BaseDriver] Session created with session id: f7b75c67-d682-49a0-9897-f63bbb951d05 2022-03-17 16:44:17:286 - [debug] [WebDriverAgentMac] Using bootstrap root: /Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-mac2-driver/WebDriverAgentMac 2022-03-17 16:44:17:287 - [debug] [WebDriverAgentMac] Cleaning up 1 obsolete process 2022-03-17 16:44:17:303 - [debug] [WebDriverAgentMac] Using xcodebuild binary at '/usr/bin/xcodebuild' 2022-03-17 16:44:17:305 - [WebDriverAgentMac] WebDriverAgent sources are up to date (1645076153004 >= 1645076153004) 2022-03-17 16:44:17:305 - [debug] [WebDriverAgentMac] Using 127.0.0.1 as server host 2022-03-17 16:44:17:305 - [debug] [WebDriverAgentMac] Using port 8806 2022-03-17 16:44:17:306 - [WebDriverAgentMac] Starting Mac2Driver host process: xcodebuild build-for-testing test-without-building -project /Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner COMPILER_INDEX_STORE_ENABLE\=NO 2022-03-17 16:44:17:315 - [debug] [WD Proxy] Matched '/status' to command name 'getStatus' 2022-03-17 16:44:17:315 - [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8806/status] with no body 2022-03-17 16:44:17:320 - [WD Proxy] connect ECONNREFUSED 127.0.0.1:8806 2022-03-17 16:44:18:322 - [debug] [WD Proxy] Matched '/status' to command name 'getStatus' 2022-03-17 16:44:18:322 - [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8806/status] with no body 2022-03-17 16:44:18:323 - [WD Proxy] connect ECONNREFUSED 127.0.0.1:8806 2022-03-17 16:44:18:356 - [debug] [WebDriverAgentMac] [xcodebuild] Command line invocation: 2022-03-17 16:44:18:357 - [debug] [WebDriverAgentMac] [xcodebuild] /Applications/Xcode13.1.app/Contents/Developer/usr/bin/xcodebuild build-for-testing test-without-building -project /Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner COMPILER_INDEX_STORE_ENABLE=NO 2022-03-17 16:44:18:357 - [debug] [WebDriverAgentMac] 2022-03-17 16:44:18:357 - [debug] [WebDriverAgentMac] User defaults from command line: 2022-03-17 16:44:18:358 - [debug] [WebDriverAgentMac] IDEPackageSupportUseBuiltinSCM = YES 2022-03-17 16:44:18:358 - [debug] [WebDriverAgentMac] 2022-03-17 16:44:18:358 - [debug] [WebDriverAgentMac] Build settings from command line: 2022-03-17 16:44:18:358 - [debug] [WebDriverAgentMac] COMPILER_INDEX_STORE_ENABLE = NO 2022-03-17 16:44:18:973 - [debug] [WebDriverAgentMac] [xcodebuild] --- xcodebuild: WARNING: Using the first of multiple matching destinations: 2022-03-17 16:44:18:973 - [debug] [WebDriverAgentMac] { platform:macOS, arch:x86_64, id:A27E7F44-00BE-501F-9F34-C98F56ECC3F7 } 2022-03-17 16:44:18:973 - [debug] [WebDriverAgentMac] { platform:macOS, name:Any Mac } 2022-03-17 16:44:18:973 - [debug] [WebDriverAgentMac] [xcodebuild] --- xcodebuild: WARNING: Using the first of multiple matching destinations: 2022-03-17 16:44:18:974 - [debug] [WebDriverAgentMac] { platform:macOS, arch:x86_64, id:A27E7F44-00BE-501F-9F34-C98F56ECC3F7 } 2022-03-17 16:44:18:974 - [debug] [WebDriverAgentMac] { platform:macOS, name:Any Mac } 2022-03-17 16:44:19:007 - [debug] [WebDriverAgentMac] [xcodebuild] note: Using new build system 2022-03-17 16:44:19:020 - [debug] [WebDriverAgentMac] [xcodebuild] note: Planning 2022-03-17 16:44:19:058 - [debug] [WebDriverAgentMac] [xcodebuild] Analyze workspace 2022-03-17 16:44:19:090 - [debug] [WebDriverAgentMac] [xcodebuild] Create build description 2022-03-17 16:44:19:109 - [debug] [WebDriverAgentMac] [xcodebuild] Build description signature: d8832b1c426c67e838dc8443354947ad 2022-03-17 16:44:19:109 - [debug] [WebDriverAgentMac] [xcodebuild] Build description path: /Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-mac2-driver/WebDriverAgentMac/DerivedData/WebDriverAgentMac/Build/Intermediates.noindex/XCBuildData/d8832b1c426c67e838dc8443354947ad-desc.xcbuild 2022-03-17 16:44:19:109 - [debug] [WebDriverAgentMac] [xcodebuild] note: Build preparation complete 2022-03-17 16:44:19:110 - [debug] [WebDriverAgentMac] [xcodebuild] note: Building targets in parallel 2022-03-17 16:44:19:166 - [debug] [WebDriverAgentMac] [xcodebuild] TEST BUILD SUCCEEDED 2022-03-17 16:44:19:324 - [debug] [WD Proxy] Matched '/status' to command name 'getStatus' 2022-03-17 16:44:19:325 - [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8806/status] with no body 2022-03-17 16:44:19:325 - [WD Proxy] connect ECONNREFUSED 127.0.0.1:8806 2022-03-17 16:44:19:574 - [debug] [WebDriverAgentMac] [xcodebuild] 2022-03-17 16:44:19.573678+0800 WebDriverAgentRunner-Runner[20201:2077201] Running tests... 2022-03-17 16:44:19:630 - [debug] [WebDriverAgentMac] [xcodebuild] Test Suite 'All tests' started at 2022-03-17 16:44:19.630 2022-03-17 16:44:19:630 - [debug] [WebDriverAgentMac] [xcodebuild] Test Suite 'WebDriverAgentRunner.xctest' started at 2022-03-17 16:44:19.630 2022-03-17 16:44:19:631 - [debug] [WebDriverAgentMac] [xcodebuild] Test Suite 'UITestingUITests' started at 2022-03-17 16:44:19.631 2022-03-17 16:44:19:631 - [debug] [WebDriverAgentMac] [xcodebuild] t = nans Suite Set Up 2022-03-17 16:44:19:632 - [debug] [WebDriverAgentMac] [xcodebuild] Test Case '-[UITestingUITests testRunner]' started. 2022-03-17 16:44:19:632 - [debug] [WebDriverAgentMac] [xcodebuild] t = 0.00s Start Test at 2022-03-17 16:44:19.632 2022-03-17 16:44:19:656 - [debug] [WebDriverAgentMac] [xcodebuild] t = 0.02s Set Up 2022-03-17 16:44:19:657 - [debug] [WebDriverAgentMac] [xcodebuild] 2022-03-17 16:44:19.657495+0800 WebDriverAgentRunner-Runner[20201:2077201] Built at Mar 9 2022 14:15:01 2022-03-17 16:44:19:667 - [debug] [WebDriverAgentMac] [xcodebuild] 2022-03-17 16:44:19.667189+0800 WebDriverAgentRunner-Runner[20201:2077201] ServerURLHere->http://localhost:8806<-ServerURLHere 2022-03-17 16:44:20:326 - [debug] [WD Proxy] Matched '/status' to command name 'getStatus' 2022-03-17 16:44:20:327 - [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8806/status] with no body 2022-03-17 16:44:20:332 - [debug] [WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"version":"Version 12.0 (Build 21A5506j)"},"ready":true,"build":{"time":"Mar 9 2022 14:15:01"}},"sessionId":null} 2022-03-17 16:44:20:423 - [WebDriverAgentMac] The host process is ready within 3109ms 2022-03-17 16:44:20:423 - [debug] [WD Proxy] Matched '/session' to command name 'createSession' 2022-03-17 16:44:20:423 - [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8806/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","createSessionTimeout":30000,"showServerLogs":true,"automationName":"Mac2","bundleId":"comxx.xx","deviceName":"XMN066","newCommandTimeout":600,"noReset":true,"platformVersion":"12","systemPort":8806,"udid":"10.32.35.72"}}} 2022-03-17 16:44:20:431 - [debug] [WebDriverAgentMac] [xcodebuild] t = 0.80s Open comxx.xx 2022-03-17 16:44:20:432 - [debug] [WebDriverAgentMac] [xcodebuild] t = 0.80s Activate comxx.xx 2022-03-17 16:44:20:433 - [debug] [WebDriverAgentMac] [xcodebuild] t = 0.80s Wait for comxx.xx to idle 2022-03-17 16:44:20:446 - [debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"434BEECD-EBAB-4DE8-8B36-5B7DBFBB6B57","capabilities":{"CFBundleIdentifier":"comxx.xx"}},"sessionId":"434BEECD-EBAB-4DE8-8B36-5B7DBFBB6B57"} 2022-03-17 16:44:20:446 - [WD Proxy] Determined the downstream protocol as 'W3C' 2022-03-17 16:44:20:446 - [Appium] New Mac2Driver session created successfully, session f7b75c67-d682-49a0-9897-f63bbb951d05 added to master session list 2022-03-17 16:44:20:446 - [debug] [BaseDriver] Event 'newSessionStarted' logged at 1647506660446 (16:44:20 GMT+0800 (China Standard Time)) 2022-03-17 16:44:20:446 - [debug] [W3C (f7b75c67)] Cached the protocol value 'W3C' for the new session f7b75c67-d682-49a0-9897-f63bbb951d05 2022-03-17 16:44:20:446 - [debug] [W3C (f7b75c67)] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"mac","createSessionTimeout":30000,"showServerLogs":true,"automationName":"Mac2","bundleId":"comxx.xx","deviceName":"XMN066","newCommandTimeout":600,"noReset":true,"platformVersion":"12","systemPort":8806,"udid":"10.32.35.72"}} 2022-03-17 16:44:20:448 - [HTTP] <-- POST /wd/hub/session 200 3170 ms - 333 2022-03-17 16:44:20:448 - [HTTP] 2022-03-17 16:46:16:893 - [HTTP] --> POST /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/execute/sync 2022-03-17 16:46:16:893 - [HTTP] {"script":"macos: click","args":[{"x":"0","y":"0"}]} 2022-03-17 16:46:16:894 - [debug] [W3C (f7b75c67)] Calling AppiumDriver.execute() with args: ["macos: click",[{"x":"0","y":"0"}],"f7b75c67-d682-49a0-9897-f63bbb951d05"] 2022-03-17 16:46:16:894 - [Mac2Driver] Executing extension command 'macos: click' 2022-03-17 16:46:16:901 - [debug] [WD Proxy] Proxying [POST /wda/click] to [POST http://127.0.0.1:8806/session/434BEECD-EBAB-4DE8-8B36-5B7DBFBB6B57/wda/click] with body: {"x":"0","y":"0"} 2022-03-17 16:46:16:905 - [debug] [WebDriverAgentMac] [xcodebuild] t = 117.27s Click <XCUIElementProxy: 0x600002bdc2a0>[0.00, 0.00] 2022-03-17 16:46:16:905 - [debug] [WebDriverAgentMac] [xcodebuild] t = 117.27s Wait for comxx.xx to idle 2022-03-17 16:46:16:906 - [debug] [WebDriverAgentMac] [xcodebuild] t = 117.27s Find the Application 'comxx.xx' 2022-03-17 16:46:17:928 - [debug] [WebDriverAgentMac] [xcodebuild] t = 118.30s Retrying Click <XCUIElementProxy: 0x600002bdc2a0>[0.00, 0.00] (attempt #2) 2022-03-17 16:46:17:928 - [debug] [WebDriverAgentMac] [xcodebuild] t = 118.30s Wait for comxx.xx to idle 2022-03-17 16:46:17:929 - [debug] [WebDriverAgentMac] [xcodebuild] t = 118.30s Find the Application 'comxx.xx' 2022-03-17 16:46:18:940 - [debug] [WebDriverAgentMac] [xcodebuild] t = 119.31s Retrying Click <XCUIElementProxy: 0x600002bdc2a0>[0.00, 0.00] (attempt #3) 2022-03-17 16:46:18:940 - [debug] [WebDriverAgentMac] [xcodebuild] t = 119.31s Wait for comxx.xx to idle 2022-03-17 16:46:18:941 - [debug] [WebDriverAgentMac] [xcodebuild] t = 119.31s Find the Application 'comxx.xx' 2022-03-17 16:46:18:982 - [debug] [WebDriverAgentMac] [xcodebuild] /Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentRunner/WebDriverAgentRunner.m:48: error: -[UITestingUITests testRunner] : Failed to synthesize event: Application for Application 'comxx.xx' is not foreground and does not allow background interaction. 2022-03-17 16:46:18:983 - [debug] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"434BEECD-EBAB-4DE8-8B36-5B7DBFBB6B57"} 2022-03-17 16:46:18:983 - [debug] [W3C (f7b75c67)] Responding to client with driver.execute() result: null 2022-03-17 16:46:18:984 - [HTTP] <-- POST /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/execute/sync 200 2090 ms - 14 2022-03-17 16:46:18:984 - [HTTP] 2022-03-17 16:46:18:984 - [debug] [WebDriverAgentMac] [xcodebuild] t = 119.35s Tear Down 2022-03-17 16:46:18:984 - [debug] [WebDriverAgentMac] Test Case '-[UITestingUITests testRunner]' failed (119.352 seconds). 2022-03-17 16:46:18:984 - [debug] [WebDriverAgentMac] Test Suite 'UITestingUITests' failed at 2022-03-17 16:46:18.984. 2022-03-17 16:46:18:984 - [debug] [WebDriverAgentMac] Executed 1 test, with 1 failure (0 unexpected) in 119.352 (119.354) seconds 2022-03-17 16:46:18:985 - [debug] [WebDriverAgentMac] [xcodebuild] Test Suite 'WebDriverAgentRunner.xctest' failed at 2022-03-17 16:46:18.985. 2022-03-17 16:46:18:985 - [debug] [WebDriverAgentMac] Executed 1 test, with 1 failure (0 unexpected) in 119.352 (119.354) seconds 2022-03-17 16:46:18:985 - [debug] [WebDriverAgentMac] [xcodebuild] Test Suite 'All tests' failed at 2022-03-17 16:46:18.985. 2022-03-17 16:46:18:986 - [debug] [WebDriverAgentMac] Executed 1 test, with 1 failure (0 unexpected) in 119.352 (119.355) seconds 2022-03-17 16:46:19:247 - [debug] [WebDriverAgentMac] [xcodebuild] 2022-03-17 16:46:19.247 xcodebuild[20193:2077015] [MT] IDETestOperationsObserverDebug: 119.956 elapsed -- Testing started completed. 2022-03-17 16:46:19:247 - [debug] [WebDriverAgentMac] [xcodebuild] 2022-03-17 16:46:19.247 xcodebuild[20193:2077015] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start 2022-03-17 16:46:19:248 - [debug] [WebDriverAgentMac] 2022-03-17 16:46:19.247 xcodebuild[20193:2077015] [MT] IDETestOperationsObserverDebug: 119.956 sec, +119.956 sec -- end 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] [xcodebuild] Test session results, code coverage, and logs: 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] /Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-mac2-driver/WebDriverAgentMac/DerivedData/WebDriverAgentMac/Logs/Test/Test-WebDriverAgentRunner-2022.03.17_16-44-18-+0800.xcresult 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] [xcodebuild] Failing tests: 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] WebDriverAgentRunner: 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] -[UITestingUITests testRunner] 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] TEST EXECUTE FAILED 2022-03-17 16:46:19:362 - [debug] [WebDriverAgentMac] [xcodebuild] Testing started 2022-03-17 16:46:19:386 - [WebDriverAgentMac] Mac2Driver host process has exited with code 65, signal null 2022-03-17 16:46:21:567 - [HTTP] --> GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/context 2022-03-17 16:46:21:567 - [HTTP] {} 2022-03-17 16:46:21:568 - [W3C (f7b75c67)] Driver proxy active, passing request on via HTTP proxy 2022-03-17 16:46:21:569 - [debug] [W3C (f7b75c67)] Encountered internal error running command: Error: Could not proxy. Proxy error: 'GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/context' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:21:569 - [debug] [W3C (f7b75c67)] at doJwpProxy (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:481:13) 2022-03-17 16:46:21:569 - [debug] [W3C (f7b75c67)] at asyncHandler (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:253:9) 2022-03-17 16:46:21:569 - [HTTP] <-- GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/context 500 2 ms - 1019 2022-03-17 16:46:21:569 - [HTTP] 2022-03-17 16:46:21:584 - [HTTP] --> POST /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/element 2022-03-17 16:46:21:584 - [HTTP] {"using":"-ios class chain","value":"/XCUIElementTypeButton[title == 'Exit']"} 2022-03-17 16:46:21:585 - [debug] [W3C (f7b75c67)] Calling AppiumDriver.findElement() with args: ["-ios class chain","/XCUIElementTypeButton[title == 'Exit']","f7b75c67-d682-49a0-9897-f63bbb951d05"] 2022-03-17 16:46:21:585 - [debug] [BaseDriver] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain 2022-03-17 16:46:21:586 - [debug] [W3C (f7b75c67)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:21:586 - [debug] [W3C (f7b75c67)] at WDAMacProxy.command (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:274:13) 2022-03-17 16:46:21:586 - [debug] [W3C (f7b75c67)] at runMicrotasks () 2022-03-17 16:46:21:586 - [debug] [W3C (f7b75c67)] at processTicksAndRejections (internal/process/task_queues.js:97:5) 2022-03-17 16:46:21:586 - [HTTP] <-- POST /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/element 500 2 ms - 813 2022-03-17 16:46:21:586 - [HTTP] 2022-03-17 16:46:28:721 - [HTTP] --> GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot 2022-03-17 16:46:28:721 - [HTTP] {} 2022-03-17 16:46:28:721 - [W3C (f7b75c67)] Driver proxy active, passing request on via HTTP proxy 2022-03-17 16:46:28:722 - [debug] [W3C (f7b75c67)] Encountered internal error running command: Error: Could not proxy. Proxy error: 'GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:28:722 - [debug] [W3C (f7b75c67)] at doJwpProxy (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:481:13) 2022-03-17 16:46:28:722 - [debug] [W3C (f7b75c67)] at asyncHandler (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:253:9) 2022-03-17 16:46:28:723 - [HTTP] <-- GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot 500 2 ms - 1025 2022-03-17 16:46:28:723 - [HTTP] 2022-03-17 16:46:28:731 - [HTTP] --> GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/source 2022-03-17 16:46:28:731 - [HTTP] {} 2022-03-17 16:46:28:732 - [W3C (f7b75c67)] Driver proxy active, passing request on via HTTP proxy 2022-03-17 16:46:28:733 - [debug] [W3C (f7b75c67)] Encountered internal error running command: Error: Could not proxy. Proxy error: 'GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/source' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:28:733 - [debug] [W3C (f7b75c67)] at doJwpProxy (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:481:13) 2022-03-17 16:46:28:733 - [debug] [W3C (f7b75c67)] at asyncHandler (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:253:9) 2022-03-17 16:46:28:733 - [HTTP] <-- GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/source 500 2 ms - 1017 2022-03-17 16:46:28:734 - [HTTP] 2022-03-17 16:46:32:115 - [HTTP] --> GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot 2022-03-17 16:46:32:115 - [HTTP] {} 2022-03-17 16:46:32:116 - [W3C (f7b75c67)] Driver proxy active, passing request on via HTTP proxy 2022-03-17 16:46:32:117 - [debug] [W3C (f7b75c67)] Encountered internal error running command: Error: Could not proxy. Proxy error: 'GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:32:117 - [debug] [W3C (f7b75c67)] at doJwpProxy (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:481:13) 2022-03-17 16:46:32:117 - [debug] [W3C (f7b75c67)] at asyncHandler (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:253:9) 2022-03-17 16:46:32:118 - [HTTP] <-- GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot 500 3 ms - 1025 2022-03-17 16:46:32:118 - [HTTP] 2022-03-17 16:46:33:117 - [HTTP] --> GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot 2022-03-17 16:46:33:118 - [HTTP] {} 2022-03-17 16:46:33:118 - [W3C (f7b75c67)] Driver proxy active, passing request on via HTTP proxy 2022-03-17 16:46:33:119 - [debug] [W3C (f7b75c67)] Encountered internal error running command: Error: Could not proxy. Proxy error: 'GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:33:119 - [debug] [W3C (f7b75c67)] at doJwpProxy (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:481:13) 2022-03-17 16:46:33:119 - [debug] [W3C (f7b75c67)] at asyncHandler (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:253:9) 2022-03-17 16:46:33:120 - [HTTP] <-- GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/screenshot 500 2 ms - 1025 2022-03-17 16:46:33:120 - [HTTP] 2022-03-17 16:46:41:914 - [HTTP] --> GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/context 2022-03-17 16:46:41:915 - [HTTP] {} 2022-03-17 16:46:41:915 - [W3C (f7b75c67)] Driver proxy active, passing request on via HTTP proxy 2022-03-17 16:46:41:916 - [debug] [W3C (f7b75c67)] Encountered internal error running command: Error: Could not proxy. Proxy error: 'GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/context' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details 2022-03-17 16:46:41:916 - [debug] [W3C (f7b75c67)] at doJwpProxy (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:481:13) 2022-03-17 16:46:41:917 - [debug] [W3C (f7b75c67)] at asyncHandler (/Users/rcadmin/.nvm/versions/node/v12.22.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:253:9) 2022-03-17 16:46:41:917 - [HTTP] <-- GET /wd/hub/session/f7b75c67-d682-49a0-9897-f63bbb951d05/context 500 3 ms - 1019 2022-03-17 16:46:41:917 - [HTTP]

mythsunwind commented 2 years ago

We have the same issue. Clicking on the macOS full screen button of our app crashes the driver with "Failed to synthesize event: Application for "_XCUI:FullScreenWindow" Button is not foreground and does not allow background interaction." After that message the driver is not reachable anymore:

Screenshot 2022-03-23 at 11 07 15
mykola-mokhnach commented 1 year ago

Is the issue still relevant in the latest driver version?

AnnaMuszalska commented 1 year ago

Yes, still doesn't work in 1.5.2

mykola-mokhnach commented 1 year ago

I am currently testing the patch https://github.com/appium/appium-mac2-driver/pull/194

Please apply it locally and check if it resolves the above issue