Appium on real iOS 8.1 device failing to install "/tmp/Appium-MobileSafari-8.1.app"

Hi There, I am trying to run a Selenium test on a real iOS device iPAD. The job keeps failing trying to install /tmp/Appium-MobileSafari-8.1.app.

I have installed
node (v0.10.32) and Appium (1.3.0) via homebrew on
a Mac OSX 10.9.5.
I am running XCode 6.1
The iPad is running iOS 8.1

I start the proxy agent with:

ios_webkit_debug_proxy -c b574a5862150382a6d27ec58dc0ee860472de311:27753 -d

I start appium with:

appium --app /Users/ateja/Library/Developer/Xcode/DerivedData/SafariLauncher-dprcsvzvwvqkuebfhuchrlaekaim/Build/Products/Debug-iphoneos/SafariLauncher.app -U b574a5862150382a6d27ec58dc0ee860472de311 &

When I initiate the test (via maven / IntelliJ) I get:

info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“Adam Teja’s iPad”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘Adam Teja’s iPad (8.1 Simulator)’
info: [debug] Not setting device type since we’re on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we’re on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we’re using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id b574a5862150382a6d27ec58dc0ee860472de311 --bundle com.bytearc.SafariLauncher
info: [debug] Installing app using cmd: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap install --id b574a5862150382a6d27ec58dc0ee860472de311 --bundle “/tmp/Appium-MobileSafari-8.1.app”
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Unable to install [/tmp/Appium-MobileSafari-8.1.app] to device with id [b574a5862150382a6d27ec58dc0ee860472de311]. Error [Error: Command failed: ]
info: [debug] Error: Unable to install [/tmp/Appium-MobileSafari-8.1.app] to device with id [b574a5862150382a6d27ec58dc0ee860472de311]. Error [Error: Command failed: ]
at /usr/local/lib/node_modules/appium/lib/devices/common.js:147:10
at ChildProcess.exithandler (child_process.js:652:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Socket. (child_process.js:969:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Unable to install [/tmp/Appium-MobileSafari-8.1.app] to device with id [b574a5862150382a6d27ec58dc0ee860472de311]. Error [Error: Command failed: ])”,“origValue”:“Unable to install [/tmp/Appium-MobileSafari-8.1.app] to device with id [b574a5862150382a6d27ec58dc0ee860472de311]. Error [Error: Command failed: ]”},“sessionId”:null}
info: ← POST /wd/hub/sess

Running the command "/usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap install --id b574a5862150382a6d27ec58dc0ee860472de311 --bundle “/tmp/Appium-MobileSafari-8.1.app” fails with the following error:

[ 60%] InspectingPackage
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
AMDeviceInstallApplication failed: -402653130

I am at a loss… can you think of anything to try?

1 Like

I preloaded SafariLauncher.app on the iPad, it seems to negate the need for Appium to try and install “/tmp/Appium-MobileSafari-8.1.app”

Hi Adam,

I am facing same issue with iphone 5 with iOS 8.1 device … will update if I get it resolved.

Thanks
Amarnath Rayudu

Hi @AmarnathRayudu

It seems there were some ‘bugs’ around Appium/iOS 8.1. I installed ‘from source’ a pre-release version that has addressed some of these issues (Appium v1.3.3-pre); it works a bit better.

-Adam

@Adam_T

Did the same … it worked :smile:

Hi
I am also facing the same issue. Can you tell me how to pre-load SafariLauncher.app on the device?

use XCode to build the app (nothing really to do, just get it from git) and then you can install on your device using the “Run” button in the upper left corner.

1 Like