Hi all,
I’m working with Appium for the past few months and everything worked really good.
My next goal is to run Appium from the command line, so i was following this tutorial : Start and Stop Appium Server Programmatically
the service runs and works good.
mAppiumService = AppiumDriverLocalService.buildService(new AppiumServiceBuilder()
.usingDriverExecutable(new File(appiumNodeFile))
.withAppiumJS(new File(appiumJSFile))
.withIPAddress(mAppiumServerAddress).usingPort(mAppiumServerPort));
where appiumNodeFile = /applications/Appium.app/Contents/Resources/node/bin/node
appiumJSFile = /applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js
and mAppiumService is an AppiumDriverLocalService object
I also have this method which runs @beforeSuite
public void startAppiumServer(String os){
if(mAppiumService == null)
launchAppiumServer(os);
if(!mAppiumService.isRunning()){
System.out.println(TAG + " Starting Appium Server....");
mAppiumService.start();
isServerRunning = true;
}
else{
System.out.println(TAG + "Appium Server Is Already Running...");
}
}
I set DesireCapabilities
/**
* set Appium Server settings
*/
private void setDesireCapabilities (){
mCapabilities = new DesiredCapabilities();
mCapabilities.setCapability(CapabilityType.PLATFORM, mPlatform);
mCapabilities.setCapability(MobileCapabilityType.APP, mFullAppPath); //new File("src",mFullAppPath).getAbsolutePAth());
mCapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, mServerTimeOut);
mCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,mDevice);
if(mDeviceUDID != null && !mDeviceUDID.isEmpty())
mCapabilities.setCapability(MobileCapabilityType.UDID,mDeviceUDID);
}
and finally calling
mAppiumDriver = new IOSDriver(mAppiumService.getUrl(), mCapabilities);
I did installed ideviceinstaller using brew, it worked perfectly before,
However when running the test I get the following error(I marked relevant lines)
> path: /Users/nirberman/automation/SimgoApp/SimgoAppUtilities/files/Simgo.ipa > Appium Manager Starting Appium Server.... > e[36minfoe[39m: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a) > e[36minfoe[39m: Appium REST http interface listener started on 127.0.0.1:4723 > e[36minfoe[39m: [debug] Non-default server args: {"address":"127.0.0.1"} > e[36minfoe[39m: Console LogLevel: debug > e[36minfoe[39m: e[37m-->e[39m e[37mGETe[39m e[37m/wd/hub/statuse[39m e[90m{}e[39m > e[36minfoe[39m: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}} > e[36minfoe[39m: e[37m<-- GET /wd/hub/status e[39me[32m200e[39me[90m 7.603 ms - 105e[39m e[90m{"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}}e[39m > In LoginTest [login With Valid Values] > e[36minfoe[39m: e[37m-->e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{"desiredCapabilities":{"app":"/Users/nirberman/automation/SimgoApp/SimgoAppUtilities/files/Simgo.ipa","udid":"d9da6062f6556b899c475159a5439a60ffe9857b","platformName":"iOS","deviceName":"REAL","newCommandTimeout":"120","platform":"iOS"}}e[39m > e[36minfoe[39m: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_65) > e[36minfoe[39m: [debug] **The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform** > e[36minfoe[39m: [debug] Using local .ipa from desired caps: /Users/nirberman/automation/SimgoApp/SimgoAppUtilities/files/Simgo.ipa > e[36minfoe[39m: [debug] Copying local zip to tmp dir > e[36minfoe[39m: [debug] /Users/nirberman/automation/SimgoApp/SimgoAppUtilities/files/Simgo.ipa copied to /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/appium-app.zip > e[36minfoe[39m: [debug] Unzipping /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/appium-app.zip > e[36minfoe[39m: [debug] Testing zip archive: /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/appium-app.zip > e[36minfoe[39m: [debug] Zip archive tested clean > e[36minfoe[39m: [debug] Unzip successful > e[36minfoe[39m: [debug] Using locally extracted app: /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/Payload/Simgo.app > e[36minfoe[39m: [debug] Creating new appium session 0c4fe3ca-d39b-42e2-85f6-86c64015ff4f > e[36minfoe[39m: [debug] **Removing any remaining instruments sockets** > e[36minfoe[39m: [debug] Cleaned up instruments socket /tmp/instruments_sock > e[36minfoe[39m: [debug] Auto-detecting iOS udid... > e[36minfoe[39m: [debug] Not auto-detecting udid, running on sim > e[36minfoe[39m: [debug] **Could not parse plist file (as binary) at /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/Payload/Simgo.app/en.lproj/Localizable.strings** **> e[36minfoe[39m: Will try to parse the plist file as XML** **> e[36minfoe[39m: [debug] Could not parse plist file (as XML) at /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/Payload/Simgo.app/en.lproj/Localizable.strings** **> e[33mwarne[39m: Could not parse app Localizable.strings assuming it doesn't exist** > e[36minfoe[39m: [debug] Getting bundle ID from app > e[36minfoe[39m: [debug] Could not parse plist file (as binary) at /var/folders/bj/mf99ylxd2k3g11msm3s4tw5c0000gn/T/116012-11266-1scu5f7/Payload/Simgo.app/Info.plist > e[36minfoe[39m: Will try to parse the plist file as XML > e[36minfoe[39m: [debug] Parsed app Info.plist (as XML) > e[36minfoe[39m: [debug] Creating instruments > e[36minfoe[39m: [debug] Preparing uiauto bootstrap > e[36minfoe[39m: [debug] Dynamic bootstrap dir: /Users/nirberman/Library/Application Support/appium/bootstrap > e[36minfoe[39m: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"} > e[36minfoe[39m: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify! > ... > e[36minfoe[39m: [debug] Dynamic bootstrap path: /Users/nirberman/Library/Application Support/appium/bootstrap/bootstrap-3279913f037ed65f.js > e[36minfoe[39m: [debug] Reusing dynamic bootstrap: /Users/nirberman/Library/Application Support/appium/bootstrap/bootstrap-3279913f037ed65f.js > e[36minfoe[39m: [debug] **Attempting iOS device log capture via libimobiledevice idevicesyslog** **> e[33mwarne[39m: Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice probably isn't installed** > e[36minfoe[39m: [debug] Attempting iOS device log capture via deviceconsole > e[36minfoe[39m: [debug] Creating iDevice object with udid d9da6062f6556b899c475159a5439a60ffe9857b > e[36minfoe[39m: [debug] Couldn't find ideviceinstaller, trying built-in at /applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller > e[31merrore[39m: **Could not initialize ideviceinstaller; make sure it is installed and works on your system** **> e[36minfoe[39m: [debug] Cleaning up appium session** **> e[31merrore[39m: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system** > e[36minfoe[39m: [debug] Error: Could not initialize ideviceinstaller; **make sure it is installed and works on your system** > at [object Object].IOS.getIDeviceObj (/applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:909:13) > at [object Object].IOS.installToRealDevice (/applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:856:32) > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:607:21 > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:246:17 > at iterate (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:146:13) > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:157:25 > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:248:21 > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:612:34 > at [object Object].<anonymous> (/applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:52:5) > at [object Object].<anonymous> (/applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:27:5) > at f (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25) > at Glob.<anonymous> (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:131:7) > at Glob.emit (events.js:107:17) > at Glob._finish (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:168:8) > at done (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:157:12) > at Glob._processReaddir2 (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:351:12) > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:288:17 > at RES (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/inflight/inflight.js:23:14) > at f (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25) > at Glob._readdirEntries (/applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:480:10) > at /applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:457:12 > at FSReqWrap.oncomplete (fs.js:95:15) > e[36minfoe[39m: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system)","origValue":"Could not initialize ideviceinstaller; make sure it is installed and works on your system"},"sessionId":null} > e[36minfoe[39m: e[37m<-- POST /wd/hub/session e[39me[31m500e[39me[90m 1471.652 ms - 300e[39m e[90me[39m
Utility.PlatformDriver.AppiumManagerMethod: getDriver A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.03 seconds
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67'
System info: , os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_65'
Driver info: io.appium.java_client.ios.IOSDriver
as you can refer Its already installed
Thanks alot