appium-desktop icon indicating copy to clipboard operation
appium-desktop copied to clipboard

Xcode not detecting udid all the time

Open Annjames1 opened this issue 3 years ago • 1 comments
trafficstars

We tried to run the script , and we were able to launch the app in real device(udid detected)but later when we tried to run again its failing with the same error(udid not found). When we tried to build WDA in xcode 14 application using same udid the build is successfull . on trying to build WDA on xcode 14 through "CLI" we are getting the same error. IMG-20221012-WA0004 the main issue we identified is the xcode is not able to detect the device all the time,only once is a while we are able to launch the app in the device xcode version -14 tvOS -16 Please provide your valuable solution to this issue

Annjames1 avatar Oct 12 '22 14:10 Annjames1

I saw this kind of report frequently in Xcode 14's xcodebuild, so potentially xcodebuild in Xcode 14 causes the issue more frequently than before... Then, only Apple can improve it.

Similar issue in the apple forum: https://developer.apple.com/forums/thread/700583

KazuCocoa avatar Oct 12 '22 19:10 KazuCocoa

Hi @KazuCocoa The above issue is resolved now, we are able to launch the app via terminal and while we build WDA in xcode 14 application using same udid the build is successfull .

Reference from terminal is given below- ` **** TEST BUILD SUCCEEDED **

Testing started 2022-10-18 18:35:01.755964+0530 WebDriverAgentRunner-Runner[699:17721] Running tests... Test Suite 'All tests' started at 2022-10-18 18:35:01.936 Test Suite 'WebDriverAgentRunner.xctest' started at 2022-10-18 18:35:01.936 Test Suite 'UITestingUITests' started at 2022-10-18 18:35:01.937 t = nans Suite Set Up 2022-10-18 18:35:01.959341+0530 WebDriverAgentRunner-Runner[699:17721] [User Defaults] Couldn't write values for keys ( KeyboardAutocorrection ) in CFPrefsPlistSource<0x282f27900> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access 2022-10-18 18:35:01.960026+0530 WebDriverAgentRunner-Runner[699:17721] [User Defaults] Couldn't write values for keys ( "KeyboardAutocorrection_changedAt" ) in CFPrefsPlistSource<0x282f27900> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access 2022-10-18 18:35:01.960454+0530 WebDriverAgentRunner-Runner[699:17721] [User Defaults] Couldn't write values for keys ( `**

**But while running the script am getting the same error "no device found with udid **" Any idea how we can resolve this?..Because in terminal its running and getting success

Annjames1 avatar Oct 18 '22 13:10 Annjames1

@KazuCocoa My device is apple tv 4k and we are using ethernet cable to connect the apple TV with mac, will that be the issue Screenshot 2022-10-18 at 7 29 15 PM

Annjames1 avatar Oct 18 '22 14:10 Annjames1

Could you share the appium log?

It could be. appium-ios-device does not have the ability to handle network devices, not USB connected. I have no environment to check the wired or WiFi, but potentially they are the same.

One possible workaround is to manage WDA with 3rd party tools such as iproxy as https://github.com/appium/appium-xcuitest-driver/blob/master/docs/wda-custom-server.md#wda-startup

KazuCocoa avatar Oct 19 '22 01:10 KazuCocoa