Appium 1.6.5 - XCUITest - Cannot read property 'on' of undefined


We have a large suite of tests that run over night. At some point some of them fail with the following stacktrace:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot read property ‘on’ of undefined (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: ‘2.53.0’, revision: ‘35ae25b1534ae328c771e0856c93e187490ca824’, time: ‘2016-03-15 10:43:46’
System info: host: ‘myserver’, ip: ‘myip’, ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.4’, java.version: ‘1.8.0_91’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{, networkConnectionEnabled=false, databaseEnabled=false, deviceName=iPhone 5s, platform=MAC, newCommandTimeout=300, platformVersion=9.3, webStorageEnabled=false, locationContextEnabled=false, automationName=XCUITest, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=iOS, udid=419974E6-A221-4AAA-AF9F-5289DFF5D143}]
Session ID: 08eaa650-21e8-48a2-b1a7-c732a5849b0d
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.openqa.selenium.remote.ErrorHandler.createThrowable(
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at io.appium.java_client.DefaultGenericMobileDriver.execute(
at io.appium.java_client.AppiumDriver.execute(
at io.appium.java_client.AppiumDriver.launchApp(

We’re using Appium 1.6.5 and the tests are running on iOS 9.3 simulator. I will check to see if the same issue occurs for iOS 10.3 simulator as well.

Any indication on why this is happening? We haven’t encounter this issue on Appium 1.6.4.