KeepAliveFailure Exception, Server killing connection

Main Problem:

I am running automated testing for iOS and an issue that persists is the KeepAliveFailure Exception.

threw exception:
OpenQA.Selenium.WebDriverException: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://MYADDRESS:MYPORT/wd/hub/session/9ac27695-d8d6-48ab-8646-23d61b909820/execute. The status of the exception was KeepAliveFailure, and the message was: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. —> System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.

The server consistently kills the connection after the JavaScript line is executed

image

After research and investigation, I have concluded that the problem comes from the server. I have found that when the scroll concludes, the line (4th up from the below image that begins with [HTTP]) only has a single ← POST, instead of the usual ← and → that exists every where else in the server log.

Is the server connection the problem? And if so why is the server continually killing the connection and what is the solution?

Some important notes:

  • This only occurs when the Appium server is started from terminal on a remote machine. It works fine from the Appium Desktop App, but I need to use the terminal.
  • If stepped through, step by step, the exception does not appear.
  • Terminal command used:

appium --address MYADDRESS --port MYPORT --platform-name iOS --native-instruments-lib

  • Reverting the WebDriver has not worked.

Specs:

  • Appium 1.7.1
  • Xcode simulator iPhone 7, 10.3 Version

I’m experiencing same trouble atm. Was you able to solve it?