[Device Farm Plugin] Use Device of ios real device is EADDRINUSE Error Message

Hi Team,

when my automation script is runnning. ı encounter EADDRINUSE message. I encounter only with iPhone devices.

[eae8da1f][DevCon Factory] Requesting connection for device 00008030-000425EC1E04802E on local port 64886, device port 64886

[eae8da1f][DevCon Factory] Cached connections count: 0

[eae8da1f][XCUITestDriver@963f] {“code”:“EADDRINUSE”,“errno”:-48,“syscall”:“listen”,“address”:“::”,“port”:64886}

[eae8da1f][DevCon Factory] Releasing connections for 00008030-000425EC1E04802E device on any port number

[eae8da1f][DevCon Factory] No cached connections have been found

[eae8da1f][AppiumDriver@ea3e] Event ‘newSessionStarted’ logged at 1726310994933 (13:49:54 GMT+0300 (GMT+03:00))

[eae8da1f][device-farm-main] :iphone: b38e30a0-282e-443e-b59a-45b39e4b3986 Session response: {“protocol”:“W3C”,“error”:{“code”:“EADDRINUSE”,“errno”:-48,“syscall”:“listen”,“address”:“::”,“port”:64886}}

[eae8da1f][device-farm-main] :iphone: Removing pending session with capability_id: b38e30a0-282e-443e-b59a-45b39e4b3986

My gist : gist:c707fb88f3eb1c08ae21b7021a50e383 · GitHub

More info here:

Seems like you are getting good advice there. I don’t use Device Farm plugin, maybe someone else here does and can help. Make sure to give all info so people know what you are talking about and can give the best possible answer.

Hi @wreed,

it is not the same problem… ı’ didn’t use appium-device-farm plugin ı encounter the same problem.

Advice is the same though:

This may happen if the automation tests are failing to quit the session at the end of the test. Can you confirm if the issue still observed even after clearing the sessions?

Like @sudharsan-selvaraj mentioned device free happens in 3 situations

  1. When driver.quit is called from the test code.
  2. When appium server thrown any unexpected error.
  3. If the device is ideal for certain time.

Hi @wreed,

okay ı understand you, however, if there is a problem in my code, why ı encounter this problem in the appium-inspector?

Inspector is just another client. If you have an open session it will behave in the same way.