AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Other
324 stars 101 forks source link

Gracefully handle unexpectedServerShutdown event when session is killed due to command timeout #1214

Open saikrishna321 opened 3 months ago

saikrishna321 commented 3 months ago
          @erdncyz 

We will handle these errors gracefully. How is this impacting the user side?

[AndroidUiautomator2Driver@1989] Shutting down because we waited 60 seconds for a command
[AppiumDriver@38ca] Ending session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[AppiumDriver@38ca] Plugin device-farm defines an unexpected shutdown handler; calling it now
[AppiumDriver@38ca] Removing session 'bf8bcd01-2b70-417f-a1da-85257e97872a' from our master session list

Delete session is called by the appium server as the command timeout.

[AndroidUiautomator2Driver@1989] Proxying [DELETE /] to [DELETE http://127.0.0.1:59707/session/914efb31-b99e-4103-a5fa-9fb70a292cfe] with no body
[device-farm-main] Unblocking device mapped with filter {"session_id":"bf8bcd01-2b70-417f-a1da-85257e97872a","udid":"241ae3789b1c7ece"} onUnexpectedShutdown from server

Originally posted by @saikrishna321 in https://github.com/AppiumTestDistribution/appium-device-farm/issues/1208#issuecomment-2188851976