New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS App is unable to launch using appium 1.6.0 (beta) #7348

Closed
sachinistkiran opened this Issue Dec 2, 2016 · 18 comments

Comments

Projects
None yet
@sachinistkiran

sachinistkiran commented Dec 2, 2016

1.Launching WebDriverAgent success
2.Can see driver trying to open the app
3. Launching .app file on simulator failed (It opens the app and then close it immediately)
4. The error from terminal complaints

...users-MacBook-Pro:~ user$ (node:19314) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"Splash_Screen","app":"/Users/user/Desktop/test.app","platformVersion":"10.0","automationName":"XCUITest","bundleid":"com.company.test","MobleCapabilityType.UDID":"51F9C768-C270-4D00-8DB9-E5176CE56FF5","platformName":"iOS","deviceName":"iPhone 5"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"Splash_Scr...
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] appActivity: 'Splash_Screen'
[Appium] app: '/Users/user/Desktop/test.app'
[Appium] platformVersion: '10.0'
[Appium] automationName: 'XCUITest'
[Appium] bundleid: 'com.company.test'
[Appium] MobleCapabilityType.UDID: '51F9C768-C270-4D00-8DB9-E5176CE56FF5'
[Appium] platformName: 'iOS'
[Appium] deviceName: 'iPhone 5'
[debug] [XCUITest] XCUITestDriver version: 2.0.26
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appActivity, bundleid, MobleCapabilityType.UDID.
[BaseDriver] Session created with session id: bd8c8f73-b037-4387-aa2f-e8856ed8e3ea
[debug] [XCUITest] Xcode version set to '8.1'
[debug] [XCUITest] iOS SDK Version set to '10.0'
[iOSSim] Constructing iOS simulator for Xcode version 8.0 with udid '51F9C768-C270-4D00-8DB9-E5176CE56FF5'
[XCUITest] Determining device to run tests on: udid: '51F9C768-C270-4D00-8DB9-E5176CE56FF5', real device: false
[BaseDriver] Using local app '/Users/user/Desktop/test.app'
[debug] [XCUITest] Checking whether app is actually present
[debug] [ios-app-utils] Getting bundle ID from app
[debug] [iOSLog] Starting iOS 10.0 simulator log capture
[debug] [iOSLog] System log path: /Users/user/Library/Logs/CoreSimulator/51F9C768-C270-4D00-8DB9-E5176CE56FF5/system.log
[XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid '51F9C768-C270-4D00-8DB9-E5176CE56FF5' not booted. Booting up now
[debug] [iOSSim] Killing all iOS Simulators
[iOSSim] Starting simulator with command: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 51F9C768-C270-4D00-8DB9-E5176CE56FF5
[iOSSim] Tailing simulator logs until we encounter the string "SMS Plugin initialized"
[iOSSim] We will time out after 60000ms
[debug] [iOSSim] Waiting an extra 10000ms for the simulator to really finish booting
[debug] [iOSSim] Done waiting extra time for simulator
[iOSSim] Simulator booted in 31659ms
[debug] [XCUITest] Installing app '/Users/user/Desktop/test.app' on device
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command 'xcodebuild build test -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=51F9C768-C270-4D00-8DB9-E5176CE56FF5 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/9A4CA5C1-5218-4243-92B4-4B1A5AB8A32C/Session-WebDriverAgentRunner-2016-11-28_152737-DwLkfT.log

user Gmx, [28-Nov-2016, 3:54 PM]:
[debug] [WebDriverAgent] Sim: Nov 28 15:27:40 users-MacBook-Pro CoreSimulatorBridge[19356]: Requesting installation of file:///Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app/ with options: {
[debug] [WebDriverAgent] Sim: CFBundleIdentifier = "com.apple.test.WebDriverAgentRunner-Runner";
[debug] [WebDriverAgent] Sim: PackageType = Developer;
[debug] [WebDriverAgent] Sim: SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
[debug] [WebDriverAgent] Sim: SimulatorUserPath = "/Users/user/Library/Developer/CoreSimulator/Devices/51F9C768-C270-4D00-8DB9-E5176CE56FF5/data";
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Nov 28 15:27:40 users-MacBook-Pro CoreSimulatorBridge[19356]: Getting container class internal daemon!
[debug] [WebDriverAgent] Sim: Nov 28 15:27:44 users-MacBook-Pro CoreSimulatorBridge[19356]: Requesting launch of com.apple.test.WebDriverAgentRunner-Runner with options: {
[debug] [WebDriverAgent] Sim: arguments = (
[debug] [WebDriverAgent] Sim: "-NSTreatUnknownArgumentsAsOpen",
[debug] [WebDriverAgent] Sim: NO,
[debug] [WebDriverAgent] Sim: "-ApplePersistenceIgnoreState",
[debug] [WebDriverAgent] Sim: YES
[debug] [WebDriverAgent] Sim: );
[debug] [WebDriverAgent] Sim: environment = {
[debug] [WebDriverAgent] Sim: "DTX_CONNECTION_SERVICES_PATH" = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/PrivateFrameworks/DTXConnectionServices.framework";
[debug] [WebDriverAgent] Sim: "DYLD_FRAMEWORK_PATH" = "/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks";
[debug] [WebDriverAgent] Sim: "DYLD_LIBRARY_PATH" = "/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks";
[debug] [WebDriverAgent] Sim: NSUnbufferedIO = YES;
[debug] [WebDriverAgent] Sim: "OS_ACTIVITY_DT_MODE" = YES;
[debug] [WebDriverAgent] Sim: "XCODE_DBG_XPC_EXCLUSIONS" = "com.apple.dt.xctestSymbolicator";
[debug] [WebDriverAgent] Sim: XCTestConfigurationFilePath = "/var/folders/92/d5szkdtn6p71n326sw34h7wr0000gn/T/com.apple.dt.XCTest/409B14C5-E533-4CCD-A92B-B5BCBABA9A17/remote-container/tmp/WebDriverAgentRunner-409B14C5-E533-4CCD-A92B-B5BCBABA9A17.xctestconfiguration";
[debug] [WebDriverAgent] Sim: "__XCODE_BUILT_PRODUCTS_DIR_PATHS" = "/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator";
[debug] [WebDriverAgent] Sim: "__XPC_DYLD_FRAMEWORK_PATH" = "/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator";
[debug] [WebDriverAgent] Sim: "__XPC_DYLD_LIBRARY_PATH" = "/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator";
[debug] [WebDriverAgent] Sim: };
[debug] [WebDriverAgent] Sim: stderr = "/dev/ttys001";
[debug] [WebDriverAgent] Sim: stdout = "/dev/ttys001";
[debug] [WebDriverAgent] Sim: "wait_for_debugger" = 0;
[debug] [WebDriverAgent] Sim: }

[debug] [WebDriverAgent] Sim: Nov 28 15:27:44 users-MacBook-Pro CoreSimulatorBridge[19356]: [Common] [FBSSystemService][0xefe5] Sending request to open "com.apple.test.WebDriverAgentRunner-Runner"
[debug] [WebDriverAgent] Sim: Nov 28 15:27:44 users-MacBook-Pro CoreSimulatorBridge[19356]: [Common] [FBSSystemService][0xefe5] Request successful: <FBSProcessHandle: 0x7a686c10; XCTRunner:19690; valid: YES>
[debug] [WebDriverAgent] Sim: Nov 28 15:27:44 users-MacBook-Pro XCTRunner[19690]: assertion failed: 15G31 14A345: libxpc.dylib + 68346 [2D9E5899-C86F-38DE-90C5-35938968B265]: 0x7d
[debug] [WebDriverAgent] Sim: Nov 28 15:27:44 users-MacBook-Pro XCTRunner[19690]: Running tests...
[debug] [WebDriverAgent] Sim: Nov 28 15:27:45 --- last message repeated 5 times ---
[debug] [WebDriverAgent] Sim: Nov 28 15:27:45 users-MacBook-Pro XCTRunner[19690]: Continuing to run tests in the background with task ID 1
[debug] [WebDriverAgent] Sim: Nov 28 15:27:46 --- last message repeated 11 times ---
[debug] [WebDriverAgent] Sim: Nov 28 15:27:46 users-MacBook-Pro XCTRunner[19690]: Built at Nov 28 2016 15:27:38
[XCUITest] Detected that WebDriverAgent is running at url 'http://10.7.22.95:8111'
[debug] [WebDriverAgent] Sim: Nov 28 15:27:46 users-MacBook-Pro XCTRunner[19690]: ServerURLHere->http://10.7.21.95:8100<-ServerURLHere
[XCUITest] WebDriverAgent started at url 'http://10.7.22.95:8111'
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bu...
[debug] [WebDriverAgent] Sim: Nov 28 15:28:46 users-MacBook-Pro XCTRunner[19690]: Enqueue Failure: UI Testing Failure - App accessibility isn't loaded /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1
users-MacBook-Pro:~ user$ [debug] [WebDriverAgent] Sim: Nov 28 15:29:46 users-MacBook-Pro XCTRunner[19690]: Enqueue Failure: UI Testing Failure - '<XCUIApplicationImpl: 0x7b072410 com.company.test>' App state is still not running active, state = XCApplicationStateNotRunning /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1
[JSONWP Proxy] Got response with status 200: {"sessionId":"B17529C0-9DE6...
[Appium] New XCUITestDriver session created successfully, session bd8c8f73-b037-4387-aa2f-e8856ed8e3ea added to master session list
[MJSONWP] Responding to client with driver.createSession() result: {"webStorageEnabled":false,...
[HTTP] <-- POST /wd/hub/session 200 173076 ms - 535
[HTTP] --> POST /wd/hub/session/bd8c8f73-b037-4387-aa2f-e8856ed8e3ea/timeouts {"type":"implicit","ms":30000}

@triager triager added the NeedsTriage label Dec 2, 2016

@JaniJegoroff

This comment has been minimized.

Show comment
Hide comment
@JaniJegoroff

JaniJegoroff Dec 2, 2016

Member

There are newer Appium release available, 1.6.0 is old. Have you enabled setting Enable UI Automation in simulator under Developer menu?

Member

JaniJegoroff commented Dec 2, 2016

There are newer Appium release available, 1.6.0 is old. Have you enabled setting Enable UI Automation in simulator under Developer menu?

@IvanStawski

This comment has been minimized.

Show comment
Hide comment
@IvanStawski

IvanStawski Dec 2, 2016

i'm sure that problem is in app binary, probably it's not adopted for running on iOS 10. I had same problem on simulator, it's gone after migration to swift 3.

IvanStawski commented Dec 2, 2016

i'm sure that problem is in app binary, probably it's not adopted for running on iOS 10. I had same problem on simulator, it's gone after migration to swift 3.

@sachinistkiran

This comment has been minimized.

Show comment
Hide comment
@sachinistkiran

sachinistkiran Dec 2, 2016

@JaniJegoroff yes i have Enabled UI Automation in Developer menu. can u provide me the link for the newer version of Appium.

sachinistkiran commented Dec 2, 2016

@JaniJegoroff yes i have Enabled UI Automation in Developer menu. can u provide me the link for the newer version of Appium.

@JaniJegoroff

This comment has been minimized.

Show comment
Hide comment
Member

JaniJegoroff commented Dec 2, 2016

@sachinistkiran

This comment has been minimized.

Show comment
Hide comment
@sachinistkiran

sachinistkiran Dec 5, 2016

@JaniJegoroff Still I am facing the same issue, Even after installing the latest Appium(1.6.2)

Error : Enqueue Failure: UI Testing Failure - App accessibility isn't loaded /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1

sachinistkiran commented Dec 5, 2016

@JaniJegoroff Still I am facing the same issue, Even after installing the latest Appium(1.6.2)

Error : Enqueue Failure: UI Testing Failure - App accessibility isn't loaded /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1

@jlipps

This comment has been minimized.

Show comment
Hide comment
@jlipps

jlipps Dec 6, 2016

Member

@sachinistkiran can you try deleting and recreating your sims using simctl?

Member

jlipps commented Dec 6, 2016

@sachinistkiran can you try deleting and recreating your sims using simctl?

@sachinistkiran

This comment has been minimized.

Show comment
Hide comment
@sachinistkiran

sachinistkiran Dec 8, 2016

@jlipps I have deleted and recreated all my sims by using $ : xcrun simctl erase all and then created sims and tried to run the script, still i was seeing same error.

sachinistkiran commented Dec 8, 2016

@jlipps I have deleted and recreated all my sims by using $ : xcrun simctl erase all and then created sims and tried to run the script, still i was seeing same error.

@ggerashchenko

This comment has been minimized.

Show comment
Hide comment
@ggerashchenko

ggerashchenko Dec 9, 2016

Hi guys,

I do have the same issue:

Environment:
MAC OS 10.12.1
Appium 1.6.2 and 1.5.3 (GUI)
Xcode 8.1
iOS 10 emulator and iPhone 7+ real device

Steps:

  • Launch Appium 1.6.2 in terminal appium --show-ios-log --device-name "iPhone 7" --automation-name XCUITest -dc '{"realDeviceLogger": "/usr/local/lib/node_modules/deviceconsole/deviceconsole"}' --native-instruments-lib --full-reset

  • Connect from GUI client to Appium server

  • Emulator started

  • App installed

  • WebDriverAgent is installed and launched before app

  • App is started and immediately crashes

Here is the log which I see in terminal:

[Appium] Welcome to Appium v1.6.2
[Appium] Non-default server args:
[Appium]   defaultCapabilities: { realDeviceLogger: '/usr/local/lib/node_modules/deviceconsole/deviceconsole',
  automationName: 'XCUITest',
  deviceName: 'iPhone 7',
  fullReset: true,
  nativeInstrumentsLib: true,
  showIOSLog: true }
[Appium]   automationName: 'XCUITest'
[Appium]   deviceName: 'iPhone 7'
[Appium]   fullReset: true
[Appium]   nativeInstrumentsLib: true
[Appium]   showIOSLog: true
[Appium] Deprecated server args:
[Appium]   --automation-name => --default-capabilities '{"automationName":"XCUITest"}'
[Appium]   --device-name => --default-capabilities '{"deviceName":"iPhone 7"}'
[Appium]   --full-reset => --default-capabilities '{"fullReset":true}'
[Appium]   --native-instruments-lib => --default-capabilities '{"nativeInstrumentsLib":true}'
[Appium]   --show-ios-log => --default-capabilities '{"showIOSLog":true}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium]   realDeviceLogger: '/usr/local/lib/node_modules/deviceconsole/deviceconsole'
[Appium]   automationName: 'XCUITest'
[Appium]   deviceName: 'iPhone 7'
[Appium]   fullReset: true
[Appium]   nativeInstrumentsLib: true
[Appium]   showIOSLog: true
[Appium] Appium REST http interface listener started on 0.0.0.0:4723



[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=1C8069C2-198A-4E68-84F6-4DEF3D5ED1D4 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/grygorii.gerashchenko/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/30C9B356-6CB8-412E-B680-F477A95EE95C/Session-WebDriverAgentRunner-2016-12-09_144346-BZnvJs.log
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[XCUITest] Detected that WebDriverAgent is running at url 'http://10.21.90.5:8100'
[XCUITest] WebDriverAgent started at url 'http://10.21.90.5:8100'
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.vimpelcom.Button","arguments":[],"environment":{},"shouldWaitForQuiescence":true}}
[HTTP] <-- POST /wd/hub/session - - ms - - 
[debug] [JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.vimpelcom.Button application","sessionId":"4AFEB5BB-23E6-474D-B6BC-58B95443F93B","status":13}
[debug] [XCUITest] Unable to start WebDriverAgent session: An unknown server-side error occurred while processing the command. Original error: Failed to launch com.vimpelcom.Button application
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down xcodebuild process (pid 74287)
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGTERM'
[XCUITest] Shutting down Logger process (pid 74292)
[XCUITest] Simulator log exited with code 'null'
[debug] [XCUITest] Removing WDA application from device
[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'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=1C8069C2-198A-4E68-84F6-4DEF3D5ED1D4 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/grygorii.gerashchenko/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/58F85B31-E91B-40D3-88AF-F6BF9257CAF0/Session-WebDriverAgentRunner-2016-12-09_144700-I66CN1.log
[XCUITest] Detected that WebDriverAgent is running at url 'http://10.21.90.5:8100'
[XCUITest] WebDriverAgent started at url 'http://10.21.90.5:8100'
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.vimpelcom.Button","arguments":[],"environment":{},"shouldWaitForQuiescence":true}}```

ggerashchenko commented Dec 9, 2016

Hi guys,

I do have the same issue:

Environment:
MAC OS 10.12.1
Appium 1.6.2 and 1.5.3 (GUI)
Xcode 8.1
iOS 10 emulator and iPhone 7+ real device

Steps:

  • Launch Appium 1.6.2 in terminal appium --show-ios-log --device-name "iPhone 7" --automation-name XCUITest -dc '{"realDeviceLogger": "/usr/local/lib/node_modules/deviceconsole/deviceconsole"}' --native-instruments-lib --full-reset

  • Connect from GUI client to Appium server

  • Emulator started

  • App installed

  • WebDriverAgent is installed and launched before app

  • App is started and immediately crashes

Here is the log which I see in terminal:

[Appium] Welcome to Appium v1.6.2
[Appium] Non-default server args:
[Appium]   defaultCapabilities: { realDeviceLogger: '/usr/local/lib/node_modules/deviceconsole/deviceconsole',
  automationName: 'XCUITest',
  deviceName: 'iPhone 7',
  fullReset: true,
  nativeInstrumentsLib: true,
  showIOSLog: true }
[Appium]   automationName: 'XCUITest'
[Appium]   deviceName: 'iPhone 7'
[Appium]   fullReset: true
[Appium]   nativeInstrumentsLib: true
[Appium]   showIOSLog: true
[Appium] Deprecated server args:
[Appium]   --automation-name => --default-capabilities '{"automationName":"XCUITest"}'
[Appium]   --device-name => --default-capabilities '{"deviceName":"iPhone 7"}'
[Appium]   --full-reset => --default-capabilities '{"fullReset":true}'
[Appium]   --native-instruments-lib => --default-capabilities '{"nativeInstrumentsLib":true}'
[Appium]   --show-ios-log => --default-capabilities '{"showIOSLog":true}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium]   realDeviceLogger: '/usr/local/lib/node_modules/deviceconsole/deviceconsole'
[Appium]   automationName: 'XCUITest'
[Appium]   deviceName: 'iPhone 7'
[Appium]   fullReset: true
[Appium]   nativeInstrumentsLib: true
[Appium]   showIOSLog: true
[Appium] Appium REST http interface listener started on 0.0.0.0:4723



[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=1C8069C2-198A-4E68-84F6-4DEF3D5ED1D4 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/grygorii.gerashchenko/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/30C9B356-6CB8-412E-B680-F477A95EE95C/Session-WebDriverAgentRunner-2016-12-09_144346-BZnvJs.log
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[XCUITest] Detected that WebDriverAgent is running at url 'http://10.21.90.5:8100'
[XCUITest] WebDriverAgent started at url 'http://10.21.90.5:8100'
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.vimpelcom.Button","arguments":[],"environment":{},"shouldWaitForQuiescence":true}}
[HTTP] <-- POST /wd/hub/session - - ms - - 
[debug] [JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.vimpelcom.Button application","sessionId":"4AFEB5BB-23E6-474D-B6BC-58B95443F93B","status":13}
[debug] [XCUITest] Unable to start WebDriverAgent session: An unknown server-side error occurred while processing the command. Original error: Failed to launch com.vimpelcom.Button application
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down xcodebuild process (pid 74287)
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGTERM'
[XCUITest] Shutting down Logger process (pid 74292)
[XCUITest] Simulator log exited with code 'null'
[debug] [XCUITest] Removing WDA application from device
[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'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=1C8069C2-198A-4E68-84F6-4DEF3D5ED1D4 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/grygorii.gerashchenko/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/58F85B31-E91B-40D3-88AF-F6BF9257CAF0/Session-WebDriverAgentRunner-2016-12-09_144700-I66CN1.log
[XCUITest] Detected that WebDriverAgent is running at url 'http://10.21.90.5:8100'
[XCUITest] WebDriverAgent started at url 'http://10.21.90.5:8100'
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.vimpelcom.Button","arguments":[],"environment":{},"shouldWaitForQuiescence":true}}```

@mattapperson

This comment has been minimized.

Show comment
Hide comment
@mattapperson

mattapperson Dec 9, 2016

Also having this issue...

mattapperson commented Dec 9, 2016

Also having this issue...

@jlipps

This comment has been minimized.

Show comment
Hide comment
@jlipps

jlipps Dec 9, 2016

Member

@ggerashchenko that looks like a different problem. there is also no error message in the log you posted. @sachinistkiran unfortunately i can't provide any more guidance. "app accessibility not loaded" doesn't appear to be anything related to appium, though. I'd suggest googling for different ios development errors to see if that provides a path forward.

Member

jlipps commented Dec 9, 2016

@ggerashchenko that looks like a different problem. there is also no error message in the log you posted. @sachinistkiran unfortunately i can't provide any more guidance. "app accessibility not loaded" doesn't appear to be anything related to appium, though. I'd suggest googling for different ios development errors to see if that provides a path forward.

@jlipps jlipps closed this Dec 9, 2016

@justbondik

This comment has been minimized.

Show comment
Hide comment
@justbondik

justbondik Jan 21, 2017

i had same issue on my simulator, and that what i do:

  • go to your project home dir
  • $ xcodebuild -showsdks
  • copy required iOS Simulator SDK
  • build the simulator package:
    if you are using xcodeproj:
    $ xcodebuild -arch i386 -sdk iphonesimulator{iosSimulatorSdkVersionThatYouChoise}
    if you are using workspace:
    $ xcodebuild -arch i386 -sdk iphonesimulator{iosSimulatorSdkVersionThatYouChoise} -workspace [projectName].xcworkspace -scheme [projectName]

.app you can find in ~/Developer/Xcode/DerivedData/[yourAppName]/Build/products/Debug-iphonesimulator/[yourApp].app

when i run test with this .app - application start correctly

im using:
appium 1.6.3
os x el capitan 10.11.6
iphone SE simulator 10.2
xcode 8.2.1

justbondik commented Jan 21, 2017

i had same issue on my simulator, and that what i do:

  • go to your project home dir
  • $ xcodebuild -showsdks
  • copy required iOS Simulator SDK
  • build the simulator package:
    if you are using xcodeproj:
    $ xcodebuild -arch i386 -sdk iphonesimulator{iosSimulatorSdkVersionThatYouChoise}
    if you are using workspace:
    $ xcodebuild -arch i386 -sdk iphonesimulator{iosSimulatorSdkVersionThatYouChoise} -workspace [projectName].xcworkspace -scheme [projectName]

.app you can find in ~/Developer/Xcode/DerivedData/[yourAppName]/Build/products/Debug-iphonesimulator/[yourApp].app

when i run test with this .app - application start correctly

im using:
appium 1.6.3
os x el capitan 10.11.6
iphone SE simulator 10.2
xcode 8.2.1

@jlipps

This comment has been minimized.

Show comment
Hide comment
@jlipps

jlipps Jan 23, 2017

Member

Thanks, @justbondik! Care to make a PR to add this to our troubleshooting docs?

Member

jlipps commented Jan 23, 2017

Thanks, @justbondik! Care to make a PR to add this to our troubleshooting docs?

@Tumasonis

This comment has been minimized.

Show comment
Hide comment
@Tumasonis

Tumasonis commented Jan 25, 2017

Thank you @justbondik 👍

@Brad19

This comment has been minimized.

Show comment
Hide comment
@Brad19

Brad19 Feb 23, 2017

The above-mentioned steps by justbondik is not working for me

But the build is success with the following one command
$ xcodebuild -arch i386 -sdk iphonesimulator10.2 -workspace projectName.xcworkspace -scheme projectName

Unfortunately the App still crashes. All I'm trying to do is to launch the app first via Appium. Once it works then i'll start programmatically to invoke and test the app.

Here are my settings
Xcode : 8.2.1
Appium: 1.6 server
Appium GUI - 1.5.3 (Ara)
OS: Mac Sierra

If you or anyone could help on this will be much appreciated and helpful as my time lines are very close.

Thanks,
Brad

Brad19 commented Feb 23, 2017

The above-mentioned steps by justbondik is not working for me

But the build is success with the following one command
$ xcodebuild -arch i386 -sdk iphonesimulator10.2 -workspace projectName.xcworkspace -scheme projectName

Unfortunately the App still crashes. All I'm trying to do is to launch the app first via Appium. Once it works then i'll start programmatically to invoke and test the app.

Here are my settings
Xcode : 8.2.1
Appium: 1.6 server
Appium GUI - 1.5.3 (Ara)
OS: Mac Sierra

If you or anyone could help on this will be much appreciated and helpful as my time lines are very close.

Thanks,
Brad

@Tumasonis

This comment has been minimized.

Show comment
Hide comment
@Tumasonis

Tumasonis Feb 23, 2017

@Brad19

  1. Did you add a legit developer account to Xcode that can build that app?
  2. Did you sign it? I'd recommend checking the option to auto sign it.
  3. I just did "xcodebuild" command by itself and then got the app from this path:
    /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData/YOUR_APP_NAME/Build/Products/Debug-iphoneos/your_app_name.app
    3.1 Copy the your_app_name.app to a different folder.
    3.2 Right click on the your_app_name.app and click compress - it will give you your_app_name.zip
    3.3 Rename your_app_name.zip to your_app_name.ipa - try launching this app through appium.

Tumasonis commented Feb 23, 2017

@Brad19

  1. Did you add a legit developer account to Xcode that can build that app?
  2. Did you sign it? I'd recommend checking the option to auto sign it.
  3. I just did "xcodebuild" command by itself and then got the app from this path:
    /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData/YOUR_APP_NAME/Build/Products/Debug-iphoneos/your_app_name.app
    3.1 Copy the your_app_name.app to a different folder.
    3.2 Right click on the your_app_name.app and click compress - it will give you your_app_name.zip
    3.3 Rename your_app_name.zip to your_app_name.ipa - try launching this app through appium.
@Brad19

This comment has been minimized.

Show comment
Hide comment
@Brad19

Brad19 Feb 28, 2017

Hi,
Sorry for the late reply. I was away from work for couple of days. However, I found where I missed. I missed in 2 steps

  1. I did "brew install --HEAD libimobiledevice" instead of "brew install libimobiledevice --HEAD"
  2. I picked up the build version not from /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData/YOUR_APP_NAME/Build/Products/Debug-iphoneos/your_app_name.app, but from IOS folder. I'm not sure about this one. (i.e,.) should this always from Developer folder?

But it worked now. Thanks a lot for your support. Now i'm going to try this with TestNg and see how it works.

BradT

Brad19 commented Feb 28, 2017

Hi,
Sorry for the late reply. I was away from work for couple of days. However, I found where I missed. I missed in 2 steps

  1. I did "brew install --HEAD libimobiledevice" instead of "brew install libimobiledevice --HEAD"
  2. I picked up the build version not from /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData/YOUR_APP_NAME/Build/Products/Debug-iphoneos/your_app_name.app, but from IOS folder. I'm not sure about this one. (i.e,.) should this always from Developer folder?

But it worked now. Thanks a lot for your support. Now i'm going to try this with TestNg and see how it works.

BradT

@imurchie imurchie removed the NeedsTriage label Apr 13, 2017

@skhanam

This comment has been minimized.

Show comment
Hide comment
@skhanam

skhanam Jun 29, 2017

Hi there,

Followed the steps mentioned here & i still see that the WDA agent is launched & app is launched & crashes immediately there aren't any logs that are helpful

[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : {\n "state" : "success",\n "os" : {\n "name" : "iOS",\n "version" : "10.3"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "192.168.227.134"\n },\n "build" : {\n "time" : "May 27 2017 13:09:31"\n }\n },\n "sessionId" : "76451231-EE41-442B-8EAF-460405C33079",\n "status" : 0\n}"
[debug] [XCUITest] WebDriverAgent running on ip '192.168.227.134'
[debug] [XCUITest] WebDriverAgent successfully started after 19880ms
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1498731357016 (11:15:57 GMT+0100 (BST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.quidco.quidco","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}

skhanam commented Jun 29, 2017

Hi there,

Followed the steps mentioned here & i still see that the WDA agent is launched & app is launched & crashes immediately there aren't any logs that are helpful

[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : {\n "state" : "success",\n "os" : {\n "name" : "iOS",\n "version" : "10.3"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "192.168.227.134"\n },\n "build" : {\n "time" : "May 27 2017 13:09:31"\n }\n },\n "sessionId" : "76451231-EE41-442B-8EAF-460405C33079",\n "status" : 0\n}"
[debug] [XCUITest] WebDriverAgent running on ip '192.168.227.134'
[debug] [XCUITest] WebDriverAgent successfully started after 19880ms
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1498731357016 (11:15:57 GMT+0100 (BST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.quidco.quidco","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}

@matteocollina

This comment has been minimized.

Show comment
Hide comment
@matteocollina

matteocollina Apr 26, 2018

This is my command to create .app for simulator

(Replace "MyApp" with your app name)

XCODE_WORKSPACE=/Users/MacBook/iOS/MyApp.xcworkspace
xcrun xcodebuild \
  -scheme MyApp \
  -workspace $XCODE_WORKSPACE \
  -configuration Debug \
  -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2' \
  -derivedDataPath \
  build

matteocollina commented Apr 26, 2018

This is my command to create .app for simulator

(Replace "MyApp" with your app name)

XCODE_WORKSPACE=/Users/MacBook/iOS/MyApp.xcworkspace
xcrun xcodebuild \
  -scheme MyApp \
  -workspace $XCODE_WORKSPACE \
  -configuration Debug \
  -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2' \
  -derivedDataPath \
  build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment