Not able to start the new session in appium Inspector, Appium 1, Appium2 iOS 16

I have connected a real iOS device. I have added all the desired capabilities in the appium inspector correctly. After that, Im starting the appium session, when Im trying to start the New session in Appium Inspector. It shows error. I have tried with the emulator also, still it gives error.! I have tried with appium version 1 & 2 both.

Could you try checking if the given bundle id is correct? Appium is unable to find the bundle id and platform version.

yes, I have checked. The bundle identifier is correct.

Try to open a native iOS app, for example “com.apple.Preferences”.
If that works, you might need to double check your app’s bundle id.

Appium 1 will never work with iOS 16. Please try Appium 2.

It didn’t worked with the Appium 2 also.

Please share the log, but not in a screenshot.

native applications are also not opening.

[info] e[35m[Appium]e[39m Welcome to Appium v1.22.3
[info] e[35m[Appium]e[39m Non-default server args:
[info] e[35m[Appium]e[39m relaxedSecurityEnabled: true
[info] e[35m[Appium]e[39m allowInsecure: {
[info] e[35m[Appium]e[39m }
[info] e[35m[Appium]e[39m denyInsecure: {
[info] e[35m[Appium]e[39m }
[info] e[35m[Appium]e[39m Appium REST http interface listener started on 0.0.0.0:4723[info] e[35m[HTTP]e[39m e[37m–>e[39m e[37mPOSTe[39m e[37m/sessione[39m
[info] e[35m[HTTP]e[39m e[90m{“capabilities”:{“alwaysMatch”:{“appium:platformVersion”:“16.0.2”,“appium:deviceName”:“iPhone 8”,“appium:udid”:“6d3183e335c07a0fa022b668da64a3af71b1ba83”,“appium:bundleId”:“com.xsysys.icatchse19”,“appium:platformName”:“iOS”,“appium:newCommandTimeout”:3600,“appium:connectHardwareKeyboard”:true},“firstMatch”:[{}]},“desiredCapabilities”:{“appium:platformVersion”:“16.0.2”,“appium:deviceName”:“iPhone 8”,“appium:udid”:“6d3183e335c07a0fa022b668da64a3af71b1ba83”,“appium:bundleId”:“com.xsysys.icatchse19”,“appium:platformName”:“iOS”,“appium:newCommandTimeout”:3600,“appium:connectHardwareKeyboard”:true}}e[39m
[debug] e[35m[HTTP]e[39m No route found for /session
[info] e[35m[HTTP]e[39m e[37m<-- POST /session e[39me[33m404e[39m e[90m14 ms - 211e[39m
[info] e[35m[HTTP]e[39m e[90me[39m

This is what you call ‘Appium 2’?

2 Likes

archana@githubs-Mac-mini ~ % appium

[Appium] Welcome to Appium v2.4.1 (REV 705d2564ddfb9c915ee9425dd9ed408bfac61005)

[Appium] The autodetected Appium home path: /Users/archana/.appium

[Appium] Attempting to load driver xcuitest…

[Appium] Requiring driver at /Users/archana/.appium/node_modules/appium-xcuitest-driver/build/index.js

[Appium] XCUITestDriver has been successfully loaded in 0.394s

[Appium] Appium REST http interface listener started on http://0.0.0.0:4723

[Appium] You can provide the following URLs in your client code to connect to this server:

[Appium] http://127.0.0.1:4723/ (only accessible from the same host)

[Appium] http://192.168.1.4:4723/

[Appium] http://169.254.93.192:4723/

[Appium] Available drivers:

[Appium] - [email protected] (automationName ‘XCUITest’)

[Appium] No plugins have been installed. Use the “appium plugin” command to install the one(s) you want to use.

[HTTP] --> POST /session

[HTTP] {“capabilities”:{“alwaysMatch”:{“appium:platformVersion”:“16.0.2”,“appium:deviceName”:“iPhone 8”,“appium:udid”:“6d3183e335c07a0fa022b668da64a3af71b1ba83”,“appium:bundleId”:“com.example.apple-samplecode.UICatalogHello1”,“appium:platformName”:“iOS”,“appium:newCommandTimeout”:3600,“appium:connectHardwareKeyboard”:true},“firstMatch”:[{}]},“desiredCapabilities”:{“appium:platformVersion”:“16.0.2”,“appium:deviceName”:“iPhone 8”,“appium:udid”:“6d3183e335c07a0fa022b668da64a3af71b1ba83”,“appium:bundleId”:“com.example.apple-samplecode.UICatalogHello1”,“appium:platformName”:“iOS”,“appium:newCommandTimeout”:3600,“appium:connectHardwareKeyboard”:true}}

[AppiumDriver@b63b] Calling AppiumDriver.createSession() with args: [{“appium:platformVersion”:“16.0.2”,“appium:deviceName”:“iPhone 8”,“appium:udid”:“6d3183e335c07a0fa022b668da64a3af71b1ba83”,“appium:bundleId”:“com.example.apple-samplecode.UICatalogHello1”,“appium:platformName”:“iOS”,“appium:newCommandTimeout”:3600,“appium:connectHardwareKeyboard”:true},null,{“alwaysMatch”:{“appium:platformVersion”:“16.0.2”,“appium:deviceName”:“iPhone 8”,“appium:udid”:“6d3183e335c07a0fa022b668da64a3af71b1ba83”,“appium:bundleId”:“com.example.apple-samplecode.UICatalogHello1”,“appium:platformName”:“iOS”,“appium:newCommandTimeout”:3600,“appium:connectHardwareKeyboard”:true},“firstMatch”:[{}]}]

[AppiumDriver@b63b] Event ‘newSessionRequested’ logged at 1704858464449 (09:17:44 GMT+0530 (India Standard Time))

[BaseDriver] The capabilities [“platformName”] are standard capabilities and do not require “appium:” prefix

[Appium] Could not parse W3C capabilities: ‘automationName’ can’t be blank

[AppiumDriver@b63b] Event ‘newSessionStarted’ logged at 1704858464452 (09:17:44 GMT+0530 (India Standard Time))

[AppiumDriver@b63b] Encountered internal error running command: InvalidArgumentError: ‘automationName’ can’t be blank

[AppiumDriver@b63b] at processCapabilities (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/capabilities.js:345:13)

[AppiumDriver@b63b] at parseCapsForInnerDriver (/opt/homebrew/lib/node_modules/appium/lib/utils.js:152:40)

[AppiumDriver@b63b] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:622:49)

[AppiumDriver@b63b] at commandExecutor (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.ts:106:18)

[AppiumDriver@b63b] at AppiumDriver.executeCommand (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.ts:123:15)

[AppiumDriver@b63b] at processTicksAndRejections (node:internal/process/task_queues:95:5)

[AppiumDriver@b63b] at defaultBehavior (/opt/homebrew/lib/node_modules/appium/lib/appium.js:1105:16)

[AppiumDriver@b63b] at AppiumDriver.executeWrappedCommand (/opt/homebrew/lib/node_modules/appium/lib/appium.js:1215:16)

[AppiumDriver@b63b] at AppiumDriver.executeCommand (/opt/homebrew/lib/node_modules/appium/lib/appium.js:1121:17)

[AppiumDriver@b63b] at asyncHandler (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:393:19)

[HTTP] <-- POST /session 400 27 ms - 1238

[HTTP]…

You should add capability:

"appium:automationName":"XCUITest"

Appium is complaining here that you haven’t told it what driver to use. I can see you have that capability on Appium 1 (in screenshot), but not sure why you forgot it here.
More on Capabilities:

I have added the below desired capability. Still not able to set the seesion.
“appium:automationName”:“XCUITest”

i have added the below desired capability also. still not able to set the session.
“appium:automationName”:“XCUITest”

What is it you expect here? You’ve added the capability, you are getting a different error. You haven’t shared the log so I can see the error and help.

I should let you know that I am really terrible at mind reading. You are thinking of a cat! See – useless.

Appium2.txt (19.5 KB)
please check the logs in the attached text file. Apologies for sharing logs in a text file. Earlier, when I pasted the logs, they flagged my post under community guidelines, calling it a spam or advertisement.

No worries about that. I can read this fine.

So for the error, did you read it? Good info:

[AppiumDriver@bbb5] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70. This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch. Consider setting ‘showXcodeLog’ capability to true in order to check the Appium server log for build-related error messages… 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.

Error 70 (in my experience) means the target for the build (the device) is having a problem. Can you see it in Xcode?

I suggest you follow this steps:

I had the same issue when I started the setup.

1 Like

Im not able to see the full page here, On clicking the link, it says page not found error.

Page has moved to here:

https://appium.github.io/appium-xcuitest-driver/5.14/preparation/real-device-config/