[ANDRIOD] SessionNotCreatedException in headless/parallel mode

Using the latest Appium server and Java client with Gradle and Junit.

Steps to reproduce:

  1. start 4 Appium servers:


  1. start the tests with the next command
 gradle cleanTestAndroidDemo testAndroidDemo --tests "Group*"

task testAndroidDemo(type: Test) {
    retry {
        maxRetries = 1
    }
    maxParallelForks = 4
    forkEvery = 1
    systemProperty "platformType", "android_demo"
    exclude '**/SmokeTurnOnBannerNotificationsTest.class'
    exclude '**/SmokeNotificationsBannerDismissTest.class'
}

PLEASE NOTE:
ALL TESTS RUNNING 100% OK IN PARALLEL NON-HEADLESS MODE