Cannot find any free port in range 8200..8299 (Appium Android)
See original GitHub issueThe problem
I’m not able to run about 100 Android tests (can run iOS) but I’m able to run less than 100 tests for sure.
Environment
- Appium version: 1.18.0
- Desktop OS/version: Mac Os Catalina 10.15.4
- Node.js version: 12.16.3
- Npm: 6.14.7
- Mobile platform/version under test: Android
- Emulator: PIXEL_3a_API_R
Details
ADB seems to not delete the unused active session. In the end, I see 100 active sessions are there. The available port is 8200 -8299 for UIautomator 2 and that’s why it seems that I’m not able to run more than 100 tests.
Error:
Starting logs capture with command: /Users/username/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
E selenium.common.exceptions.WebDriverException: Message: 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
Link to Appium logs
https://gist.github.com/Pr60/9a6c5e010a7f5229285a49dd2d9425ba
Additional Info
Please note the issue has been mentioned in Stackoverflow too. Here are some more details regarding what has been done to resolve the problem but still didn’t work - https://stackoverflow.com/questions/63238793/appium-error-cannot-find-any-free-port-in-range-8200-8299
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Appium Error: Cannot find any free port in range 8200..8299
I did clean the emulator and restarted too. Apart from this, I didn't find any port from 8200-8299 which is already being used...
Read more >Cannot find any free port in range 8200..8299 (Appium Android)
ADB seems to not delete the unused active session. In the end, I see 100 active sessions are there. The available port is...
Read more >w3c: No open port found · Issue #12186 · appium ... - GitHub
This means that UIA2 driver cannot find any free port in range 8200..8299 on the host system. Either set the systemPort capability or...
Read more >How to handle error in Appium: Original error: Cannot find any free ...
"How to handle error in Appium: Original error: Cannot find any free port in range 8200…8299? ... Hi Brett! To resolve this error,...
Read more >appium报错- 爱洗澡的猫- 博客园
Original error: Cannot find any free port in range 8200..8299}. Please set the available port number by providing the systemPort capability ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Kindly use Appium forum to ask questions
I would suggest hiring a consultant to get immediate answers to your questions and properly architect the testing framework solution.