Appium takes more than 5 min to get response while automating iOS app - ios

I Have observed that when I first time run my script that will run very fast without any delay response. However, immediately, if I run the same script without any changes or closing simulator or any kind of reset, following POST request takes more than 5 min to get a response.
Request from Appium:
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"XXX.XXXX.ios","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
Response:
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"91784C9C-3B63-40D3-9335-9C80548E7E68","capabilities":{"device":"iphone","browserName":null,"sdkVersion":"11.4","CFBundleIdentifier":null}},"sessionId":"91784C9C-3B63-40D3-9335-9C80548E7E68","status":0}
Following are my configured version
Xcode Version: Xcode 9.4.1, Build version 9F2000
Appium: v1.8.1 also
tried with v1.9.1
node: 5.6.0
Javac: javac 1.8.0_171
Device: Simulator (iPhone 7)
Appium Java-client: 6.1.0
Full Appium log:
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"/Users/user.name/Desktop/XXXXX.app","noReset":false,"unhandledPromptBehavior":true,"deviceName":"iPhone 7","version":"","platform":"MAC","newCommandTimeout":1500,"platformVersion":"11.4","automationName":"XCUITest","browserName":"iPhone","platformName":"IOS","udid":"7B7A3A94-372F-4872-8BD0-F7BC50CA2924","autoAcceptAlerts":true,"unexpectedAlertBehaviour":true},"capabilities":{"alwaysMatch":{"appium:app":"/Users/user.name/Desktop/XXXXX.app","appium:autoAcceptAlerts":true,"appium:automationName":"XCUITest","browserName":"iPhone","appium:deviceName":"iPhone 7","appium:newCommandTimeout":1500,"appium:noReset":false,"platform":"MAC","platformName":"ios","appium:platformVersion":"11.4","appium:udid":"7B7A3A94-372F-4872-8BD0-F7BC50CA2924","unexpectedAlertBehaviour":true,"unhandledPromptBehavior":true,"version":""},"firstMatch":[{}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/Users/user.name/Desktop/XXXXX.app","noReset":false,"unhandledPromptBehavior":true,"deviceName":"iPhone 7","version":"","platform":"MAC","newCommandTimeout":1500,"platformVersion":"11.4","automationName":"XCUITest","browserName":"iPhone","platformName":"IOS","udid":"7B7A3A94-372F-4872-8BD0-F7BC50CA2924","autoAcceptAlerts":true,"unexpectedAlertBehaviour":true},null,{"alwaysMatch":{"appium:app":"/Users/user.name/Desktop/XXXXX.app","appium:autoAcceptAlerts":true,"appium:automationName":"XCUITest","browserName":"iPhone","appium:deviceName":"iPhone 7","appium:newCommandTimeout":1500,"appium:noReset":false,"platform":"MAC","platformName":"ios","appium:platformVersion":"11.4","appium:udid":"7B7A3A94-372F-4872-8BD0-F7BC50CA2924","unexpectedAlertBehaviour":true,"unhandledPromptBehavior":true,"version":""},"firstMatch":[{}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1539403642546 (09:37:22 GMT+0530 (IST))
[BaseDriver] The capabilities ["platform","unexpectedAlertBehaviour","version"] are not standard capabilities and should have an extension prefix
[Appium] Creating new XCUITestDriver (v2.84.0) session
[Appium] Capabilities:
[Appium] browserName: iPhone
[Appium] platform: MAC
[Appium] platformName: ios
[Appium] unexpectedAlertBehaviour: true
[Appium] unhandledPromptBehavior: true
[Appium] version:
[Appium] app: /Users/user.name/Desktop/XXXXX.app
[Appium] autoAcceptAlerts: true
[Appium] automationName: XCUITest
[Appium] deviceName: iPhone 7
[Appium] newCommandTimeout: 1500
[Appium] noReset: false
[Appium] platformVersion: 11.4
[Appium] udid: 7B7A3A94-372F-4872-8BD0-F7BC50CA2924
[debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities [object Object] were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
[BaseDriver] The following capabilities were provided, but are not recognized by appium: unhandledPromptBehavior, platform, unexpectedAlertBehaviour, version.
[XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
[BaseDriver] Session created with session id: 7b782b91-6f85-433d-b713-070a891c95f9
[debug] [XCUITest] Current user: 'user.name'
[debug] [XCUITest] Xcode version set to '9.4.1' (tools v9.4.0.0.1.1526532315)
[debug] [XCUITest] iOS SDK Version set to '11.4'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1539403642636 (09:37:22 GMT+0530 (IST))
[iOSSim] Constructing iOS simulator for Xcode version 9.4.1 with udid '7B7A3A94-372F-4872-8BD0-F7BC50CA2924'
[XCUITest] Determining device to run tests on: udid: '7B7A3A94-372F-4872-8BD0-F7BC50CA2924', real device: false
[BaseDriver] Using local app '/Users/user.name/Desktop/XXXXX.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1539403642857 (09:37:22 GMT+0530 (IST))
[debug] [XCUITest] Checking whether app '/Users/user.name/Desktop/XXXXX.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/user.name/Desktop/XXXXX.app': 'XXX.XXXX.ios'
[debug] [BaseDriver] Event 'resetStarted' logged at 1539403642858 (09:37:22 GMT+0530 (IST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1539403643079 (09:37:23 GMT+0530 (IST))
[debug] [XCUITest] Starting log capture for iOS Simulator with udid '7B7A3A94-372F-4872-8BD0-F7BC50CA2924', using 'xcrun simctl spawn 7B7A3A94-372F-4872-8BD0-F7BC50CA2924 log stream --style compact'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1539403643385 (09:37:23 GMT+0530 (IST))
[XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOSSim] Matched 1 Simulator cache item for cleanup: /Users/user.name/Library/Developer/CoreSimulator/Devices/7B7A3A94-372F-4872-8BD0-F7BC50CA2924/data/Library/Caches/com.apple.mobile.installd.staging
[debug] [iOSSim] Setting preferences of 7B7A3A94-372F-4872-8BD0-F7BC50CA2924 Simulator to {"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Updated 7B7A3A94-372F-4872-8BD0-F7BC50CA2924 Simulator preferences at '/Users/user.name/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"7B7A3A94-372F-4872-8BD0-F7BC50CA2924":{"ConnectHardwareKeyboard":false}},"ConnectHardwareKeyboard":false}
[debug] [iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Both Simulator with UDID 7B7A3A94-372F-4872-8BD0-F7BC50CA2924 and the UI client are currently running
[debug] [BaseDriver] Event 'simStarted' logged at 1539403643658 (09:37:23 GMT+0530 (IST))
[debug] [XCUITest] Verifying application platform
[debug] [XCUITest] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[debug] [XCUITest] Reset requested. Removing app with id 'XXX.XXXX.ios' from the device
[debug] [XCUITest] Installing '/Users/user.name/Desktop/XXXXX.app' on Simulator with UUID '7B7A3A94-372F-4872-8BD0-F7BC50CA2924'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1539403647212 (09:37:27 GMT+0530 (IST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.4\",\n \"sdkVersion\" : \"11.3\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.4\",\n \"ip\" : \"192.168.2.4\"\n },\n \"build\" : {\n \"upgradedAt\" : \"1539327134564\",\n \"time\" : \"Oct 12 2018 12:22:23\",\n \"productBundleIdentifier\" : \"com.facebook.WebDriverAgentRunner\"\n }\n },\n \"sessionId\" : \"163984B3-334E-4054-AB68-99D93F26F976\",\n \"status\" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1539403647303 (09:37:27 GMT+0530 (IST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1539403647304 (09:37:27 GMT+0530 (IST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.4\",\n \"sdkVersion\" : \"11.3\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.4\",\n \"ip\" : \"192.168.2.4\"\n },\n \"build\" : {\n \"upgradedAt\" : \"1539327134564\",\n \"time\" : \"Oct 12 2018 12:22:23\",\n \"productBundleIdentifier\" : \"com.facebook.WebDriverAgentRunner\"\n }\n },\n \"sessionId\" : \"163984B3-334E-4054-AB68-99D93F26F976\",\n \"status\" : 0\n}"
**[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"XXX.XXXX.ios","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}**
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"91784C9C-3B63-40D3-9335-9C80548E7E68","capabilities":{"device":"iphone","browserName":null,"sdkVersion":"11.4","CFBundleIdentifier":null}},"sessionId":"91784C9C-3B63-40D3-9335-9C80548E7E68","status":0}
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1539403968659 (09:42:48 GMT+0530 (IST))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1539403968659 (09:42:48 GMT+0530 (IST))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[debug] [BaseDriver] Event 'orientationSet' logged at 1539403968660 (09:42:48 GMT+0530 (IST))
[Appium] New XCUITestDriver session created successfully, session 7b782b91-6f85-433d-b713-070a891c95f9 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1539403968660 (09:42:48 GMT+0530 (IST))
[debug] [W3C] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"iPhone","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"platformName":"ios","unhandledPromptBehavior":true,"unexpectedAlertBehaviour":true,"version":"","app":"/Users/user.name/Desktop/XXXXX.app","autoAcceptAlerts":true,"automationName":"XCUITest","deviceName":"iPhone 7","newCommandTimeout":1500,"noReset":false,"platformVersion":"11.4","udid":"7B7A3A94-372F-4872-8BD0-F7BC50CA2924"}}

Try to run your tests with capability noReset: true and don't close/start driver before each test: you can use driver.launchApp() simply to restart it.

Related

Getting error as xcodebuild failed with code 65 Event 'wdaStartFailed'

Hi getting below error while running appium automation sript for ios device using xcode 14.I tried all th possible solutions but no luck so far.
As per below link there is a changes in xcode 14 which support only appium 2,but before trying appium 2 i wanted to confirm once whether this is the actual root cause or there is any other config issue https://forum.katalon.com/t/failed-to-build-webdriveragent-to-deployed-on-ios-16/78524
Below is the complete appium log
[info] [35m[Appium][39m Appium v1.22.0 creating new XCUITestDriver (v3.53.1) session
[info] [35m[Appium][39m Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [35m[BaseDriver][39m Creating session with W3C capabilities: {
[debug] [35m[BaseDriver][39m "alwaysMatch": {
[debug] [35m[BaseDriver][39m "platformName": "ios",
[debug] [35m[BaseDriver][39m "appium:VERSION": "15.6.1",
[debug] [35m[BaseDriver][39m "appium:automationName": "XCUITest",
[debug] [35m[BaseDriver][39m "appium:bundleId": "com.mobisy.bizom",
[debug] [35m[BaseDriver][39m "appium:deviceName": "Bizom Iphone",
[debug] [35m[BaseDriver][39m "appium:udid": "00008110-001475EE0C80401E",
[debug] [35m[BaseDriver][39m "appium:xcodeOrgId": "CM3KB1234",
[debug] [35m[BaseDriver][39m "appium:xcodeSigningId": "iPhone Developer"
[debug] [35m[BaseDriver][39m },
[debug] [35m[BaseDriver][39m "firstMatch": [
[debug] [35m[BaseDriver][39m {}
[debug] [35m[BaseDriver][39m ]
[debug] [35m[BaseDriver][39m }
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up[error] [35m[WebDriverAgent][39m xcodebuild exited with code '65' and signal 'null'
[info] [35m[WebDriverAgent][39m Launching WebDriverAgent on the device
[info] [35m[WebDriverAgent][39m WebDriverAgent does not need a cleanup. The sources are up to date (1644399105000 >= 1632535255000)
[debug] [35m[WebDriverAgent][39m Killing running processes 'xcodebuild.*00008110-001475EE0C80401E' for the device 00008110-001475EE0C80401E...[debug] [35m[WebDriverAgent][39m 'pgrep -if xcodebuild.*00008110-001475EE0C80401E' didn't detect any matching processes. Return code: 1
[debug] [35m[WebDriverAgent][39m Using Xcode configuration file: '/var/folders/nt/rb3yh81n7m543x9rl4996v7c0000gp/T/202303-842-1lzs80g.e5g4/appium-temp.xcconfig'
[debug] [35m[WebDriverAgent][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/divya.p/Library/Developer/Xcode/DerivedData/WebDriverAgent-aghlrsejdreqngftgvcqwnjgrbou -destination id=00008110-001475EE0C80401E IPHONEOS_DEPLOYMENT_TARGET=15.6 -xcconfig /var/folders/nt/rb3yh81n7m543x9rl4996v7c0000gp/T/202303-842-1lzs80g.e5g4/appium-temp.xcconfig GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent'
[debug] [35m[WebDriverAgent][39m Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up
[error] [35m[WebDriverAgent][39m xcodebuild exited with code '65' and signal 'null'
[debug] [35m[BaseDriver][39m Event 'wdaStartFailed' logged at 1672738945363 (15:12:25 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [35m[XCUITest][39m xcodebuild error message:
[debug] [35m[XCUITest][39m . 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.
[warn] [35m[XCUITest][39m Quitting and uninstalling WebDriverAgent
[info] [35m[WebDriverAgent][39m Shutting down sub-processes[debug] [35m[WebDriverAgent][39m Uninstalling WDAs: 'com.mobisy.bizom.xctrunner'[error] [35m[XCUITest][39m {}
[info] [35m[DevCon Factory][39m Releasing connections for 00008110-001475EE0C80401E device on any port number
[info] [35m[DevCon Factory][39m Found cached connections to release: ["00008110-001475EE0C80401E:8100"]
[info] [35m[DevCon Factory][39m Releasing the listener for '00008110-001475EE0C80401E:8100'
[debug] [35m[iProxy#00008110:8100][39m Closing the connection
[debug] [35m[DevCon Factory][39m Cached connections count: 0
[debug] [35m[XCUITest][39m Not clearing log files. Use `clearSystemFiles` capability to turn on.
[info] [35m[iProxy#00008110:8100][39m The connection has been closed

Appium Inspector Not Working Unable to inspect the element in ios 15.3.1

Iam using xcode v-13.2 appium version 1.21.0 and iPhone XR v-15.3.1 not able to open appium inspector pls help!!!!
terminal code-
Last login: Fri Feb 25 01:09:02 on ttys000
taniya#Anus-MacBook ~ % cd /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
taniya#Anus-MacBook appium-webdriveragent % xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id='00008020-000E08901EF9002E' test -allowProvisioningUpdates
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=00008020-000E08901EF9002E test -allowProvisioningUpdates
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
2022-02-25 01:13:10.330 xcodebuild[9152:471315] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: 41cbaf1fe2310278fb3c9a049f6b7dc8
Build description path: /Users/Taniya/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Build/Intermediates.noindex/XCBuildData/41cbaf1fe2310278fb3c9a049f6b7dc8-desc.xcbuild
note: Build preparation complete
note: Building targets in dependency order
Testing started
2022-02-25 01:13:13.528951+0530 WebDriverAgentRunner-Runner[1296:487378] Running tests...
Test Suite 'All tests' started at 2022-02-25 01:13:13.949
Test Suite 'WebDriverAgentRunner.xctest' started at 2022-02-25 01:13:13.949
Test Suite 'UITestingUITests' started at 2022-02-25 01:13:13.950
t = nans Suite Set Up
2022-02-25 01:13:13.981084+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
KeyboardAutocorrection
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.981636+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
"KeyboardAutocorrection_changedAt"
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.982059+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
"KeyboardAutocorrection_buildAtChange"
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.982425+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
"KeyboardAutocorrection_previousValue"
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.982751+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
"KeyboardAutocorrection_analyzedAt"
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.990357+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
KeyboardPrediction
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.990775+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
KeyboardShowPredictionBar
) in CFPrefsPlistSource<0x280582a00> (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-02-25 01:13:13.991318+0530 WebDriverAgentRunner-Runner[1296:487378] [User Defaults] Couldn't write values for keys (
DidShowGestureKeyboardIntroduction
) in CFPrefsPlistSource<0x280582a00> (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
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2022-02-25 01:13:13.992
t = 0.00s Set Up
2022-02-25 01:13:13.993946+0530 WebDriverAgentRunner-Runner[1296:487378] Built at Feb 25 2022 01:09:15
2022-02-25 01:13:14.009294+0530 WebDriverAgentRunner-Runner[1296:487378] ServerURLHere->http://192.168.101.4:8100<-ServerURLHere
2022-02-25 01:13:14.010070+0530 WebDriverAgentRunner-Runner[1296:487639] Using singleton test manager
2022-02-25 01:18:25.473278+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
t = 311.50s Find the Application 'com.apple.springboard'
t = 311.51s Requesting snapshot of accessibility hierarchy for app with pid 63
2022-02-25 01:18:26.519103+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
t = 312.53s Find the Application 'com.apple.springboard'
t = 312.53s Requesting snapshot of accessibility hierarchy for app with pid 63
2022-02-25 01:18:26.656315+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
t = 312.67s Get all elements bound by accessibility element for: Descendants matching type StatusBar
t = 312.67s Requesting snapshot of accessibility hierarchy for app with pid 63
t = 312.77s Find: Descendants matching type StatusBar
t = 312.78s Checking existence of `StatusBar`
t = 312.78s Requesting snapshot of accessibility hierarchy for app with pid 63
t = 312.87s Find: Descendants matching type StatusBar
t = 312.87s Find: Identity Binding
t = 312.87s Find the StatusBar
t = 312.88s Requesting snapshot of accessibility hierarchy for app with pid 63
t = 312.96s Find: Descendants matching type StatusBar
t = 312.96s Find: Identity Binding
2022-02-25 01:18:26.974700+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
t = 312.98s Requesting snapshot of accessibility hierarchy for app with pid 63
2022-02-25 01:18:27.074784+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
2022-02-25 01:18:27.087328+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
t = 313.10s Requesting snapshot of accessibility hierarchy for app with pid 63
2022-02-25 01:18:27.191684+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
2022-02-25 01:18:27.217950+0530 WebDriverAgentRunner-Runner[1296:487378] Getting the most recent active application (out of 1 total items)
2022-02-25 01:18:27.221305+0530 WebDriverAgentRunner-Runner[1296:487378] The following attributes were requested to be included into the XML: {(
FBNameAttribute,
FBHeightAttribute,
FBAccessibleAttribute,
FBValueAttribute,
FBVisibleAttribute,
FBWidthAttribute,
FBEnabledAttribute,
FBTypeAttribute,
FBYAttribute,
FBLabelAttribute,
FBIndexAttribute,
FBXAttribute
)}
2022-02-25 01:18:27.221497+0530 WebDriverAgentRunner-Runner[1296:487378] Waiting up to 2s until com.apple.springboard is in idle state (including animations)
t = 313.23s Wait for com.apple.springboard to idle
t = 313.23s Requesting snapshot of accessibility hierarchy for app with pid 63
attaching images of iphone,appium,and inspector-
[enter image description here][1]
[1]: https://i.stack.imgur.com/cz58Y.png
appium code-
The server is running
[Appium] Welcome to Appium v1.21.0
[Appium] Non-default server args:
[Appium] relaxedSecurityEnabled: true
[Appium] allowInsecure: {
[Appium] }
[Appium] denyInsecure: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions
[HTTP] {}
[GENERIC] Calling AppiumDriver.getSessions() with args: []
[GENERIC] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"NoReset":true,"autoLaunch":false,"automationName":"XCUITest","bundleId":"com.mcdonalds.gma.Arch","deviceName":"iPhone XR","fullReset":false,"platformName":"iOS","platformVersion":"14.7","udid":"00008020-000E08901EF9002E","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"NoReset":true,"autoLaunch":false,"automationName":"XCUITest","bundleId":"com.mcdonalds.gma.Arch","deviceName":"iPhone XR","fullReset":false,"platformName":"iOS","platformVersion":"14.7","udid":"00008020-000E08901EF9002E","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1645732104338 (01:18:24 GMT+0530 (India Standard Time))
[Appium] Appium v1.21.0 creating new XCUITestDriver (v3.43.0) session
[Appium] Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] Creating session with MJSONWP desired capabilities: {
[BaseDriver] "NoReset": true,
[BaseDriver] "autoLaunch": false,
[BaseDriver] "automationName": "XCUITest",
[BaseDriver] "bundleId": "com.mcdonalds.gma.Arch",
[BaseDriver] "deviceName": "iPhone XR",
[BaseDriver] "fullReset": false,
[BaseDriver] "platformName": "iOS",
[BaseDriver] "platformVersion": "14.7",
[BaseDriver] "udid": "00008020-000E08901EF9002E",
[BaseDriver] "newCommandTimeout": 0,
[BaseDriver] "connectHardwareKeyboard": true
[BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] NoReset
[BaseDriver] Session created with session id: f3731b63-8e2e-4be1-9c50-3f5774a79856
[XCUITest] Current user: 'taniya'
[XCUITest] Available devices: 00008020-000E08901EF9002E
[XCUITest] Creating iDevice object with udid '00008020-000E08901EF9002E'
[XCUITest] Determining device to run tests on: udid: '00008020-000E08901EF9002E', real device: true
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1645732105240 (01:18:25 GMT+0530 (India Standard Time))
[BaseDriver] Event 'appConfigured' logged at 1645732105241 (01:18:25 GMT+0530 (India Standard Time))
[BaseDriver] Event 'resetStarted' logged at 1645732105241 (01:18:25 GMT+0530 (India Standard Time))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1645732105241 (01:18:25 GMT+0530 (India Standard Time))
[WebDriverAgent] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent'
[WebDriverAgent] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[XCUITest] Crash reports root '/Users/Taniya/Library/Logs/CrashReporter/MobileDevice/Anu’s iPhone' does not exist. Got nothing to gather.
[BaseDriver] Event 'logCaptureStarted' logged at 1645732105481 (01:18:25 GMT+0530 (India Standard Time))
[XCUITest] Setting up real device
[WebDriverAgent] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[DevCon Factory] Requesting connection for device 00008020-000E08901EF9002E on local port 8100, device port 8100
[DevCon Factory] Cached connections count: 0
[DevCon Factory] Successfully requested the connection for 00008020-000E08901EF9002E:8100
[XCUITest] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"iOS","sdkVersion":"15.2","version":"15.3.1"},"ios":{"ip":"192.168.101.4"},"ready":true,"build":{"time":"Feb 25 2022 01:09:15","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":null}
[WebDriverAgent] Upgrade timestamp of the currently bundled WDA: 1620631774000
[WebDriverAgent] Upgrade timestamp of the WDA on the device: undefined
[WebDriverAgent] Will reuse previously cached WDA instance at 'http://127.0.0.1:8100/' with 'com.facebook.WebDriverAgentRunner'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval
[XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[BaseDriver] Event 'wdaStartAttempted' logged at 1645732105769 (01:18:25 GMT+0530 (India Standard Time))
[WebDriverAgent] Using provided WebdriverAgent at 'http://127.0.0.1:8100/'
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"iOS","sdkVersion":"15.2","version":"15.3.1"},"ios":{"ip":"192.168.101.4"},"ready":true,"build":{"time":"Feb 25 2022 01:09:15","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":null}
[BaseDriver] Event 'wdaSessionAttempted' logged at 1645732105781 (01:18:25 GMT+0530 (India Standard Time))
[XCUITest] Sending createSession command to WDA
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8100/session] with body: {"capabilities":{"firstMatch":[{"arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true}],"alwaysMatch":{}}}
[WD Proxy] Got response with status 200: {"value":{"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189","capabilities":{"device":"iphone","browserName":" ","sdkVersion":"15.3.1","CFBundleIdentifier":"com.apple.springboard"}},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[WD Proxy] Determined the downstream protocol as 'W3C'
[BaseDriver] Event 'wdaSessionStarted' logged at 1645732105983 (01:18:25 GMT+0530 (India Standard Time))
[BaseDriver] Event 'wdaStarted' logged at 1645732105983 (01:18:25 GMT+0530 (India Standard Time))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[BaseDriver] Event 'orientationSet' logged at 1645732105984 (01:18:25 GMT+0530 (India Standard Time))
[BaseDriver] The value of 'elementResponseAttributes' setting did not change. Skipping the update for it
[BaseDriver] The value of 'shouldUseCompactResponses' setting did not change. Skipping the update for it
[Appium] New XCUITestDriver session created successfully, session f3731b63-8e2e-4be1-9c50-3f5774a79856 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1645732105985 (01:18:25 GMT+0530 (India Standard Time))
[MJSONWP (f3731b63)] Cached the protocol value 'MJSONWP' for the new session f3731b63-8e2e-4be1-9c50-3f5774a79856
[MJSONWP (f3731b63)] Responding to client with driver.createSession() result: {"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"NoReset":true,"autoLaunch":false,"automationName":"XCUITest","bundleId":"com.mcdonalds.gma.Arch","deviceName":"iPhone XR","fullReset":false,"platformName":"iOS","platformVersion":"14.7","udid":"00008020-000E08901EF9002E","newCommandTimeout":0,"connectHardwareKeyboard":true}
[HTTP] <-- POST /wd/hub/session 200 1648 ms - 544
[HTTP]
[HTTP] --> GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/contexts
[HTTP] {}
[MJSONWP (f3731b63)] Calling AppiumDriver.getContexts() with args: ["f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'getContexts'
[XCUITest] Getting list of available contexts
[iOS] Retrieving contexts and views
[XCUITest] Selecting by url: false
[RemoteDebugger] Remote Debugger version 8.13.2
[RemoteDebugger] useNewSafari --> false
[RemoteDebugger] Checking which communication style to use (non-Safari on platform version '14.7')
[RemoteDebugger] Platform version equal or higher than '12.2': true
[RemoteDebugger] Setting communication protocol: using Target-based communication
[RemoteDebugger] Sending connection key request
[RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 0): 'setConnectionKey'
[RemoteDebugger] Sending to Web Inspector took 3ms
[RemoteDebugger] Sending connection key request
[RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 2): 'setConnectionKey'
[RemoteDebugger] Sending to Web Inspector took 3ms
[RemoteDebugger] Selecting application
[RemoteDebugger] No applications currently connected.
[XCUITest] No web frames found.
[MJSONWP (f3731b63)] Responding to client with driver.getContexts() result: ["NATIVE_APP"]
[HTTP] <-- GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/contexts 200 186 ms - 86
[HTTP]
[HTTP] --> GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/context
[HTTP] {}
[MJSONWP (f3731b63)] Calling AppiumDriver.getCurrentContext() with args: ["f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'getCurrentContext'
[MJSONWP (f3731b63)] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/context 200 2 ms - 84
[HTTP]
[HTTP] --> GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856
[HTTP] {}
[MJSONWP (f3731b63)] Calling AppiumDriver.getSession() with args: ["f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'getSession'
[WD Proxy] Matched '/' to command name 'getSession'
[WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189] with no body
[WD Proxy] Got response with status 200: {"value":{"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189","capabilities":{"device":"iphone","browserName":" ","sdkVersion":"15.3.1","CFBundleIdentifier":"com.apple.springboard"}},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[WD Proxy] Proxying [GET /wda/screen] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/wda/screen] with no body
[WD Proxy] Got response with status 200: {"value":{"statusBarSize":{"width":414,"height":48},"scale":2},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/window/size] with no body
[WD Proxy] Got response with status 200: {"value":{"width":414,"height":896},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[XCUITest] Merging WDA caps over Appium caps for session detail response
[MJSONWP (f3731b63)] Responding to client with driver.getSession() result: {"udid":"00008020-000E08901EF9002E","NoReset":true,"autoLaunch":false,"automationName":"XCUITest","bundleId":"com.mcdonalds.gma.Arch","deviceName":"iPhone XR","fullReset":false,"platformName":"iOS","platformVersion":"14.7","newCommandTimeout":0,"connectHardwareKeyboard":true,"device":"iphone","browserName":" ","sdkVersion":"15.3.1","CFBundleIdentifier":"com.apple.springboard","pixelRatio":2,"statBarHeight":48,"viewportRect":{"left":0,"top":96,"width":828,"height":1696}}
[HTTP] <-- GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856 200 582 ms - 546
[HTTP]
[HTTP] --> GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/window/current/size
[HTTP] {}
[MJSONWP (f3731b63)] Calling AppiumDriver.getWindowSize() with args: ["current","f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'getWindowSize'
[WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/window/size] with no body
[WD Proxy] Got response with status 200: {"value":{"width":414,"height":896},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[MJSONWP (f3731b63)] Responding to client with driver.getWindowSize() result: {"width":414,"height":896}
[HTTP] <-- GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/window/current/size 200 117 ms - 98
[HTTP]
[HTTP] --> POST /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/execute
[HTTP] {"script":"mobile:getContexts","args":[]}
[MJSONWP (f3731b63)] Calling AppiumDriver.execute() with args: ["mobile:getContexts",[],"f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'execute'
[XCUITest] Getting list of available contexts
[iOS] Retrieving contexts and views
[XCUITest] Selecting by url: false
[RemoteDebugger] Sending connection key request
[RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 4): 'setConnectionKey'
[RemoteDebugger] Sending to Web Inspector took 1ms
[RemoteDebugger] Selecting application
[RemoteDebugger] No applications currently connected.
[XCUITest] No web frames found.
[XCUITest] No webviews found in 1ms
[MJSONWP (f3731b63)] Responding to client with driver.execute() result: [{"id":"NATIVE_APP"}]
[HTTP] <-- POST /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/execute 200 3 ms - 93
[HTTP]
[HTTP] --> GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/source
[HTTP] {}
[MJSONWP (f3731b63)] Calling AppiumDriver.getPageSource() with args: ["f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'getPageSource'
[WD Proxy] Matched '/source' to command name 'getPageSource'
[WD Proxy] Proxying [GET /source] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/source] with no body
[WebDriverAgent] Parsed BUILD_DIR configuration value: '/Users/Taniya/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products'
[WebDriverAgent] Got derived data root: '/Users/Taniya/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp'
[WD Proxy] Got response with status 200: {"value":"\n\n \n \n \n \n \n \n
[MJSONWP (f3731b63)] Responding to client with driver.getPageSource() result: "\n \n \n \n \n \n \n
[HTTP] <-- GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/source 200 1759 ms - 20029
[HTTP]
[HTTP] --> GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/screenshot
[HTTP] {}
[MJSONWP (f3731b63)] Calling AppiumDriver.getScreenshot() with args: ["f3731b63-8e2e-4be1-9c50-3f5774a79856"]
[XCUITest] Executing command 'getScreenshot'
[XCUITest] Taking screenshot with WDA
[WD Proxy] Matched '/screenshot' to command name 'getScreenshot'
[WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/screenshot] with no body
[WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"A screen capture was made impossible","traceback":""},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen
[XCUITest] Error getting screenshot: A screen capture was made impossible
[XCUITest] Taking screenshot with WDA
[WD Proxy] Matched '/screenshot' to command name 'getScreenshot'
[WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/screenshot] with no body
[WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"A screen capture was made impossible","traceback":""},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen
[XCUITest] Taking screenshot with WDA
[WD Proxy] Matched '/screenshot' to command name 'getScreenshot'
[WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/AB8BF474-27EB-4C78-978E-83EBBAC4F189/screenshot] with no body
[WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"A screen capture was made impossible","traceback":""},"sessionId":"AB8BF474-27EB-4C78-978E-83EBBAC4F189"}
[W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen
[MJSONWP (f3731b63)] Encountered internal error running command: UnableToCaptureScreen: A screen capture was made impossible
[MJSONWP (f3731b63)] at errorFromW3CJsonCode (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:780:25)
[MJSONWP (f3731b63)] at ProxyRequestError.getActualError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:663:14)
[MJSONWP (f3731b63)] at JWProxy.command (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:272:19)
[MJSONWP (f3731b63)] at runMicrotasks ()
[MJSONWP (f3731b63)] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[HTTP] <-- GET /wd/hub/session/f3731b63-8e2e-4be1-9c50-3f5774a79856/screenshot 500 1043 ms - 123
[HTTP]
pls help

Appium Desktop terminates after booting ios simulator

I'm trying to inspect the elements of the IntegrationApp.app that comes with the WebDriverAgent project. I built the app on a simulator in xcode but when I:
Open Appium Desktop (v1.15.1) on my MAC (v10.14.6)
Start the server
Select Start Inspector Session magnifying glass icon in the top right corner of the appium window
Provide the following capability set:
{
"automationName": "XCUITest",
"platformName": "iOS",
"deviceName": "iPad Air (3rd generation)",
"platformVersion": "13.1",
"app": "/Users/[MAC_USER]/Desktop/IntegrationApp.app"
}
Start the session
The simulator boots up and then Appium Desktop terminates leaving the ios simulator open without the app being installed. Has anyone encountered similar issues? Any thoughts what could be causing the issue? When running xcrun simctl list it lists the model. Below are the appium logs:
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1574244116561 (10:01:56 GMT+0000 (GMT))
[info] [Appium] Appium v1.15.1 creating new XCUITestDriver (v2.133.1) session
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {
[debug] [BaseDriver] "app": "/Users/testuser/Desktop/IntegrationApp.app",
[debug] [BaseDriver] "automationName": "XCUITest",
[debug] [BaseDriver] "deviceName": "iPad Air (3rd generation)",
[debug] [BaseDriver] "platformName": "iOS",
[debug] [BaseDriver] "platformVersion": "13.1",
[debug] [BaseDriver] "newCommandTimeout": 0,
[debug] [BaseDriver] "connectHardwareKeyboard": true
[debug] [BaseDriver] }
[info] [BaseDriver] Session created with session id: ba3f0114-0bfa-4e5a-8bb8-ee1d30e62166[debug] [XCUITest] Current user: 'testuser'
[info] [HTTP] [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
[info] [HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getSessions() with args: []
[debug] [GENERIC] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40
[info] [HTTP]
[info] [XCUITest] iOS SDK Version set to '13.2'[info] [iOSSim] Constructing iOS simulator for Xcode version 11.2.1 with udid 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[info] [XCUITest] Determining device to run tests on: udid: 'C360E349-1255-4D96-B146-13D1FD3ACDF5', real device: false
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1574244119170 (10:01:59 GMT+0000 (GMT))
[info] [BaseDriver] Using local app '/Users/testuser/Desktop/IntegrationApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1574244119174 (10:01:59 GMT+0000 (GMT))
[debug] [XCUITest] Checking whether app '/Users/testuser/Desktop/IntegrationApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/testuser/Desktop/IntegrationApp.app': 'com.demo2019.IntegrationApp'
[debug] [BaseDriver] Event 'resetStarted' logged at 1574244119179 (10:01:59 GMT+0000 (GMT))[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1574244119388 (10:01:59 GMT+0000 (GMT))[warn] [XCUITest] Continuing without capturing device logs: iOS Simulator with udid C360E349-1255-4D96-B146-13D1FD3ACDF5 is not running
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOS] Setting did not need to be updated
[debug] [iOSSim] Setting preferences of C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator to {"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Updated C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator preferences at '/Users/testuser/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"C360E349-1255-4D96-B146-13D1FD3ACDF5":{"ConnectHardwareKeyboard":true}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}[info] [iOSSim] Booting Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5...[info] [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID C360E349-1255-4D96-B146-13D1FD3ACDF5 -ConnectHardwareKeyboard 1[info] [iOSSim] Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5 booted in 16 seconds
[debug] [IDB] Connecting idb service to 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[debug] [IDB] Disconnecting idb service from 'C360E349-1255-4D96-B146-13D1FD3ACDF5'```
This issue is with idb. It seems that idb is not working properly. You need to uninstall idb completely.
pip uninstall fb-idb
brew uninstall idb
brew uninstall idb-companion
And then make sure that below commands should not give any results.
which idb
which idb-companion
Now run your code it should work fine.
Basically we don't need idb to run ios simulator

Appium is creating instances of a simulator

I am trying out automation for IOS simulator with Appium and webdriverio.
Appium is creating simulator with random simulator name like 'appiumTest-4F75F52A-4C52-48F0-B818-60C891F72E95-iPhone XR'.
It is creating number of simulators according the number of tests which has been written. I am trying to figure out why appium is creating instances of the simulators.
Desired capabilities for the test:
capabilities: [{
maxInstances: 1,
deviceName: 'iPhone XR',
platformName: 'iOS',
app: 'app/path',
platformVersion: '12.2',
orientation: 'PORTRAIT',
noReset: true,
automationName: 'XCUITest',
useNewWDA: true,
waitForQuiescence: false,
newCommandTimeout: 240,
}]
Given is the APPIUM log of the test for Ios simulator
[35m[BaseDriver][39m Session created with session id: 6caa6127-91ad-4770-9e6b-6adbbcfbf000
[debug]
[35m[XCUITest][39m iOS SDK Version set to '12.2'
[35m[XCUITest][39m Simulator udid not provided
[35m[XCUITest][39m Using desired caps to create a new simulator
[debug] [35m[simctl][39m Creating simulator with name 'appiumTest-4F76F52A-4C52-48F0-B818-60C891F72E95-iPhone XR', device type id 'iPhone XR' and runtime id 'com.apple.CoreSimulator.SimRuntime.iOS-12-2'
[35m[iOSSim][39m Constructing iOS simulator for Xcode version 10.2.1 with udid '82827AFA-6BE5-4CCF-9506-CB866477427B'
[35m[XCUITest][39m Created simulator with udid '82827AFA-6BE5-4CCF-9506-CB866477427B'.
[35m[XCUITest][39m Determining device to run tests on: udid: '82827AFA-6BE5-4CCF-9506-CB866477427B', real device: false
[debug] [35m[BaseDriver][39m Event 'xcodeDetailsRetrieved' logged at 1562754343205 (15:55:43 GMT+0530 (India Standard Time))
[35m[BaseDriver][39m Using local app '/Users/faizahmed/Downloads/wdio-mobile/wdioApp/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'
[debug] [35m[BaseDriver][39m Unzipping '/Users/faizahmed/Downloads/wdio-mobile/wdioApp/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'
[debug] [35m[BaseDriver][39m Extracted 84 item(s) from '/Users/faizahmed/Downloads/wdio-mobile/wdioApp/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'
[debug] [35m[BaseDriver][39m Matched 84 item(s) in the extracted archive. Assuming 'iOS-Simulator-NativeDemoApp-0.2.1.app' is the correct bundle
[35m[BaseDriver][39m Unzipped local app to '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app'
[debug] [35m[BaseDriver][39m Event 'appConfigured' logged at 1562754343822 (15:55:43 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Checking whether app '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app' is actually present on file system
[debug] [35m[XCUITest][39m App is present
[debug] [35m[iOS][39m Getting bundle ID from app '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app': 'org.reactjs.native.example.wdioDemoApp'
[debug] [35m[BaseDriver][39m Event 'resetStarted' logged at 1562754343826 (15:55:43 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Reset: noReset is on. Leaving simulator as is
[debug] [35m[BaseDriver][39m Event 'resetComplete' logged at 1562754343827 (15:55:43 GMT+0530 (India Standard Time))
[35m[XCUITest][39m Continuing without capturing device logs: iOS Simulator with udid 82827AFA-6BE5-4CCF-9506-CB866477427B is not running
[35m[XCUITest][39m Setting up simulator
[debug] [35m[iOS][39m No reason to set locale
[debug] [35m[iOS][39m No iOS / app preferences to set
[debug] [35m[iOS][39m Setting did not need to be updated
[debug] [35m[iOSSim][39m Setting preferences of 82827AFA-6BE5-4CCF-9506-CB866477427B Simulator to {"SimulatorWindowOrientation":"Portrait","SimulatorWindowRotationAngle":0,"ConnectHardwareKeyboard":false}
[debug] [35m[iOSSim][39m Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false}
[debug] [35m[iOSSim][39m Updated 82827AFA-6BE5-4CCF-9506-CB866477427B Simulator preferences at '/Users/faizahmed/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"82827AFA-6BE5-4CCF-9506-CB866477427B":{"SimulatorWindowOrientation":"Portrait","SimulatorWindowRotationAngle":0,"ConnectHardwareKeyboard":false}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false}
[35m[iOSSim][39m Booting Simulator with UDID 82827AFA-6BE5-4CCF-9506-CB866477427B...
[35m[iOSSim][39m Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 82827AFA-6BE5-4CCF-9506-CB866477427B -ConnectHardwareKeyboard 0
[35m[iOSSim][39m Simulator with UDID 82827AFA-6BE5-4CCF-9506-CB866477427B booted in 20 seconds
[debug] [35m[IDB][39m Connecting idb service to '82827AFA-6BE5-4CCF-9506-CB866477427B'
[35m[XCUITest][39m idb will not be used for Simulator interaction. Original error: 'idb' has not been found in PATH. Is it installed? Read https://www.fbidb.io for more details
[debug] [35m[BaseDriver][39m Event 'simStarted' logged at 1562754364973 (15:56:04 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Starting log capture for iOS Simulator with udid '82827AFA-6BE5-4CCF-9506-CB866477427B', using 'xcrun simctl spawn 82827AFA-6BE5-4CCF-9506-CB866477427B log stream --style compact'
[debug]
[debug] [35m[XCUITest][39m Verifying application platform
[debug] [35m[XCUITest][39m CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[debug] [35m[XCUITest][39m Cleaning installd cache to save the disk space
[debug] [35m[XCUITest][39m Installing '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app' on Simulator with UUID '82827AFA-6BE5-4CCF-9506-CB866477427B'...
[debug] [35m[XCUITest][39m The app has been installed successfully.
[debug] [35m[BaseDriver][39m Event 'appInstalled' logged at 1562754373051 (15:56:13 GMT+0530 (India Standard Time))
[35m[XCUITest][39m Using WDA path: '/Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent'
[35m[XCUITest][39m Using WDA agent: '/Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[debug] [35m[XCUITest][39m No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [35m[XCUITest][39m Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[debug] [35m[XCUITest][39m Capability 'useNewWDA' set to true, so uninstalling WDA before proceeding
[35m[XCUITest][39m Shutting down sub-processes
[debug] [35m[XCUITest][39m Removing WDA application from device
[debug] [35m[BaseDriver][39m Event 'wdaUninstalled' logged at 1562754375211 (15:56:15 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [35m[XCUITest][39m These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [35m[BaseDriver][39m Event 'wdaStartAttempted' logged at 1562754375212 (15:56:15 GMT+0530 (India Standard Time))
[35m[XCUITest][39m Launching WebDriverAgent on the device
[35m[WebDriverAgent][39m Fetching dependencies
[35m[WebDriverAgent][39m Dependencies up-to-date
[debug] [35m[XCUITest][39m Killing running processes 'xcodebuild.*82827AFA-6BE5-4CCF-9506-CB866477427B, 82827AFA-6BE5-4CCF-9506-CB866477427B.*XCTRunner' for the device 82827AFA-6BE5-4CCF-9506-CB866477427B...
[debug] [35m[XCUITest][39m 'pgrep -ifn xcodebuild.*82827AFA-6BE5-4CCF-9506-CB866477427B' didn't detect any matching processes. Return code: 1
[debug] [35m[XCUITest][39m 'pgrep -ifn 82827AFA-6BE5-4CCF-9506-CB866477427B.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [35m[XCUITest][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=82827AFA-6BE5-4CCF-9506-CB866477427B IPHONEOS_DEPLOYMENT_TARGET=12.2 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent'

Appium Inspector not connecting to an app

I'm trying to open up an appium inspector session on my local machine but i'm getting this error:
Appium] Welcome to Appium v1.7.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 8 ms - 40
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 13 ms - 40
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 13 ms - 40
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/haroonnaderi/Desktop/WebView.ipa","deviceName":"iPhone Simulator","noReset":true,"platformName":"iOS","platformVersion":"11.2","showXcodeLog":true,"useNewWDA":true,"newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/haroonnaderi/Desktop/WebView.ipa","deviceName":"iPhone Simulator","noReset":true,"platformName":"iOS","platformVersion":"11.2","showXcodeLog":true,"useNewWDA":true,"newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1514939642784 (16:34:02 GMT-0800 (PST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.51.1) session
[Appium] Capabilities:
[Appium] app: '/Users/haroonnaderi/Desktop/WebView.ipa'
[Appium] deviceName: 'iPhone Simulator'
[Appium] noReset: true
[Appium] platformName: 'iOS'
[Appium] platformVersion: '11.2'
[Appium] showXcodeLog: true
[Appium] useNewWDA: true
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Session created with session id: 112da0db-de59-4ec6-9274-0d0141943b92
[XCUITest] Xcode version set to '9.2' (tools v9.2.0.0.1.1510905681)
[XCUITest] iOS SDK Version set to '11.2'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1514939642987 (16:34:02 GMT-0800 (PST))
[XCUITest] Changing deviceName from 'iPhone Simulator' to 'iPhone 6'
[iOSSim] Constructing iOS simulator for Xcode version 9.2 with udid '4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218'
[XCUITest] Determining device to run tests on: udid: '4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218', real device: false
[BaseDriver] Using local app '/Users/haroonnaderi/Desktop/WebView.ipa'
[BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/appium-app.zip
[BaseDriver] Testing zip archive: /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/Payload/WebView Test.app'
[BaseDriver] Event 'appConfigured' logged at 1514939643653 (16:34:03 GMT-0800 (PST))
[XCUITest] Checking whether app '/var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/Payload/WebView Test.app' is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app '/var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/Payload/WebView Test.app': 'com.hnbs.WebView-Test'
[BaseDriver] Event 'resetStarted' logged at 1514939643676 (16:34:03 GMT-0800 (PST))
[XCUITest] Reset: noReset is on. Leaving simulator as is
[BaseDriver] Event 'resetComplete' logged at 1514939643677 (16:34:03 GMT-0800 (PST))
[iOSLog] Starting iOS 11.2 simulator log capture
[iOSLog] System log path: /Users/haroonnaderi/Library/Logs/CoreSimulator/4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218/system.log
[BaseDriver] Event 'logCaptureStarted' logged at 1514939643817 (16:34:03 GMT-0800 (PST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":true}
[iOSSim] Updated shared Simulator preferences at '/Users/haroonnaderi/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":true}
[iOSSim] The count of running Simulator UI client instances is 0
[iOSSim] Booting Simulator with UDID 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218...
[iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218 -ConnectHardwareKeyboard 1
[iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Simulator with UDID 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218 booted in 24 seconds
[BaseDriver] Event 'simStarted' logged at 1514939668953 (16:34:28 GMT-0800 (PST))
[XCUITest] App 'com.hnbs.WebView-Test' is already installed. No need to reinstall.
[BaseDriver] Event 'appInstalled' logged at 1514939669788 (16:34:29 GMT-0800 (PST))
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Capability 'useNewWDA' set to true, so uninstalling WDA before proceeding
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaUninstalled' logged at 1514939672408 (16:34:32 GMT-0800 (PST))
[BaseDriver] Event 'wdaStartAttempted' logged at 1514939672412 (16:34:32 GMT-0800 (PST))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.*4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218, iproxy 8100, 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218.*XCTRunner' for the device 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218...
[XCUITest] 'pgrep -nif xcodebuild.*4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218.*XCTRunner' didn't detect any matching processes. Return code: 1
[XCUITest] Using Xcode 9.2, so fixing WDA codebase
[XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218 IPHONEOS_DEPLOYMENT_TARGET=11.2' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will be logged. To see xcode logging, use 'showXcodeLog' desired capability
[Xcode] Build settings from command line:
[Xcode]
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] IPHONEOS_DEPLOYMENT_TARGET = 11.2
[Xcode]
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] === BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
[Xcode]
[Xcode]
[Xcode]
[Xcode]
[Xcode] Check dependencies
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode]
[Xcode]
[Xcode] === BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
[Xcode]
[Xcode]
[Xcode] Check dependencies
[Xcode]
[Xcode]
[Xcode]
[Xcode] ** TEST BUILD SUCCEEDED **
[Xcode]
[Xcode]
[XCUITest] Log file for xcodebuild test: /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-C4E50138-7963-4E50-9E87-5E0235A18F86/WebDriverAgentRunner-6A750461-303B-48FA-9A69-691803753120/Session-WebDriverAgentRunner-2018-01-02_163441-TDxxwq.log
[Xcode] 2018-01-02 16:34:41.626 xcodebuild[15977:644204] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[Xcode] /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-C4E50138-7963-4E50-9E87-5E0235A18F86/WebDriverAgentRunner-6A750461-303B-48FA-9A69-691803753120/Session-WebDriverAgentRunner-2018-01-02_163441-TDxxwq.log
[Xcode]
[Xcode] 2018-01-02 16:34:41.628 xcodebuild[15977:644045] [MT] IDETestOperationsObserverDebug: (EE11AE25-8D70-4187-B122-33281CA5D5D7) Beginning test session WebDriverAgentRunner-EE11AE25-8D70-4187-B122-33281CA5D5D7 at 2018-01-02 16:34:41.627 with Xcode 9C40b on target {
[Xcode] SimDevice: iPhone 6 (4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218, iOS 11.2, Booted)
[Xcode] } (11.2 (15C107))
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.2\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.2\",\n \"ip\" : \"10.33.110.179\"\n },\n \"build\" : {\n \"time\" : \"Jan 2 2018 14:11:22\"\n }\n },\n \"sessionId\" : \"F8D9C4DB-FD04-490E-921F-7C777B905551\",\n \"status\" : 0\n}"
[XCUITest] WebDriverAgent running on ip '10.33.110.179'
[XCUITest] WebDriverAgent successfully started after 17999ms
[BaseDriver] Event 'wdaSessionAttempted' logged at 1514939690641 (16:34:50 GMT-0800 (PST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.hnbs.WebView-Test","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.hnbs.WebView-Test application","sessionId":"F8D9C4DB-FD04-490E-921F-7C777B905551","status":13}
[XCUITest] Failed to create WDA session. Retrying...
I've been stuck on this for a while and there doesn't seem to be any good documentation on this, I would appreciate any help I can get. I deleted a few repeated lines in the log so that I would be able to post this. The lines that I deleted were just repeats of: [JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.hnbs.WebView-Test application","sessionId":"F8D9C4DB-FD04-490E-921F-7C777B905551","status":13}
[XCUITest] Failed to create WDA session. Retrying...
Are you using Appium Desktop (https://github.com/appium/appium-desktop/releases) or command line appium? I ran into a problem with the WebDriverAgent not getting installed on the simulator with the command line version of appium (/usr/local/bin/appium). I tried via npm install -g appium and npm install -g appium#1.7.1 and both failed to work. If I run appium server from the Appium Desktop, the WebDriverAgent installed fine and launched. I ended up working around this problem by starting appium from the /Applications directory.
In my script I have this:
DIR=`pwd`
LOG=$DIR/reports/appium_server_output.txt
APPIUM_LOG=$DIR/reports/appium_output.txt
APPIUM_APP_MODULES=/Applications/Appium.app/Contents/Resources/app/node_modules
export NODE_PATH=$APPIUM_APP_MODULES:$NODE_PATH
$APPIUM_APP_MODULES/appium/build/lib/main.js --address 127.0.0.1 --port 4723 --default-capabilities '{"platformName": "iOS"}' --session-override --log $LOG > $APPIUM_LOG 2>&1 &
Before I was just launching 'appium'.
try not to use bundleID if you are running test on simulator. This should work without bundleID

Resources