TestProject Forum
Powered by leading experts in the test automation community

Failed to connect development socket

Hi, when starting the connection with real iOS devices (I’ve seen ), an exception is generated.

  • I use the SDK for c#
  • I’ve seen it on iPhone 8 and iPhone XR.
  • The agent version is 0.63.0

Exception
TestProject.SDK.Remoting.Client.RemoteClient Failed to connect development socket at http://localhost:8585/:56621
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10061): No se puede establecer una conexi¢n ya que el equipo de destino deneg¢ expresamente dicha conexi¢n. [::ffff:127.0.0.1]:56621
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(IPAddress addresses, Int32 port)

Log info:
2020-06-26 08:50:50.172 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 idle-entry i.t.a.a.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=Development&token=6IJAgB4pdmsCymkkE3Ug5wAMhbF3lJErKbUEI_yX1ek - 200 (ZmkhmkQ0): null
2020-06-26 08:50:50.173 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 idle-entry i.t.a.a.b.d Token Development is valid
2020-06-26 08:50:50.174 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 qtp1959248689-1 i.t.a.w.r.e.a.DevelopmentEndpoints Received request to start development mode on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:50.175 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.m.e.j Waiting for Appium to be ready
2020-06-26 08:50:50.199 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 pool-31-thread- i.t.a.e.h Checking if XCUITest is running on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:50.199 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.e.j XCUITest is running on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:50.334 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.a.b.a Updating session c7de029c-921d-459c-9b54-9708ba413c1a to iOS App: [es.santander.retail]…
2020-06-26 08:50:51.974 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.a.a.d POST http://127.0.0.1:65432/wd/hub/session/c7de029c-921d-459c-9b54-9708ba413c1a/appium/app/change - 200 (null): null
2020-06-26 08:50:54.407 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 pool-31-thread- i.t.a.e.h Checking if XCUITest is running on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:54.407 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.e.j XCUITest is running on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:54.544 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 pool-31-thread- i.t.a.e.h Checking if XCUITest is running on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:54.544 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.e.j XCUITest is running on e100b01f2b2eac14fc22c1d9f148be1bf5543636
2020-06-26 08:50:54.567 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.a.a.d POST http://127.0.0.1:65432/wd/hub/session/c7de029c-921d-459c-9b54-9708ba413c1a/appium/protocol/change - 200 (null): null
2020-06-26 08:50:54.570 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.m.a.a Using SDK port: 0
2020-06-26 08:50:54.570 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 start-dev i.t.a.a Heartbeat State: Dev
2020-06-26 08:50:59.571 NHlkPhm1xE2-mJAil6Cv6Q ERROR 672 pool-3-thread-6 i.t.a.m.a.a Failed to receive development socket connection in timely manner (5s)
java.net.SocketTimeoutException: Accept timed out
at java.base/sun.nio.ch.NioSocketImpl.timedAccept(NioSocketImpl.java:708)
at java.base/sun.nio.ch.NioSocketImpl.accept(NioSocketImpl.java:752)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:662)
at java.base/java.net.ServerSocket.platformImplAccept(ServerSocket.java:628)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:604)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:561)
at java.base/java.net.ServerSocket.accept(ServerSocket.java:518)
at io.testproject.agent.managers.a.a.g(TestProjectAgent:456)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.testproject.agent.b.b.run(TestProjectAgent:33)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:830)
2020-06-26 08:50:59.573 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 pool-3-thread-6 i.t.a.m.a.a Development socket disconnected
2020-06-26 08:50:59.573 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 state-machine i.t.a.m.a.a Updating Appium session c7de029c-921d-459c-9b54-9708ba413c1a dialect to W3C
2020-06-26 08:50:59.573 NHlkPhm1xE2-mJAil6Cv6Q ERROR 672 start-dev i.t.a.a.b.d Failed to report application state: Dev
java.lang.InterruptedException: null
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1040)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1345)
at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:285)
at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at io.testproject.agent.a.b.d.a(TestProjectAgent:870)
at io.testproject.agent.a.a(TestProjectAgent:596)
at io.testproject.agent.d.a.i.a(TestProjectAgent:140)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.testproject.agent.b.b.run(TestProjectAgent:33)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:830)
2020-06-26 08:50:59.589 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 state-machine i.t.a.a.a.d POST http://127.0.0.1:65432/wd/hub/session/c7de029c-921d-459c-9b54-9708ba413c1a/appium/protocol/change - 200 (null): null
2020-06-26 08:50:59.589 NHlkPhm1xE2-mJAil6Cv6Q WARN 672 state-machine i.t.a.d.e Can’t process ‘Done’ when in ‘Idle’ state
2020-06-26 08:50:59.592 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 idle-entry i.t.a.d.a.A Account plan: Free
2020-06-26 08:50:59.592 NHlkPhm1xE2-mJAil6Cv6Q INFO 672 idle-entry i.t.a.a Heartbeat State: Idle

Hi @carmelo.gascon

Can you please update your agent to the latest available version and check one more time? We currently fixing some know issues with iOS and hopefully this should be resolved. Please let me know if it works for you

Have you manually specified a non-default Agent URL?
SDK is trying to connect with http://localhost:8585/:56621 which obviously won’t work.
Please share your Test source here so that we can guide you.

Hi @Vladyslav,

I’ve update the agent to 0.63.1 and it is working correctly.
Thank you.

Hi @marat,

We do the connection using this function:
runner = RunnerFactory.Instance.CreateIOS(
DevToken,
DeviceUDID,
DeviceName,
package);
where all the parameters are configured before making the call.

Thank you for your reply @carmelo.gascon,
So using the same code on Agent 0.63.1 it works?

Hi @marat,
after the agent upgrade to 0.63.1 it is working.