question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find any free port in range 8200..8299 (Appium Android)

See original GitHub issue

The 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Aug 5, 2020

Kindly use Appium forum to ask questions

0reactions
mykola-mokhnachcommented, Aug 6, 2020

I would suggest hiring a consultant to get immediate answers to your questions and properly architect the testing framework solution.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found