1.An unknown server-side error occurred while processing the command. Original error: Cannot find any free port in range 8200..8299}. Please set the available port number by providing the systemPort capability or double check the processes that are locking ports within this range and terminate these which are not needed anymore
設備上的Proxy代理被上次自動化運行占用未被釋放導致的
一般Node.js提供的HttpServer默認設置了超時時間為2分鍾,當一個請求的處理時間超過2分鍾,HttpServer會自動將該請求的socket關閉掉,於是客戶端便收到了 ECONNRESET 的錯誤信息了;當然這里不是因為時間的問題 是直接報超時error ,主要的原因就是HttpServer進程被上次自動化一直占用,所以會導致一運行就會報ECONNRESET 的錯誤,由於uiautomator對應的端口全被占用了,一般重啟設備或刪除Appium的所屬App即可這個報錯是由於uiautomator對應的端口全被占用了,重啟手機即可
2.
selenium.common.exceptions.WebDriverException: Message: An unknown server-side e
rror occurred while processing the command. Original error: Error getting device
API level. Original error: Error executing adbExec. Original error: 'Command 'C
:\\android-sdk\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s e20b976b
7d44 shell getprop ro.build.version.sdk' timed out after 20000ms'. Try to increa
se the 20000ms adb execution timeout represented by 'adbExecTimeout' capability