You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Appium Mac2 driver for automation and rapidly creating and cleaning up multiple test sessions (which appear to reuse the same WebDriverAgentMac (WDA) host process), I've observed that the driver attempts to clean up the underlying WebDriverAgentMac session using an incorrect WDA Session ID.
This issue specifically occurs when the WDA host process is being utilized by multiple concurrent or quickly consecutive Appium sessions. One Appium session may attempt to delete the WDA Session ID corresponding to another Appium session, leading to cleanup confusion and "invalid session id" errors from WDA.
Steps to Reproduce:
Start the Appium server (ensure Mac2 driver is installed).
Using client code, rapidly and consecutively create two or more Appium Mac2 test sessions.
When creating the session, set the newCommandTimeout capability, for example, appium:newCommandTimeout: 30.
After the session connects successfully, you can choose not to perform any other automation actions.
Either let the sessions automatically clean up due to the newCommandTimeout expiring, or use the driver.quit() method actively clean up each session.
Observe the session creation (POST /session) and termination (DELETE /session) process in the Appium server logs, paying close attention to the DELETE /session/{WDA_SESSION_ID} requests that the driver sends via WD Proxy to http://127.0.0.1:10100 (the WebDriverAgentMac listening port).
Expected Behavior:
When an Appium session ends, it should send a DELETE /session/{WDA_SESSION_ID} request to WebDriverAgentMac, where {WDA_SESSION_ID} is the unique Session ID that the specific Appium session successfully obtained and correctly associated with itself during its creation from WDA. Each Appium session should only be responsible for cleaning up its own corresponding WDA session.
Actual Behavior:
From the logs I've observed, when one Appium session (e.g., Appium Session ID 2d605973, which obtained WDA Session ID 7AAD153E-621D-42C4-9C70-3AB24988A9EA during its creation) ends, it attempts to send a DELETE /session command to WebDriverAgentMac via the proxy, but it uses a WDA Session ID (FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE) that actually belongs to another Appium session (e.g., Appium Session ID 4bd6c4bb, obtained during its subsequent creation).
Example log snippets (I will attach the full log file containing the Appium and WDA Session ID correlation issue to this Issue for detailed diagnosis, only showing key lines here):
WDA Session ID obtained by session 2d605973 during creation (should be remembered):
2025-05-14 10:48:18:584 - [2d605973][WD Proxy] Got response with status 200: {"value":{"sessionId":"7AAD153E-621D-42C4-9C70-3AB24988A9EA",...},"sessionId":"7AAD153E-621D-42C4-9C70-3AB24988A9EA"}
WDA Session ID obtained by session 4bd6c4bb during creation (should be remembered):
2025-05-14 10:48:34:272 - [4bd6c4bb][WD Proxy] Got response with status 200: {"value":{"sessionId":"FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE",...},"sessionId":"FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE"}
WDA Session ID session 2d605973 attempts to delete when ending (incorrectly usesFBC33F5E-...):
2025-05-14 10:48:48:597 - [2d605973][WD Proxy] Proxying [DELETE /session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] to [DELETE http://127.0.0.1:10100/session/FBC33F5E-07DF-42C4-9C70-3AB24988A9EA] with no body
(Note that the WDA Session ID in the proxied target URL is still FBC33F5E-..., not 7AAD153E-...)
This leads to the subsequent session 4bd6c4bb attempting to delete the same WDA Session ID (FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE) when it ends, and WebDriverAgentMac reports that the Session ID does not exist:
2025-05-14 10:49:04:361 - [4bd6c4bb][WD Proxy] Got response with status 404: {"value":{"error":"invalid session id","message":"Session does not exist",...}}
This incorrect association and cleanup behavior can lead to an unstable WDA process state and affect the reliability of subsequent tests, especially in scenarios requiring rapid session creation and teardown.
Environment Information:
Appium Version: 2.15.0
Appium Mac2 Driver Version: 2.2.0
OS: macOS [Please fill in your specific macOS version, e.g., Sonoma 14.4.1]
Node.js Version: [Please fill in your Node.js version, e.g., 20.10.0]
Xcode Version: [Please fill in your Xcode version]
Log :
2025-05-14 10:48:18:365 - [HTTP] Request idempotency key: 159331a7-9613-45d9-bc62-6830f371ced1
2025-05-14 10:48:18:378 - [HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:18:379 - [AppiumDriver@a773] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}]
2025-05-14 10:48:18:380 - [AppiumDriver@a773] Event 'newSessionRequested' logged at 1747190898380 (10:48:18 GMT+0800 )
2025-05-14 10:48:18:384 - [Appium] Attempting to find matching driver for automationName 'mac2' and platformName 'mac'
2025-05-14 10:48:18:384 - [Appium] The 'mac2' driver was installed and matched caps.
2025-05-14 10:48:18:384 - [Appium] Will require it at /Users/test/.appium/node_modules/appium-mac2-driver
2025-05-14 10:48:18:387 - [Appium] Requiring driver at /Users/test/.appium/node_modules/appium-mac2-driver/build/index.js
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Appium v2.15.0 creating new Mac2Driver (v2.2.0) session
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Checking BaseDriver versions for Appium and Mac2Driver
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Appium's BaseDriver version is 9.15.0
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Mac2Driver's BaseDriver version is 9.15.0
2025-05-14 10:48:18:389 - [AppiumDriver@a773] Applying relaxed security to 'Mac2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
2025-05-14 10:48:18:389 - [Mac2Driver@e8cd]
2025-05-14 10:48:18:389 - [Mac2Driver@e8cd] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "mac",
"appium:automationName": "mac2",
"appium:newCommandTimeout": 30,
"appium:noReset": true,
"appium:bundleId": "com.apple.TextEdit"
},
"firstMatch": [
{}
]
}
2025-05-14 10:48:18:391 - [2d605973][Mac2Driver@e8cd] Session created with session id: 2d605973-dc58-455d-a0e3-68a6eeecccca
2025-05-14 10:48:18:391 - [2d605973][WebDriverAgentMac] The host process has already been listening. Proceeding with session creation
2025-05-14 10:48:18:392 - [2d605973][WD Proxy] Matched '/session' to command name 'createSession'
2025-05-14 10:48:18:393 - [2d605973][WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:10100/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:18:584 - [2d605973][WD Proxy] Got response with status 200: {"value":{"sessionId":"7AAD153E-621D-42C4-9C70-3AB24988A9EA","capabilities":{"CFBundleIdentifier":"com.apple.TextEdit"}},"sessionId":"7AAD153E-621D-42C4-9C70-3AB24988A9EA"}
2025-05-14 10:48:18:587 - [2d605973][WD Proxy] Determined the downstream protocol as 'W3C'
2025-05-14 10:48:18:591 - [2d605973][AppiumDriver@a773] New Mac2Driver session created successfully, session 2d605973-dc58-455d-a0e3-68a6eeecccca added to master session list
2025-05-14 10:48:18:594 - [2d605973][AppiumDriver@a773] Event 'newSessionStarted' logged at 1747190898594 (10:48:18 GMT+0800 )
2025-05-14 10:48:18:595 - [2d605973][Mac2Driver@e8cd] Cached the protocol value 'W3C' for the new session 2d605973-dc58-455d-a0e3-68a6eeecccca
2025-05-14 10:48:18:595 - [2d605973][Mac2Driver@e8cd] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}
2025-05-14 10:48:18:597 - [2d605973][HTTP] <-- POST /session 200 220 ms - 194
2025-05-14 10:48:34:083 - [HTTP] Request idempotency key: e400e6cc-cbce-4217-acbe-89b2b5b92383
2025-05-14 10:48:34:087 - [HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:34:088 - [AppiumDriver@a773] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}]
2025-05-14 10:48:34:090 - [AppiumDriver@a773] Event 'newSessionRequested' logged at 1747190914090 (10:48:34 GMT+0800 (中国标准时间))
2025-05-14 10:48:34:093 - [Appium] Attempting to find matching driver for automationName 'mac2' and platformName 'mac'
2025-05-14 10:48:34:093 - [Appium] The 'mac2' driver was installed and matched caps.
2025-05-14 10:48:34:094 - [Appium] Will require it at /Users/test/.appium/node_modules/appium-mac2-driver
2025-05-14 10:48:34:097 - [Appium] Requiring driver at /Users/test/.appium/node_modules/appium-mac2-driver/build/index.js
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Appium v2.15.0 creating new Mac2Driver (v2.2.0) session
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Checking BaseDriver versions for Appium and Mac2Driver
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Appium's BaseDriver version is 9.15.0
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Mac2Driver's BaseDriver version is 9.15.0
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Applying relaxed security to 'Mac2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
2025-05-14 10:48:34:099 - [Mac2Driver@b272]
2025-05-14 10:48:34:099 - [Mac2Driver@b272] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "mac",
"appium:automationName": "mac2",
"appium:newCommandTimeout": 30,
"appium:noReset": true,
"appium:bundleId": "com.apple.TextEdit"
},
"firstMatch": [
{}
]
}
2025-05-14 10:48:34:101 - [4bd6c4bb][Mac2Driver@b272] Session created with session id: 4bd6c4bb-bd55-4b1f-893a-26e33394936c
2025-05-14 10:48:34:102 - [4bd6c4bb][WebDriverAgentMac] The host process has already been listening. Proceeding with session creation
2025-05-14 10:48:34:102 - [4bd6c4bb][WD Proxy] Matched '/session' to command name 'createSession'
2025-05-14 10:48:34:102 - [4bd6c4bb][WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:10100/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:34:272 - [4bd6c4bb][WD Proxy] Got response with status 200: {"value":{"sessionId":"FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE","capabilities":{"CFBundleIdentifier":"com.apple.TextEdit"}},"sessionId":"FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE"}
2025-05-14 10:48:34:272 - [4bd6c4bb][WD Proxy] Determined the downstream protocol as 'W3C'
2025-05-14 10:48:34:272 - [4bd6c4bb][AppiumDriver@a773] New Mac2Driver session created successfully, session 4bd6c4bb-bd55-4b1f-893a-26e33394936c added to master session list
2025-05-14 10:48:34:272 - [4bd6c4bb][AppiumDriver@a773] Event 'newSessionStarted' logged at 1747190914272 (10:48:34 GMT+0800 )
2025-05-14 10:48:34:272 - [4bd6c4bb][Mac2Driver@b272] Cached the protocol value 'W3C' for the new session 4bd6c4bb-bd55-4b1f-893a-26e33394936c
2025-05-14 10:48:34:272 - [4bd6c4bb][Mac2Driver@b272] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}
2025-05-14 10:48:34:273 - [4bd6c4bb][HTTP] <-- POST /session 200 186 ms - 194
2025-05-14 10:48:48:592 - [2d605973][Mac2Driver@e8cd] Shutting down because we waited 30 seconds for a command
2025-05-14 10:48:48:593 - [2d605973][AppiumDriver@a773] Ending session, cause was 'New Command Timeout of 30 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
2025-05-14 10:48:48:596 - [2d605973][AppiumDriver@a773] Removing session '2d605973-dc58-455d-a0e3-68a6eeecccca' from our master session list
2025-05-14 10:48:48:597 - [2d605973][WD Proxy] Matched '/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE' to command name 'deleteSession'
2025-05-14 10:48:48:597 - [2d605973][WD Proxy] Proxying [DELETE /session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] to [DELETE http://127.0.0.1:10100/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] with no body
2025-05-14 10:48:48:613 - [2d605973][WD Proxy] Got response with status 200: {"value":null,"sessionId":null}
2025-05-14 10:49:04:276 - [4bd6c4bb][Mac2Driver@b272] Shutting down because we waited 30 seconds for a command
2025-05-14 10:49:04:278 - [4bd6c4bb][AppiumDriver@a773] Ending session, cause was 'New Command Timeout of 30 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
2025-05-14 10:49:04:278 - [4bd6c4bb][AppiumDriver@a773] Removing session '4bd6c4bb-bd55-4b1f-893a-26e33394936c' from our master session list
2025-05-14 10:49:04:284 - [4bd6c4bb][WD Proxy] Matched '/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE' to command name 'deleteSession'
2025-05-14 10:49:04:285 - [4bd6c4bb][WD Proxy] Proxying [DELETE /session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] to [DELETE http://127.0.0.1:10100/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] with no body
2025-05-14 10:49:04:361 - [4bd6c4bb][WD Proxy] Got response with status 404: {"value":{"error":"invalid session id","message":"Session does not exist","traceback":"(\n\t0 CoreFoundation 0x000000018ae2ae80 __exceptionPreprocess + 176\n\t1 libobjc.A.dylib 0x000000018a912cd8 objc_exception_throw + 88\n\t2 CoreFoundation 0x000000018ae4f534 _CFBundleGetValueForInfoKey + 0\n\t3 WebDriverAgentLib 0x0000000105520ae4 -[FBRoute raiseNoSessionException] + 80\n\t4 WebDriverAgentLib 0x0000000105520a38 -[FBRoute decorateRequest:] + 244\n\t5 WebDriverAgentLib 0x000000010551fed8 -[FBRoute_TargetAction mountRequest:intoResponse:] + 92\n\t6 WebDriverAgentLib 0x0000000105518f68 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 652\n\t7 WebDriverAgentLib 0x0000000105511fe4 -[RoutingHTTPServer handleRoute:withRequest:response:] + 168\n\t8 WebDriverAgentLib 0x0000000105512a2c __72-[RoutingHTTPServer routeMethod:...
2025-05-14 10:49:04:362 - [4bd6c4bb][W3C] Matched W3C error code 'invalid session id' to NoSuchDriverError
2025-05-14 10:49:04:362 - [4bd6c4bb][WebDriverAgentMac] Mac2Driver session cannot be deleted. Original error: Session does not exist
The text was updated successfully, but these errors were encountered:
tgz0514
changed the title
Mac2 Driver Session ID Association Issue When Cleaning Up WebDriverAgentMac Sessions in Consecutive Session Scenarios
Mac2 Driver: Incorrect WDA Session ID Used During Session Cleanup in Consecutive Sessions
May 16, 2025
tgz0514
changed the title
Mac2 Driver: Incorrect WDA Session ID Used During Session Cleanup in Consecutive Sessions
BUG:Mac2 Driver: Incorrect WDA Session ID Used During Session Cleanup in Consecutive Sessions
May 16, 2025
Problem Description:
When using the Appium Mac2 driver for automation and rapidly creating and cleaning up multiple test sessions (which appear to reuse the same WebDriverAgentMac (WDA) host process), I've observed that the driver attempts to clean up the underlying WebDriverAgentMac session using an incorrect WDA Session ID.
This issue specifically occurs when the WDA host process is being utilized by multiple concurrent or quickly consecutive Appium sessions. One Appium session may attempt to delete the WDA Session ID corresponding to another Appium session, leading to cleanup confusion and "invalid session id" errors from WDA.
Steps to Reproduce:
newCommandTimeout
capability, for example,appium:newCommandTimeout: 30
.newCommandTimeout
expiring, or use thedriver.quit()
method actively clean up each session.POST /session
) and termination (DELETE /session
) process in the Appium server logs, paying close attention to theDELETE /session/{WDA_SESSION_ID}
requests that the driver sends via WD Proxy tohttp://127.0.0.1:10100
(the WebDriverAgentMac listening port).Expected Behavior:
When an Appium session ends, it should send a
DELETE /session/{WDA_SESSION_ID}
request to WebDriverAgentMac, where{WDA_SESSION_ID}
is the unique Session ID that the specific Appium session successfully obtained and correctly associated with itself during its creation from WDA. Each Appium session should only be responsible for cleaning up its own corresponding WDA session.Actual Behavior:
From the logs I've observed, when one Appium session (e.g., Appium Session ID
2d605973
, which obtained WDA Session ID7AAD153E-621D-42C4-9C70-3AB24988A9EA
during its creation) ends, it attempts to send aDELETE /session
command to WebDriverAgentMac via the proxy, but it uses a WDA Session ID (FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE
) that actually belongs to another Appium session (e.g., Appium Session ID4bd6c4bb
, obtained during its subsequent creation).Example log snippets (I will attach the full log file containing the Appium and WDA Session ID correlation issue to this Issue for detailed diagnosis, only showing key lines here):
2d605973
during creation (should be remembered):4bd6c4bb
during creation (should be remembered):2d605973
attempts to delete when ending (incorrectly usesFBC33F5E-...
):FBC33F5E-...
, not7AAD153E-...
)4bd6c4bb
attempting to delete the same WDA Session ID (FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE
) when it ends, and WebDriverAgentMac reports that the Session ID does not exist:This incorrect association and cleanup behavior can lead to an unstable WDA process state and affect the reliability of subsequent tests, especially in scenarios requiring rapid session creation and teardown.
Environment Information:
Log :
2025-05-14 10:48:18:365 - [HTTP] Request idempotency key: 159331a7-9613-45d9-bc62-6830f371ced1
2025-05-14 10:48:18:378 - [HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:18:379 - [AppiumDriver@a773] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}]
2025-05-14 10:48:18:380 - [AppiumDriver@a773] Event 'newSessionRequested' logged at 1747190898380 (10:48:18 GMT+0800 )
2025-05-14 10:48:18:384 - [Appium] Attempting to find matching driver for automationName 'mac2' and platformName 'mac'
2025-05-14 10:48:18:384 - [Appium] The 'mac2' driver was installed and matched caps.
2025-05-14 10:48:18:384 - [Appium] Will require it at /Users/test/.appium/node_modules/appium-mac2-driver
2025-05-14 10:48:18:387 - [Appium] Requiring driver at /Users/test/.appium/node_modules/appium-mac2-driver/build/index.js
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Appium v2.15.0 creating new Mac2Driver (v2.2.0) session
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Checking BaseDriver versions for Appium and Mac2Driver
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Appium's BaseDriver version is 9.15.0
2025-05-14 10:48:18:388 - [AppiumDriver@a773] Mac2Driver's BaseDriver version is 9.15.0
2025-05-14 10:48:18:389 - [AppiumDriver@a773] Applying relaxed security to 'Mac2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
2025-05-14 10:48:18:389 - [Mac2Driver@e8cd]
2025-05-14 10:48:18:389 - [Mac2Driver@e8cd] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "mac",
"appium:automationName": "mac2",
"appium:newCommandTimeout": 30,
"appium:noReset": true,
"appium:bundleId": "com.apple.TextEdit"
},
"firstMatch": [
{}
]
}
2025-05-14 10:48:18:391 - [2d605973][Mac2Driver@e8cd] Session created with session id: 2d605973-dc58-455d-a0e3-68a6eeecccca
2025-05-14 10:48:18:391 - [2d605973][WebDriverAgentMac] The host process has already been listening. Proceeding with session creation
2025-05-14 10:48:18:392 - [2d605973][WD Proxy] Matched '/session' to command name 'createSession'
2025-05-14 10:48:18:393 - [2d605973][WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:10100/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:18:584 - [2d605973][WD Proxy] Got response with status 200: {"value":{"sessionId":"7AAD153E-621D-42C4-9C70-3AB24988A9EA","capabilities":{"CFBundleIdentifier":"com.apple.TextEdit"}},"sessionId":"7AAD153E-621D-42C4-9C70-3AB24988A9EA"}
2025-05-14 10:48:18:587 - [2d605973][WD Proxy] Determined the downstream protocol as 'W3C'
2025-05-14 10:48:18:591 - [2d605973][AppiumDriver@a773] New Mac2Driver session created successfully, session 2d605973-dc58-455d-a0e3-68a6eeecccca added to master session list
2025-05-14 10:48:18:594 - [2d605973][AppiumDriver@a773] Event 'newSessionStarted' logged at 1747190898594 (10:48:18 GMT+0800 )
2025-05-14 10:48:18:595 - [2d605973][Mac2Driver@e8cd] Cached the protocol value 'W3C' for the new session 2d605973-dc58-455d-a0e3-68a6eeecccca
2025-05-14 10:48:18:595 - [2d605973][Mac2Driver@e8cd] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}
2025-05-14 10:48:18:597 - [2d605973][HTTP] <-- POST /session 200 220 ms - 194
2025-05-14 10:48:34:083 - [HTTP] Request idempotency key: e400e6cc-cbce-4217-acbe-89b2b5b92383
2025-05-14 10:48:34:087 - [HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:34:088 - [AppiumDriver@a773] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","appium:automationName":"mac2","appium:newCommandTimeout":30,"appium:noReset":true,"appium:bundleId":"com.apple.TextEdit"}}]
2025-05-14 10:48:34:090 - [AppiumDriver@a773] Event 'newSessionRequested' logged at 1747190914090 (10:48:34 GMT+0800 (中国标准时间))
2025-05-14 10:48:34:093 - [Appium] Attempting to find matching driver for automationName 'mac2' and platformName 'mac'
2025-05-14 10:48:34:093 - [Appium] The 'mac2' driver was installed and matched caps.
2025-05-14 10:48:34:094 - [Appium] Will require it at /Users/test/.appium/node_modules/appium-mac2-driver
2025-05-14 10:48:34:097 - [Appium] Requiring driver at /Users/test/.appium/node_modules/appium-mac2-driver/build/index.js
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Appium v2.15.0 creating new Mac2Driver (v2.2.0) session
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Checking BaseDriver versions for Appium and Mac2Driver
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Appium's BaseDriver version is 9.15.0
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Mac2Driver's BaseDriver version is 9.15.0
2025-05-14 10:48:34:098 - [AppiumDriver@a773] Applying relaxed security to 'Mac2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
2025-05-14 10:48:34:099 - [Mac2Driver@b272]
2025-05-14 10:48:34:099 - [Mac2Driver@b272] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "mac",
"appium:automationName": "mac2",
"appium:newCommandTimeout": 30,
"appium:noReset": true,
"appium:bundleId": "com.apple.TextEdit"
},
"firstMatch": [
{}
]
}
2025-05-14 10:48:34:101 - [4bd6c4bb][Mac2Driver@b272] Session created with session id: 4bd6c4bb-bd55-4b1f-893a-26e33394936c
2025-05-14 10:48:34:102 - [4bd6c4bb][WebDriverAgentMac] The host process has already been listening. Proceeding with session creation
2025-05-14 10:48:34:102 - [4bd6c4bb][WD Proxy] Matched '/session' to command name 'createSession'
2025-05-14 10:48:34:102 - [4bd6c4bb][WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:10100/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}}
2025-05-14 10:48:34:272 - [4bd6c4bb][WD Proxy] Got response with status 200: {"value":{"sessionId":"FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE","capabilities":{"CFBundleIdentifier":"com.apple.TextEdit"}},"sessionId":"FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE"}
2025-05-14 10:48:34:272 - [4bd6c4bb][WD Proxy] Determined the downstream protocol as 'W3C'
2025-05-14 10:48:34:272 - [4bd6c4bb][AppiumDriver@a773] New Mac2Driver session created successfully, session 4bd6c4bb-bd55-4b1f-893a-26e33394936c added to master session list
2025-05-14 10:48:34:272 - [4bd6c4bb][AppiumDriver@a773] Event 'newSessionStarted' logged at 1747190914272 (10:48:34 GMT+0800 )
2025-05-14 10:48:34:272 - [4bd6c4bb][Mac2Driver@b272] Cached the protocol value 'W3C' for the new session 4bd6c4bb-bd55-4b1f-893a-26e33394936c
2025-05-14 10:48:34:272 - [4bd6c4bb][Mac2Driver@b272] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"mac","automationName":"mac2","newCommandTimeout":30,"noReset":true,"bundleId":"com.apple.TextEdit"}}
2025-05-14 10:48:34:273 - [4bd6c4bb][HTTP] <-- POST /session 200 186 ms - 194
2025-05-14 10:48:48:592 - [2d605973][Mac2Driver@e8cd] Shutting down because we waited 30 seconds for a command
2025-05-14 10:48:48:593 - [2d605973][AppiumDriver@a773] Ending session, cause was 'New Command Timeout of 30 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
2025-05-14 10:48:48:596 - [2d605973][AppiumDriver@a773] Removing session '2d605973-dc58-455d-a0e3-68a6eeecccca' from our master session list
2025-05-14 10:48:48:597 - [2d605973][WD Proxy] Matched '/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE' to command name 'deleteSession'
2025-05-14 10:48:48:597 - [2d605973][WD Proxy] Proxying [DELETE /session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] to [DELETE http://127.0.0.1:10100/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] with no body
2025-05-14 10:48:48:613 - [2d605973][WD Proxy] Got response with status 200: {"value":null,"sessionId":null}
2025-05-14 10:49:04:276 - [4bd6c4bb][Mac2Driver@b272] Shutting down because we waited 30 seconds for a command
2025-05-14 10:49:04:278 - [4bd6c4bb][AppiumDriver@a773] Ending session, cause was 'New Command Timeout of 30 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
2025-05-14 10:49:04:278 - [4bd6c4bb][AppiumDriver@a773] Removing session '4bd6c4bb-bd55-4b1f-893a-26e33394936c' from our master session list
2025-05-14 10:49:04:284 - [4bd6c4bb][WD Proxy] Matched '/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE' to command name 'deleteSession'
2025-05-14 10:49:04:285 - [4bd6c4bb][WD Proxy] Proxying [DELETE /session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] to [DELETE http://127.0.0.1:10100/session/FBC33F5E-07DF-4C28-9885-5DDBBB5D72CE] with no body
2025-05-14 10:49:04:361 - [4bd6c4bb][WD Proxy] Got response with status 404: {"value":{"error":"invalid session id","message":"Session does not exist","traceback":"(\n\t0 CoreFoundation 0x000000018ae2ae80 __exceptionPreprocess + 176\n\t1 libobjc.A.dylib 0x000000018a912cd8 objc_exception_throw + 88\n\t2 CoreFoundation 0x000000018ae4f534 _CFBundleGetValueForInfoKey + 0\n\t3 WebDriverAgentLib 0x0000000105520ae4 -[FBRoute raiseNoSessionException] + 80\n\t4 WebDriverAgentLib 0x0000000105520a38 -[FBRoute decorateRequest:] + 244\n\t5 WebDriverAgentLib 0x000000010551fed8 -[FBRoute_TargetAction mountRequest:intoResponse:] + 92\n\t6 WebDriverAgentLib 0x0000000105518f68 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 652\n\t7 WebDriverAgentLib 0x0000000105511fe4 -[RoutingHTTPServer handleRoute:withRequest:response:] + 168\n\t8 WebDriverAgentLib 0x0000000105512a2c __72-[RoutingHTTPServer routeMethod:...
2025-05-14 10:49:04:362 - [4bd6c4bb][W3C] Matched W3C error code 'invalid session id' to NoSuchDriverError
2025-05-14 10:49:04:362 - [4bd6c4bb][WebDriverAgentMac] Mac2Driver session cannot be deleted. Original error: Session does not exist
The text was updated successfully, but these errors were encountered: