Hello,
I have tried everything, but I still randomly get java.lang.IllegalThreadStateException: Thread already started" errors when running multiple appium test runs on two different physical android devices in parallel.
I have tried launching like this:
node /usr/local/bin/appium -a ${APPIUM_NODE} -cp ${UNIQUE_CALLBACK_PORT} -p ${UNIQUE_PORT} -bp ${UNIQUE_BOOT_PORT}>appium.log 2>&1 &
Where APPIUM_NODE is the ip address for the new appium server to use, “127.0.0.1” is what I am using for both runs, because appium fails to connect to any other port I try to enter.
UNIQUE_CALLBACK_PORT is unique between the two devices: 1234 and 1235
UNIQUE_PORT is unique between the two devices: 4723 and 4733
UNIQUE_BOOT_PORT is unique between the two devices: 2251 and 2261
I noticed that -U is deprecated, so now I supply the UDID’s of the two devices via the desired capability.
I also tried just running “appium” as the command, rather than “node /…/appium”
No matter what I do, these “thread already started” errors randomly occur and kill the runs if I run them in parallel!
Appium v1.6.3
Thanks for any help.