Skip to content

Instantly share code, notes, and snippets.

@tai2
Created August 11, 2022 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tai2/ef54b3ddeb271628fcff8323a4b89a8f to your computer and use it in GitHub Desktop.
Save tai2/ef54b3ddeb271628fcff8323a4b89a8f to your computer and use it in GitHub Desktop.
Get Logs for appium-xcuitest-driver returns an empty array
yarn run v1.22.18
$ /Users/tai2/Sync/Code/myapp/node_modules/.bin/appium
[Appium] Welcome to Appium v1.22.3
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"ios","platformVersion":"14.4","deviceName":"iPhone 12 Pro","app":"http://localhost:8081/app.zip","newCommandTimeout":1200,"language":"en","orientation":"PORTRAIT","noReset":true,"processArguments":{},"clearSystemFiles":false,"skipLogCapture":false},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"ios","platformVersion":"14.4","deviceName":"iPhone 12 Pro","app":"http://localhost:8081/app.zip","newCommandTimeout":1200,"language":"en","orientation":"PORTRAIT","noReset":true,"processArguments":{},"clearSystemFiles":false,"skipLogCapture":false}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"ios","platformVersion":"14.4","deviceName":"iPhone 12 Pro","app":"http://localhost:8081/app.zip","newCommandTimeout":1200,"language":"en","orientation":"PORTRAIT","noReset":true,"processArguments":{},"clearSystemFiles":false,"skipLogCapture":false},null,{"alwaysMatch":{"platformName":"ios","platformVersion":"14.4","deviceName":"iPhone 12 Pro","app":"http://localhost:8081/app.zip","newCommandTimeout":1200,"language":"en","orientation":"PORTRAIT","noReset":true,"processArguments":{},"clearSystemFiles":false,"skipLogCapture":false},"firstMatch":[{}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1660096810274 (11:00:10 GMT+0900 (Japan Standard Time))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] platformVersion
[BaseDriver] deviceName
[BaseDriver] app
[BaseDriver] newCommandTimeout
[BaseDriver] language
[BaseDriver] orientation
[BaseDriver] noReset
[BaseDriver] processArguments
[BaseDriver] clearSystemFiles
[BaseDriver] skipLogCapture
[Appium] DeprecationWarning: 'automationName' capability was not provided. Future versions of Appium will require 'automationName' capability to be set for iOS sessions.
[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] Appium v1.22.3 creating new XCUITestDriver (v3.62.0) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "platformName": "ios",
[debug] [BaseDriver] "appium:platformVersion": "14.4",
[debug] [BaseDriver] "appium:deviceName": "iPhone 12 Pro",
[debug] [BaseDriver] "appium:app": "http://localhost:8081/app.zip",
[debug] [BaseDriver] "appium:newCommandTimeout": 1200,
[debug] [BaseDriver] "appium:language": "en",
[debug] [BaseDriver] "appium:orientation": "PORTRAIT",
[debug] [BaseDriver] "appium:noReset": true,
[debug] [BaseDriver] "appium:processArguments": {},
[debug] [BaseDriver] "appium:clearSystemFiles": false,
[debug] [BaseDriver] "appium:skipLogCapture": false
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 9ccb5b86-2f25-4705-90d1-63486f19581c
[debug] [XCUITest] Current user: 'tai2'
[XCUITest] iOS SDK Version set to '15.5'
[iOSSim] Constructing iOS simulator for Xcode version 13.4.1 with udid 'D60C018E-523A-4DE9-80D0-42B8F73ABFB7'
[XCUITest] Determining device to run tests on: udid: 'D60C018E-523A-4DE9-80D0-42B8F73ABFB7', real device: false
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1660096810585 (11:00:10 GMT+0900 (Japan Standard Time))
[BaseDriver] Using downloadable app 'http://localhost:8081/app.zip'
[debug] [BaseDriver] Last-Modified: Wed, 10 Aug 2022 00:08:19 GMT
[debug] [BaseDriver] Cache-Control: undefined
[debug] [BaseDriver] A fresh copy of the application is going to be downloaded from http://localhost:8081/app.zip
[debug] [BaseDriver] Content-Type: application/zip
dbug Support http://localhost:8081/app.zip (74.58 MB) has been downloaded to '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-im17jx.z5mt8/app.zip' in 0.079s
[debug] [BaseDriver] Unzipping '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-im17jx.z5mt8/app.zip'
dbug Support Found unzip at '/usr/bin/unzip'
[debug] [BaseDriver] Extracted 1 bundle item from '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-im17jx.z5mt8/app.zip' in 1407ms: Example.app
[BaseDriver] Assuming 'Example.app' is the correct bundle
[BaseDriver] Unzipped local app to '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-10417we.f7uu/Example.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1660096812177 (11:00:12 GMT+0900 (Japan Standard Time))
[debug] [XCUITest] Checking whether app '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-10417we.f7uu/Example.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [XCUITest] Getting bundle ID from app '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-10417we.f7uu/Example.app': 'com.example.Example'
[debug] [BaseDriver] Event 'resetStarted' logged at 1660096812179 (11:00:12 GMT+0900 (Japan Standard Time))
[debug] [XCUITest] Reset: noReset is on. Leaving simulator as is
[debug] [BaseDriver] Event 'resetComplete' logged at 1660096812179 (11:00:12 GMT+0900 (Japan Standard Time))
[WebDriverAgent] Using WDA path: '/Users/tai2/Sync/Code/myapp/node_modules/appium-webdriveragent'
[WebDriverAgent] Using WDA agent: '/Users/tai2/Sync/Code/myapp/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[debug] [IOSSimulatorLog] Starting log capture for iOS Simulator with udid 'D60C018E-523A-4DE9-80D0-42B8F73ABFB7' using simctl
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1660096812399 (11:00:12 GMT+0900 (Japan Standard Time))
[XCUITest] Setting up simulator
[debug] [iOSSim] Checking whether simulator has been run before: yes
[debug] [XCUITest] Setting locale information
[debug] [iOSSim] New language: en
[debug] [iOSSim] No locale updates necessary.
[debug] [XCUITest] No iOS / app preferences to set
[debug] [XCUITest] Setting did not need to be updated
[debug] [iOSSim] Setting preferences of D60C018E-523A-4DE9-80D0-42B8F73ABFB7 Simulator to {"SimulatorWindowOrientation":"Portrait","SimulatorWindowRotationAngle":0,"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false}
[debug] [iOSSim] Updated D60C018E-523A-4DE9-80D0-42B8F73ABFB7 Simulator preferences at '/Users/tai2/Library/Preferences/com.apple.iphonesimulator.plist' with {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false,"DevicePreferences":{"D60C018E-523A-4DE9-80D0-42B8F73ABFB7":{"ConnectHardwareKeyboard":false,"SimulatorExternalDisplay":2114,"SimulatorWindowRotationAngle":0,"SimulatorWindowOrientation":"Portrait","SimulatorWindowGeometry":{"FE1AE307-BF61-4A8E-9BAF-FD82332B0C65":{"WindowCenter":"{1113.5, 468.5}","WindowScale":0.9707207207207207},"50F49432-B5FA-495F-AFF1-8891AF0C1B4D":{"WindowCenter":"{1087, 565}","WindowScale":1}},"ChromeTint":""}}}
[debug] [iOSSim] Got Simulator UI client PID: 21938
[iOSSim] Both Simulator with UDID 'D60C018E-523A-4DE9-80D0-42B8F73ABFB7' and the UI client are currently running
[debug] [BaseDriver] Event 'simStarted' logged at 1660096812854 (11:00:12 GMT+0900 (Japan Standard Time))
[debug] [XCUITest] Verifying application platform
[debug] [XCUITest] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[debug] [simctl] Error running 'get_app_container': An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
The operation couldn’t be completed. No such file or directory
No such file or directory
[debug] [XCUITest] Installing '/var/folders/2t/ndb5vh014k1bw8jljyqgkgs80000gn/T/2022710-50861-10417we.f7uu/Example.app' on Simulator with UUID 'D60C018E-523A-4DE9-80D0-42B8F73ABFB7'...
[debug] [WebDriverAgent] Parsed BUILD_DIR configuration value: '/Users/tai2/Library/Developer/Xcode/DerivedData/WebDriverAgent-hawhaoeigkarzcesvslmivxjsadm/Build/Products'
[debug] [WebDriverAgent] Got derived data root: '/Users/tai2/Library/Developer/Xcode/DerivedData/WebDriverAgent-hawhaoeigkarzcesvslmivxjsadm'
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1660096815151 (11:00:15 GMT+0900 (Japan Standard Time))
[debug] [WebDriverAgent] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[DevCon Factory] Requesting connection for device D60C018E-523A-4DE9-80D0-42B8F73ABFB7 on local port 8100
[debug] [DevCon Factory] Cached connections count: 0
[DevCon Factory] Successfully requested the connection for D60C018E-523A-4DE9-80D0-42B8F73ABFB7:8100
[debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[debug] [WebDriverAgent] WDA is not listening at 'http://127.0.0.1:8100/'
[debug] [WebDriverAgent] WDA is currently not running. There is nothing to cache
[debug] [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1660096815217 (11:00:15 GMT+0900 (Japan Standard Time))
[WebDriverAgent] Launching WebDriverAgent on the device
[WebDriverAgent] WebDriverAgent does not need a cleanup. The sources are up to date (1656391915144 >= 1656391915144)
[debug] [WebDriverAgent] Killing running processes 'xcodebuild.*D60C018E-523A-4DE9-80D0-42B8F73ABFB7, D60C018E-523A-4DE9-80D0-42B8F73ABFB7.*XCTRunner, xctest.*D60C018E-523A-4DE9-80D0-42B8F73ABFB7' for the device D60C018E-523A-4DE9-80D0-42B8F73ABFB7...
[debug] [WebDriverAgent] 'pgrep -if xcodebuild.*D60C018E-523A-4DE9-80D0-42B8F73ABFB7' didn't detect any matching processes. Return code: 1
[debug] [WebDriverAgent] 'pgrep -if D60C018E-523A-4DE9-80D0-42B8F73ABFB7.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [WebDriverAgent] 'pgrep -if xctest.*D60C018E-523A-4DE9-80D0-42B8F73ABFB7' didn't detect any matching processes. Return code: 1
[debug] [WebDriverAgent] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/tai2/Sync/Code/myapp/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/tai2/Library/Developer/Xcode/DerivedData/WebDriverAgent-hawhaoeigkarzcesvslmivxjsadm -destination id=D60C018E-523A-4DE9-80D0-42B8F73ABFB7 IPHONEOS_DEPLOYMENT_TARGET=14.4 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/tai2/Sync/Code/myapp/node_modules/appium-webdriveragent'
[debug] [WebDriverAgent] Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability
[debug] [WebDriverAgent] Waiting up to 60000ms for WebDriverAgent to start
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"iOS","sdkVersion":"15.4","version":"14.4"},"ios":{"simulatorVersion":"14.4","ip":"192.168.0.231"},"ready":true,"build":{"upgradedAt":"1656391915144","time":"Aug 9 2022 11:59:55","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":null}
[debug] [WebDriverAgent] WebDriverAgent information:
[debug] [WebDriverAgent] {
[debug] [WebDriverAgent] "message": "WebDriverAgent is ready to accept commands",
[debug] [WebDriverAgent] "state": "success",
[debug] [WebDriverAgent] "os": {
[debug] [WebDriverAgent] "testmanagerdVersion": 28,
[debug] [WebDriverAgent] "name": "iOS",
[debug] [WebDriverAgent] "sdkVersion": "15.4",
[debug] [WebDriverAgent] "version": "14.4"
[debug] [WebDriverAgent] },
[debug] [WebDriverAgent] "ios": {
[debug] [WebDriverAgent] "simulatorVersion": "14.4",
[debug] [WebDriverAgent] "ip": "192.168.0.231"
[debug] [WebDriverAgent] },
[debug] [WebDriverAgent] "ready": true,
[debug] [WebDriverAgent] "build": {
[debug] [WebDriverAgent] "upgradedAt": "1656391915144",
[debug] [WebDriverAgent] "time": "Aug 9 2022 11:59:55",
[debug] [WebDriverAgent] "productBundleIdentifier": "com.facebook.WebDriverAgentRunner"
[debug] [WebDriverAgent] }
[debug] [WebDriverAgent] }
[debug] [WebDriverAgent] WebDriverAgent successfully started after 3235ms
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1660096818485 (11:00:18 GMT+0900 (Japan Standard Time))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"com.example.Example","arguments":["-AppleLanguages","(en)","-NSLanguages","(en)"],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":false,"forceAppLaunch":false,"useNativeCachingStrategy":true,"forceSimulatorSoftwareKeyboardPresence":true}],"alwaysMatch":{}}}
[debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"B275439D-1DBE-4BB7-9ECC-1CC6F50F525C","capabilities":{"device":"iphone","browserName":"Example(BETA)","sdkVersion":"14.4","CFBundleIdentifier":"com.example.Example"}},"sessionId":"B275439D-1DBE-4BB7-9ECC-1CC6F50F525C"}
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1660096822010 (11:00:22 GMT+0900 (Japan Standard Time))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1660096822010 (11:00:22 GMT+0900 (Japan Standard Time))
[debug] [XCUITest] Setting initial orientation to 'PORTRAIT'
[debug] [WD Proxy] Matched '/orientation' to command name 'setOrientation'
[debug] [WD Proxy] Proxying [POST /orientation] to [POST http://127.0.0.1:8100/session/B275439D-1DBE-4BB7-9ECC-1CC6F50F525C/orientation] with body: {"orientation":"PORTRAIT"}
[debug] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"B275439D-1DBE-4BB7-9ECC-1CC6F50F525C"}
[debug] [BaseDriver] Event 'orientationSet' logged at 1660096822027 (11:00:22 GMT+0900 (Japan Standard Time))
[debug] [BaseDriver] The value of 'elementResponseAttributes' setting did not change. Skipping the update for it
[debug] [BaseDriver] The value of 'shouldUseCompactResponses' setting did not change. Skipping the update for it
[Appium] New XCUITestDriver session created successfully, session 9ccb5b86-2f25-4705-90d1-63486f19581c added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1660096822027 (11:00:22 GMT+0900 (Japan Standard Time))
[debug] [W3C (9ccb5b86)] Cached the protocol value 'W3C' for the new session 9ccb5b86-2f25-4705-90d1-63486f19581c
[debug] [W3C (9ccb5b86)] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"platformName":"ios","platformVersion":"14.4","deviceName":"iPhone 12 Pro","app":"http://localhost:8081/app.zip","newCommandTimeout":1200,"language":"en","orientation":"PORTRAIT","noReset":true,"processArguments":{},"clearSystemFiles":false,"skipLogCapture":false,"udid":"D60C018E-523A-4DE9-80D0-42B8F73ABFB7"}}
[HTTP] <-- POST /wd/hub/session 200 11756 ms - 588
[HTTP]
[HTTP] --> POST /wd/hub/session/9ccb5b86-2f25-4705-90d1-63486f19581c/log
[HTTP] {"type":"crashlog"}
[debug] [W3C (9ccb5b86)] Calling AppiumDriver.getLog() with args: ["crashlog","9ccb5b86-2f25-4705-90d1-63486f19581c"]
[debug] [XCUITest] Executing command 'getLog'
[debug] [BaseDriver] Retrieving 'crashlog' logs
[debug] [BaseDriver] Retrieving supported log types
[debug] [W3C (9ccb5b86)] Responding to client with driver.getLog() result: []
[HTTP] <-- POST /wd/hub/session/9ccb5b86-2f25-4705-90d1-63486f19581c/log 200 9 ms - 12
[HTTP]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment