appium / appium-xcuitest-driver

Appium iOS driver, backed by Apple XCTest
https://appium.github.io/appium-xcuitest-driver/
Apache License 2.0
744 stars 417 forks source link

Could not start session #2401

Closed pppppino closed 5 months ago

pppppino commented 5 months ago

appium version: 2.5.4 xcuitest version: 7.16.2

error: E selenium.common.exceptions.SessionNotCreatedException: Message: Could not start a new session. Could not start a new session. Error while creating session with the service http://******:4725/. Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName 'xcuitest' and platformName 'IOS'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: Could not find installed driver to support given caps)

but I do installed XCUITest driver: image

pppppino commented 5 months ago

appium & driver: all latest version

I have uninstall and reinstall appium, above problem can not reproduce, but I got a new problem:

Could not determine Xcode version: undefined

@KazuCocoa , Hi, Could you please help me to check this problem.

[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[XCUITestDriver@0b51] Capability 'wdaLocalPort' changed from string ('8100') to integer (8100). This may cause unexpected behavior
[XCUITestDriver@0b51] The following provided capabilities were not recognized by this driver:
[XCUITestDriver@0b51]   resetKeyboard
[XCUITestDriver@0b51]   unicodeKeyboard
[XCUITestDriver@0b51 (db4f01c8)] Session created with session id: db4f01c8-aea9-4750-819a-32ef49b3781f
[XCUITest] Current user: 'admin'
[XCUITestDriver@0b51 (db4f01c8)] Available real devices: 00008120-001E519036A1A01E, 365600ebfdab09be15315bf858fd8871ce546ac1, c2faf99cb910025649c7dbf0f95bb778f46c805f
[XCUITestDriver@0b51 (db4f01c8)] Creating iDevice object with udid '00008120-001E519036A1A01E'
[XCUITestDriver@0b51 (db4f01c8)] Determining device to run tests on: udid: '00008120-001E519036A1A01E', real device: true
[XCUITestDriver@0b51 (db4f01c8)] Normalized platformVersion capability value '15.6.1' to '15.6'
[Xcode] '/Library/Developer/CommandLineTools' is not a valid Xcode path. Consider running:
[Xcode]     sudo xcode-select -s "/Applications/Xcode.app/Contents/Developer"
[Xcode] to address this issue.
[XCUITest] '/Library/Developer/CommandLineTools' is not a valid Xcode path. Consider running:
[XCUITest]     sudo xcode-select -s "/Applications/Xcode.app/Contents/Developer"
[XCUITest] to address this issue.
[XCUITestDriver@0b51 (db4f01c8)] {}
[DevCon Factory] Releasing connections for 00008120-001E519036A1A01E device on any port number
[DevCon Factory] No cached connections have been found
[AppiumDriver@f51d] Event 'newSessionStarted' logged at 1717118702014 (09:25:02 GMT+0800 (China Standard Time))
[AppiumDriver@f51d] Encountered internal error running command: Error: Could not determine Xcode version: undefined
[AppiumDriver@f51d]     at getAndCheckXcodeVersion (/Users/admin/.appium/node_modules/appium-xcuitest-driver/lib/utils.js:35:11)
[AppiumDriver@f51d]     at XCUITestDriver.start (/Users/admin/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:27)
[AppiumDriver@f51d]     at XCUITestDriver.createSession (/Users/admin/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:413:7)
[AppiumDriver@f51d]     at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:717:35)
[HTTP] <-- POST /session 500 167 ms - 588
[HTTP] 
KazuCocoa commented 5 months ago

Did you fix the issue addressed below?

�[38;5;32m[XCUITestDriver@0b51 (db4f01c8)]�[0m Normalized platformVersion capability value '15.6.1' to '15.6'
�[38;5;80m[Xcode]�[0m '/Library/Developer/CommandLineTools' is not a valid Xcode path. Consider running:
�[38;5;80m[Xcode]�[0m     sudo xcode-select -s "/Applications/Xcode.app/Contents/Developer"
�[38;5;80m[Xcode]�[0m to address this issue.
�[38;5;64m[XCUITest]�[0m '/Library/Developer/CommandLineTools' is not a valid Xcode path. Consider running:
�[38;5;64m[XCUITest]�[0m     sudo xcode-select -s "/Applications/Xcode.app/Contents/Developer"
�[38;5;64m[XCUITest]�[0m to address this issue.
�[38;5;32m[XCUITestDriver@0b51 (db4f01c8)]�[0m {}
pppppino commented 5 months ago

@KazuCocoa thanks a lot, it's this issue block me, now driver is working