zebrunner / appium

Enhanced Appium for Elastic Selenium Grid/MCloud services
8 stars 3 forks source link

Make adb stop forwarding port after test finish #405

Closed azarouski closed 4 months ago

azarouski commented 4 months ago

tests fails with exception:

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: An unknown server-side error 
occurred while processing the command. Original error: unknown error: Failed to forward ports to device R5CT31NB5ET. 
No port chosen: . Perhaps your adb version is out of date. ChromeDriver 2.39 and newer require adb version 1.0.38 or 
newer. Run 'adb version' in your terminal of the host device to find your version of adb.[[[--udid R5CT31NB5ET --name 
Galaxy_S22_Ultra --sessionId cf7691f7-4f2a-4a92-8680-5cb18830b12b]]]
vdelendik commented 4 months ago

fixed. successfully tested on patched production env. adb forward for android chrome devtools port could be started 1st time only. For 2nd etc session on this device it just blocked adb forward request and after starting chrome everything crashed.