Errors running Appium-python pytest, mainly urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=4723): Max retries exceeded with url: /wd/hub/session : Failed to establish a new connection:
See original GitHub issueThe problem
Initially, my scripts are stuck in line :
self.driver = webdriver.Remote('http://{}:{}/wd/hub'.format(self.appium_ip_address,
self.appium_port),
desired_capabilities=desired_caps)
Sometimes, it works, and most of the time, Appium desktop succeed in conncting the application, but occasionnaly, Appium desktop says he cannot connect because the app crashed, please see logcat (but the app doesn’t launch, for two different apps).
Anyway, this makes me suspect a problem with appium, and I decided to control installation tests (here) and I got a 17 errors, 4 failed, which is not so good for 21 tests.
Environment
- Appium version (or git revision) that exhibits the issue: 1.17.1
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: windows 10/ Anaconda distrib/python 3.7.7
- Node.js version (unless using Appium.app|exe): 12.16.3
- Npm or Yarn package manager: npm 6.14.4
- Mobile platform/version under test: android 10, nexus 5, api 29
- Real device or emulator/simulator: emu
- Appium CLI or Appium.app|exe:
Details
As most of the log lines refers to errors in urllib3, I tried to upgrade urllib3, but this makes no difference in the result of the test.
I also tried to run the test with and without a emulator running, without difference
Anyway, I would thank you to help me understand what is wrong with my configuration, and help me succeed in running these tests successfully.
Link to Appium logs
Full log is attached log_test.txt
Code To Reproduce Issue [ Good To Have ]
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
The log is very messy and big, although I don’t observe any server issues there. All the errors are expected reactions to valid issues, which must be fixed on the client side.
@jeromedejaegher Is this the latest logs you have as I have seen many errors regarding configuration. Let me point out those.
Looks like device is not dected in adb.
You are trying to get the title after delete the session. You should initiate the driver again.
Please use compatible version chrome driver.
Looks like xocode is not selected use xcode-select to select the required xcode version