ios - Could not pre-launch appium and app doesn't get installed in iphone real device using appium -
- i using appium version 1.3.7.
- i have connected physical device via usb.
- i have launched appium server,after while appium crashed.
- i have pasted full log below.
- i have attached screen shot below.
launching appium command: '/applications/appium.app/contents/resources/node/bin/node' lib/server/main.js --command-timeout "7200" --pre-launch --platform-version "8.1" --platform-name "ios" --app "/users/al/work/sample.app" --udid "f5de3fd5ccded92e40e86c652ce2a6f9414fe1a0" --device-name "iphone 4s" info: [debug] starting appium in pre-launch mode info: pre-launching app info: [debug] using local app command line: /users//al/work/sample.app info: [debug] creating new appium session 1cdc5dc0-36d2-40b9-922b-33601f28846b info: [debug] removing remaining instruments sockets info: [debug] cleaned instruments socket /tmp/instruments_sock info: [debug] setting xcode folder info: [debug] setting xcode version info: [debug] setting ios sdk version info: [debug] getting sdk version xcrun timeout info: [debug] ios sdk version set 8.1 info: [debug] not checking whether simulator available since we're on real device info: [debug] detecting automation tracetemplate info: [debug] not auto-detecting udid, running on sim info: [debug] parsed app info.plist (as binary) info: [debug] parsed app localizable.strings info: [debug] getting bundle id app info: [debug] parsed app info.plist (as binary) info: [debug] creating instruments info: on xcode 6 platforms, instruments-without-delay not work. if experience this, need re-run appium --native-instruments-lib flag info: [debug] preparing uiauto bootstrap info: [debug] dynamic bootstrap dir: /users/alk/library/application support/appium/bootstrap info: [debug] dynamic env: {"nodepath":"/applications/appium.app/contents/resources/node/bin/node","commandproxyclientpath":"/applications/appium.app/contents/resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentssock":"/tmp/instruments_sock","interkeydelay":null,"justloopinfinitely":false,"autoacceptalerts":false,"autodismissalerts":false,"sendkeystrategy":"grouped"} info: [debug] dynamic bootstrap code: // file automatically generated. not manually modify! ... info: [debug] dynamic bootstrap path: /users/alk/library/application support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js info: [debug] reusing dynamic bootstrap: /users/alk/library/application support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js info: [debug] getting device string opts: {"forceiphone":false,"forceipad":false,"xcodeversion":"6.1.1","iossdkversion":"8.1","devicename":"iphone 4s","platformversion":"8.1"} info: [debug] fixdevice on info: [debug] final device string is: 'iphone 4s (8.1 simulator)' info: [debug] not setting device type since we're on real device info: [debug] checking whether need set app preferences info: [debug] not setting ios , app preferences since we're on real device info: [debug] running ios sim reset flow info: [debug] killing simulator process info: [debug] killall ios simulator info: [debug] killing other simulator daemons info: [debug] on real device; cannot clean device state info: [debug] not setting locale because we're using real device info: [debug] no ios / app preferences set info: [debug] starting ios device log capture via deviceconsole info: [debug] not pre-launching simulator info: [debug] creating idevice object udid f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 info: [debug] checking app install status using: /applications/appium.app/contents/resources/node_modules/appium/build/fruitstrap/fruitstrap isinstalled --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle com.vr.iphone.sample info: [debug] app not installed. try install app. info: [debug] installing app using cmd: /applications/appium.app/contents/resources/node_modules/appium/build/fruitstrap/fruitstrap install --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle "/users/al/work/sample.app info: [debug] cleaning appium session error: not pre-launch appium: error: unable install [/users/al/work/sample.app] device id [f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2]. error [error: command failed: /bin/sh -c /applications/appium.app/contents/resources/node_modules/appium/build/fruitstrap/fruitstrap install --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle "/users/al/work/sample.app" assertion failed: (amdevicestartservice(device, cfstr("com.apple.afc"), &afcfd, null) == 0), function handle_device, file fruitstrap.c, line 523. ]
you can use appium install app on device, uninstall app manually , in setup code use absolute path of .apk file this:
desiredcapabilities capabilities = new desiredcapabilities();
capabilities.setcapability("platformname", "android");
capabilities.setcapability("version", "5.1.1");
capabilities.setcapability("devicename", "name");
file appdir = new file("/home/filename/projectfile");
file app = new file(appdir, "appname.apk");
capabilities.setcapability("app",app.getabsolutepath());
it install app on device.
Comments
Post a Comment