IOS-Appium 1.6.x-Unable to switch from real device to emulator -appium hangs- reboot required

Team,

I’ve been successful in get my test to run against IOS real device and simulator, but when I switch from a real device to the simulator and try to execute the test, it hangs.

I’m kill the ports and stop and restarting the appium server correctly. I"m guessing something doesn’t get ended correctly, but I’m unable to pin point the issue.

If I reboot my machine and execute using the emulator it works again.

Anyone else running into this issue? Has anyone figure out?

Thanks

DD

It might have been caused by an exist CoreSimulator left on my machine. I’ve added the below to my code.

String[] command2 = {“sh”, “-c”, “ps -ef | grep ‘CoreSimulator’ | grep -v grep | awk ‘{print $2}’|xargs kill -9”};
try {Runtime.getRuntime().exec(command2);
System.out.println(“CoreSimulator was stopped.”);}catch (IOException e) {e.printStackTrace();}

That did fix the issue.

It hangs here
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{"bundle

When I go to the http://localhost:8100/session it displays the below
{
“value” : “Unhandled endpoint: /session – http://localhost:8100/ with parameters {\n wildcards = (\n session\n );\n}”,
“sessionId” : “EFA7D78E-C4FD-46D4-B09C-910DCFB59E5C”,
“status” : 1
}