UIAutomator2 crashes with ECONNRESET error when running 2 tests with different ports simultaneously

Good day,

We currently do parallel execution of Appium tests via Jenkins. What we do is we run the appium server programatically for each job. It works fine when using UIAutomator but crashes constantly when using UIAutomator2, especially if 2 jobs run at the same time.

Any reason for this? Is there a fix or workaround for this?

We’re currently using the latest version of UIAutomator2([email protected] and [email protected]) and tried on both Appium 1.6.5 & Appium 1.6.6-beta3. Currently running tests on Android devices.

Looking forward to your help. Thanks!

Getting the same issue , any solutions ?