Xcodebuild error 65 keeps appearing after update

Hello, I updated the xcuitest driver and Appium. After that I built WebDriverAgent. Now xcodebuild error 65 keeps appearing when I try to connect to the device. At the same time, I do all the same actions that I did before the update. And they worked. Currently I use: MacOS Ventura 13.2, Xcode 14.3.1, Appium 2.1.3, xcuitest driver 5.0.0, iOS 16.3. I have attached the server log below.
log.txt (91.4 KB)

Do you understand the different datatypes in your language and what they are for? I’m seeing these kinds of errors in your log:

2023-09-11 17:33:30:746 [BaseDriver] Number capability passed in as string. Functionality may be compromised.
2023-09-11 17:33:30:748 [BaseDriver] Number capability passed in as string. Functionality may be compromised.
2023-09-11 17:33:30:750 [XCUITestDriver@1b4c] Capability ‘autoLaunch’ changed from string to boolean. This may cause unexpected behavior
2023-09-11 17:33:30:750 [XCUITestDriver@1b4c] Capability ‘usePrebuiltWDA’ changed from string to boolean. This may cause unexpected behavior
2023-09-11 17:33:30:750 [XCUITestDriver@1b4c] Capability ‘useNewWDA’ changed from string to boolean. This may cause unexpected behavior
2023-09-11 17:33:30:751 [XCUITestDriver@1b4c] Capability ‘wdaLocalPort’ changed from string (‘8100’) to integer (8100). This may cause unexpected behavior
2023-09-11 17:33:30:751 [XCUITestDriver@1b4c] Capability ‘webviewConnectTimeout’ changed from string (‘90000’) to integer (90000). This may cause unexpected behavior

So everything is being passed as a string. You can change this by removing quotes, for example:

  • This parameter is being passed as a string: “appium:useNewWDA”: “false”
  • The same parameter passed as a boolean: “appium:useNewWDA”: false

Notice that you don’t need to quote the value in these cases. Can you make these changes and see if that helps?

Also, looking at this:

2023-09-11 17:33:39:909 [XCUITestDriver@1b4c (d0a84960)] Output from xcodebuild will only be logged if any errors are present there. To change this, use ‘showXcodeLog’ desired capability

Can you add showXcodeLog to see if there is additional info?

I’ve made these changes, but it doesn’t help. I have attached the server log below.
log.txt (49.0 KB)

@GragLam : Error 65 deals with provisioning profile in xcode . while building WDA , check if signing in profile is configured properly.

@Karunakar.donuru2 Maybe you could clarify what I need to check? I mean, everything seems to be configured correctly.

Oh, it definitely helped. Here is the error:

2023-09-12 07:48:35:347 [Xcode] Testing failed:
2023-09-12 07:48:35:348 [Xcode] Test target WebDriverAgentRunner encountered an error (The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read. No such file or directory: “/Users/a5.gorbach/Library/Developer/Xcode/DerivedData/WebDriverAgent-bomghklstwzgarffreziplhlsztk/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app”.)

So the unit tests are failing. What could be going on here? Check this out:

2023-09-12 07:48:33:259 [Xcode] CODE_SIGN_IDENTITY = iPhoneDeveloper

This looks odd. I checked capabilities:

2023-09-12 07:48:19:084 [XCUITestDriver@e02c] “appium:xcodeSigningId”: “iPhoneDeveloper”

My own capability shows:

“appium:xcodeSigningId”: “iPhone Developer”

I couldn’t believe that this would matter until I reproduced it here. Can you try adding a space and see if that fixes the issue?

I’ve tried, but the issue still exists. I have attached the server log below.
log (1).txt (47.6 KB)

Different error though:

2023-09-12 18:46:28:681 [Xcode] Testing failed:
2023-09-12 18:46:28:681 [Xcode] Test target WebDriverAgentRunner encountered an error (The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read. No such file or directory: “/Users/a5.gorbach/Library/Developer/Xcode/DerivedData/WebDriverAgent-bomghklstwzgarffreziplhlsztk/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app”.)

Can you try building the app manually? Follow the steps in the guide referenced in your log:

2023-09-12 18:46:40:644 [AppiumDriver@8022] Testing started. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

I’ve been doing this since the beginning of this story.:grin::grin:

@wreed I execute the following command: xcodebuild build-for-testing test-without-building -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=00008030-000245C93E51402E’. It seems I’ve found the main issue. If I understand correctly I need to update the OS version.
Maybe the issue.txt (2.5 KB)

1 Like

I guess I was too quick to think the problem was solved. There’s a new problem.
New Error.txt (3.2 KB)

--------------------UPD--------------------
I also thought of attaching the WebDriverAgent project settings. Everything seems to be configured correctly.

WebDriverAgentRunner - Signing & Capabilities

WebDriverAgentRunner - Build Settings

WebDriverAgentLib - Signing & Capabilities

WebDriverAgentLib - Build Settings

WebDriverAgent - Build Settings - Part 1

WebDriverAgent - Build Settings - Part 2

WebDriverAgent - Build Settings - Part 3

Can you try cleaning the build folder after this happens?

Product->Clean Build Folder

If the app is corrupt this will allow you to make a fresh build without cached data.

I remember this error XCodebuild error 65 and the solution was replace the content of appium-webdriveragent with this version https://github.com/appium/WebDriverAgent/releases/tag/v4.9.0, after I did that all works well

@wreed I did this every time before building the components. But it did not help to deal with this error.

@Giovanny_Leal I will try. As I understand it I need to copy the contents of WebDriverAgent 4.9.0 into the Appium WebDriverAgent folder by selecting the ‘REPLACE’ option? Or should I delete the contents of the WebDriverAgent Appium folder and only then copy the contents of WebDriverAgent 4.9.0 there?

-------------------- UPD --------------------
@Giovanny_Leal I tried both options mentioned (copy/replace and delete/copy), but got the same result. I am attaching the result below.
Result.txt (301.7 KB)

It looks like I managed to solve the problem. I had to manually delete all the contents of the DerivedData folder of Xcode. It was also necessary to uninstall the xcuitest driver version 5.0.0 and install the xcuitest driver version 4.12.0. In addition to WebDriverAgentRunner, it was also necessary to create and install an IntegrationApp on the devices. At least these are the actions that I did not repeat in previous attempts. Thank you everyone for your help.

1 Like