An unknown server side error

I am trying to run my automation on real iPad device with all the necessary appium & xcode settings.
But, I am getting the following error. Here is the stack trace :


Traceback (most recent call last):
File “test.py”, line 21, in
driver = webdriver.Remote(“http://127.0.0.1:4723/wd/hub”, desired_caps)
File “build/bdist.macosx-10.10-intel/egg/appium/webdriver/webdriver.py”, line 35, in init
File “/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py”, line 73, in init
self.start_session(desired_capabilities, browser_profile)
File “/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py”, line 121, in start_session
‘desiredCapabilities’: desired_capabilities,
File “/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py”, line 172, in execute
self.error_handler.check_response(response)
File “/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py”, line 164, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u’An unknown server-side error occurred while processing the command. Original error: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.’

Please help…!!

Hi @jtangadagi,

Could you possibly attach whole you appium log?

This is not always the root cause.

@TuHuynh : Thank you so much for responding to my question.

I have attached the whole appium log here :

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ --debug=5858 appium/build/lib/main.js --address “127.0.0.1” --session-override --debug-log-spacing --platform-version “9.2” --platform-name “iOS” --app “/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py” --udid “f14e************************************************” --show-ios-log --device-name “ipad_v9” --isolate-sim-device

Debugger listening on port 5858

[Appium] Welcome to Appium v1.5.3

[Appium] Non-default server args:

[Appium] address: ‘127.0.0.1’

[Appium] sessionOverride: true
[Appium] isolateSimDevice: true
[Appium] debugLogSpacing: true
[Appium] platformName: ‘iOS’

[Appium] platformVersion: ‘9.2’
[Appium] deviceName: ‘ipad_v9’
[Appium] app: ‘/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py’
[Appium] udid: ‘f14e**********************************************’
[Appium] showIOSLog: true
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities ‘{“platformName”:“iOS”}’
[Appium] --platform-version => --default-capabilities ‘{“platformVersion”:“9.2”}’

[Appium] --device-name => --default-capabilities ‘{“deviceName”:“ipad_v9”}’
[Appium] --app => --default-capabilities ‘{“app”:"/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py"}’
[Appium] -U,–udid => --default-capabilities ‘{“udid”:“f14e5*************************************************”}’
[Appium] --show-ios-log => --default-capabilities ‘{“showIOSLog”:true}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:

[Appium] platformName: ‘iOS’

[Appium] platformVersion: ‘9.2’

[Appium] deviceName: ‘ipad_v9’
[Appium] app: ‘/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py’
[Appium] udid: ‘f14e5f*********************************************’

[Appium] showIOSLog: true

[Appium] Appium REST http interface listener started on 127.0.0.1:4723

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…

[HTTP] <-- GET /wd/hub/status 200 27 ms - 83

[HTTP] --> POST /wd/hub/session {“sessionId”:null,“desiredCapabilities”:{“deviceName”:“ipad_v9”,“udid”:“f14e5*************************************************”,“app”:"/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py",“browserName”:“Safari”,“platformVersion”:“9.2”,“platformName”:“iOS”,“appiumVersion”:“1.5.3”}}

[MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“ipad_v9”,"u…

[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] deviceName: ‘ipad_v9’
[Appium] udid: ‘f14e5f********************************************************’
[Appium] app: ‘/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py’
[Appium] browserName: ‘Safari’
[Appium] platformVersion: ‘9.2’
[Appium] platformName: ‘iOS’
[Appium] appiumVersion: ‘1.5.3’
[Appium] showIOSLog: true

[BaseDriver] The following capabilities were provided, but are not recognized by appium: appiumVersion.

[iOS] Could not initialize ideviceinstaller; make sure it is installed and works on your system

[BaseDriver] Session created with session id: c3a969ee-8a84-4d28-b97c-aae566636d9e
[debug] [iOS] Not auto-detecting udid.
[debug] [iOS] Creating iDevice object with udid f14e5*********************************************
[debug] [iOS] Couldn’t find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/build/libimobiledevice-macosx/ideviceinstaller

[iOS] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at IosDriver.getIDeviceObj (lib/driver.js:380:15)
at IosDriver.get (lib/driver.js:950:49)
at IosDriver.configureApp$ (lib/driver.js:228:26)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.configureApp (lib/driver.js:199:22)
at IosDriver.createSession$ (lib/driver.js:126:18)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system]

[iOS] Bad app: ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app’. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
[MJSONWP] Encountered internal error running command: Error: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
at IosDriver.configureApp$ (lib/driver.js:247:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.configureApp (lib/driver.js:199:22)
at IosDriver.createSession$ (lib/driver.js:126:18)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

[HTTP] <-- POST /wd/hub/session 500 79 ms - 410

[HTTP] --> POST /wd/hub/session {“sessionId”:null,“desiredCapabilities”:{“deviceName”:“ipad_v9”,“udid”:“f14e5*******************************************************”,“app”:"/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py",“browserName”:“Safari”,“platformVersion”:“9.2”,“platformName”:“iOS”,“appiumVersion”:“1.5.3”}}

[MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“ipad_v9”,"u…
[Appium] Creating new IosDriver session
[Appium] Capabilities:

[Appium] deviceName: ‘ipad_v9’
[Appium] udid: ‘f14e5******************************************************’
[Appium] app: ‘/Users/EB_QA_AUTO/Desktop/working/sst-scripts/mendel_mobile/dev1/test.py’
[Appium] browserName: ‘Safari’
[Appium] platformVersion: ‘9.2’
[Appium] platformName: ‘iOS’
[Appium] appiumVersion: ‘1.5.3’
[Appium] showIOSLog: true
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appiumVersion.
[BaseDriver] Session created with session id: 36a428b1-817c-49a5-9420-5fd91f48c5ab
[debug] [iOS] Not auto-detecting udid.
[debug] [iOS] Creating iDevice object with udid f14*********************************************************
[debug] [iOS] Couldn’t find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/build/libimobiledevice-macosx/ideviceinstaller

[iOS] Could not initialize ideviceinstaller; make sure it is installed and works on your system

[HTTP] <-- POST /wd/hub/session 500 36 ms - 410

[iOS] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at IosDriver.getIDeviceObj (lib/driver.js:380:15)
at IosDriver.get (lib/driver.js:950:49)
at IosDriver.configureApp$ (lib/driver.js:228:26)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.configureApp (lib/driver.js:199:22)
at IosDriver.createSession$ (lib/driver.js:126:18)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system]
[iOS] Bad app: ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app’. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
[MJSONWP] Encountered internal error running command: Error: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
at IosDriver.configureApp$ (lib/driver.js:247:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/
Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.configureApp (lib/driver.js:199:22)
at IosDriver.createSession$ (lib/driver.js:126:18)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…

[HTTP] <-- GET /wd/hub/status 200 16 ms - 83

Looking forward for your reply…!!

That one seems the real root cause.

And I guess you got below from IDE console output or Jenkins.

Please refer my answer here. Hopefully it helps you.

@TuHuynh : Firstly, Yes ideviceinstaller is on my mac and when I try to do this : find / -name ideviceinstaller
I got this on my Terminal :

find: /.DocumentRevisions-V100: Permission denied
find: /.fseventsd: Permission denied
find: /.Spotlight-V100: Permission denied
find: /.Trashes: Permission denied
find: /dev/fd/EB_QA_AUTO: No such file or directory
find: /dev/fd/EB_QA_AUTO: No such file or directory
find: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
find: /Library/Application Support/ApplePushService: Permission denied
find: /Library/Application Support/com.apple.TCC: Permission denied
find: /Library/Caches/com.apple.iconservices.store: Permission denied
find: /Library/SystemMigration/History/Migration-BC66D93B-3F47-4F5B-8406-5972A1CB6401/QuarantineRoot/System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
find: /private/etc/cups/certs: Permission denied
find: /private/tmp/com.apple.launchd.JpJyIw3sOx: Permission denied
find: /private/tmp/com.apple.launchd.PSldkfn5l9: Permission denied
find: /private/var/agentx: Permission denied
find: /private/var/at/tabs: Permission denied
find: /private/var/at/tmp: Permission denied
find: /private/var/audit: Permission denied
find: /private/var/backups: Permission denied
find: /private/var/db/applepay: Permission denied
find: /private/var/db/caches/opendirectory: Permission denied
find: /private/var/db/ConfigurationProfiles/Setup: Permission denied
find: /private/var/db/datadetectors: Permission denied
find: /private/var/db/dhcpclient: Permission denied
find: /private/var/db/diagnostics: Permission denied
find: /private/var/db/dslocal/nodes/Default: Permission denied
find: /private/var/db/geod: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.0: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.200: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.201: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.202: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.212: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.55: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.88: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.89: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.92: Permission denied
find: /private/var/db/launchd.db/com.apple.launchd.peruser.97: Permission denied
find: /private/var/db/locationd: Permission denied
find: /private/var/db/lockdown: Permission denied
find: /private/var/db/nsurlsessiond: Permission denied
find: /private/var/db/securityagent: Permission denied
find: /private/var/db/Spotlight: Permission denied
find: /private/var/db/sudo: Permission denied
find: /private/var/db/TokenCache: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.pluginkit: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.revisiond/com.apple.revisiond.temp: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.revisiond.temp: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.Spotlight: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000003000000r/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000006w00001q/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000006w00001q/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000084000021/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000084000021/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000b400002s/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000b400002s/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000bh00002w/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000bh00002w/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000c4000031/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000c4000031/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s0000068/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s0000068/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s4000069/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s4000069/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s800006_/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s800006_/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000t800006k/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000th00006m/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000th00006m/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000tm00006n/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000vr00006y/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000vr00006y/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000xc00007b/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000xc00007b/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y000007h/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y000007h/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y400007j/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y800007k/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y800007k/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000yc00007l/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.notificationcenter: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.pluginkit: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000104000081/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000104000081/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000010c000083/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000010c000083/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000010m000085/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n000010m000085/T: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_ngzzzzzvzzzzzy/C: Permission denied
find: /private/var/folders/zz/zyxvpxvq6csfxvn_ngzzzzzvzzzzzy/T: Permission denied
find: /private/var/jabberd: Permission denied
find: /private/var/lib/postfix: Permission denied
find: /private/var/log/com.apple.revisiond: Permission denied
find: /private/var/ma: Permission denied
find: /private/var/root: Permission denied
find: /private/var/run/com.apple.xpcproxy.RoleAccount.staging: Permission denied
find: /private/var/run/mds: Permission denied
find: /private/var/spool/cups: Permission denied
find: /private/var/spool/mqueue: Permission denied
find: /private/var/spool/postfix/active: Permission denied
find: /private/var/spool/postfix/bounce: Permission denied
find: /private/var/spool/postfix/corrupt: Permission denied
find: /private/var/spool/postfix/defer: Permission denied
find: /private/var/spool/postfix/deferred: Permission denied
find: /private/var/spool/postfix/flush: Permission denied
find: /private/var/spool/postfix/hold: Permission denied
find: /private/var/spool/postfix/incoming: Permission denied
find: /private/var/spool/postfix/maildrop: Permission denied
find: /private/var/spool/postfix/private: Permission denied
find: /private/var/spool/postfix/public: Permission denied
find: /private/var/spool/postfix/saved: Permission denied
find: /private/var/spool/postfix/trace: Permission denied
find: /System/Library/Caches/com.apple.coresymbolicationd: Permission denied
find: /System/Library/Caches/com.apple.receiptInstaller: Permission denied
find: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
find: /System/Library/User Template: Permission denied
/Users/EB_QA_AUTO/.npm/appium/1.0.0/package/build/libimobiledevice-macosx/ideviceinstaller
find: /Users/Guest/Desktop: Permission denied
find: /Users/Guest/Documents: Permission denied
find: /Users/Guest/Downloads: Permission denied
find: /Users/Guest/Library: Permission denied
find: /Users/Guest/Movies: Permission denied
find: /Users/Guest/Music: Permission denied
find: /Users/Guest/Pictures: Permission denied
find: /Users/Guest/Public/Drop Box: Permission denied
/usr/local/bin/ideviceinstaller
/usr/local/Cellar/ideviceinstaller
/usr/local/Cellar/ideviceinstaller/1.1.0_2/bin/ideviceinstaller
/usr/local/lib/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
/usr/local/opt/ideviceinstaller
/usr/local/var/homebrew/linked/ideviceinstaller
find: /usr/sbin/authserver: Permission denied

Also, I tried your Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system but this dint work for me :frowning:

Please help.!!

To get tests running on my iOS devices, I needed to do a couple things:

First I installed node.js using homebrew: brew install node.
Then I installed authorize-ios: I used npm to install it by running npm install -g authorize-ios from the terminal. Once installed, I ran sudo authorize-ios.
Once that was done, I installed iDeviceInstaller using brew install ideviceinstaller.
Finally I installed the ios-webkit-debug-proxy using brew install ios-webkit-debug-proxy.
To run my tests I bring up my appium server and run ios-webkit-debug-proxy from a separate terminal window using a command like: ios_webkit_debug_proxy -d -c insertUdidHere:27753 If this connects you should see the terminal window populates with info as actions are performed in Safari (either manually or via appium).

If you want to run tests in Safari, you will need to use the Safari Launcher app. Note you will need to rebuild this app using an apple development certificate that contains your tests devices. This rebuilt app needs to have a bundle ID of com.bytearc.SafariLauncher. This need to be put in the node_modules > appium-ios_driver > build > SafariLauncher folder of your appium installation.

When I look at your very first post, it looks like the version of Safari Launcher you are using does not have the correct provisioning profile for your iOS devices.

NOTE: Additional steps may need to be taken when you upgrade to iOS 10 and XCODE 8

Thank you @Cauthon. I shall try these & get back to you.

@Cauthon : I tried doing the above things till :

To get tests running on my iOS devices, I needed to do a couple things:

First I installed node.js using homebrew: brew install node.
Then I installed authorize-ios: I used npm to install it by running npm install -g authorize-ios from the terminal. Once installed, I ran sudo authorize-ios.
Once that was done, I installed iDeviceInstaller using brew install ideviceinstaller.
Finally I installed the ios-webkit-debug-proxy using brew install ios-webkit-debug-proxy.
To run my tests I bring up my appium server and run ios-webkit-debug-proxy from a separate terminal window using a command like: ios_webkit_debug_proxy -d -c insertUdidHere:27753 If this connects you should see the terminal window populates with info as actions are performed in Safari (either manually or via appium).

Everything works till here, But I am not able to go forward from this.

Can you please tell me what exactly you mean by “When I look at your very first post, it looks like the version of Safari Launcher you are using does not have the correct provisioning profile for your iOS devices.”

Are there any changes I should be doing in my provisioning profile?

Thanks

Did you rebuild the SafariLauncher app using a provisioning profile that includes the UDID’s for the iOS devices you are using for testing? Also, did you use com.bytearc.SafariLauncher as the bundle ID when rebuilding the safari launcher app in XCODE?

If your rebuilt SafariLauncher app does not have the correct bundle ID you will probably get a ‘Bad App’ error. If the device is not included in the provisioning profile you might get a ‘Bad App’ or permission error.

@Cauthon : I have the provisioning profile with the right UDID of the device, I don’t really know if I am building the SafariLauncher app correctly. Can you please tell me on how do I build SafariLauncher app in Xcode?

  1. Navigate to your folder where you downloaded/installed the latest build of appium
  2. Now navigate to /node_modules/safari-launcher
  3. Open the Safari-Launcher.xcode project in Xcode
  4. In Targets, select SafariLauncher
  5. In General Settings tab > Identity > Bundle ID, type : com.bytearc.SafariLauncher and in the Team dropdown, select your Apple developers ID
  6. In Build Settings > Code Signing > Provisioning Profile > Select your provisioning profile for all the fields and for code Signing Identity, select iPhone Developer (or something like this). This step assumes your provisioning profile is setup correctly.
  7. Now the build the project. When build is successful, Safari Launcher will be ready to be package for use on your devices.
  8. Navigate to the SafariLauncher directory using Finder and paste in the build.sh file downloaded from https://github.com/budhash/SafariLauncher. Note you will only use the build.sh file from this version of SafariLauncher. The updated version used is stored at https://github.com/snevesbarros/SafariLauncher.
  9. Once the build.sh file is in place navigate to the SafariLauncher directory and run bash build.sh in terminal
    a. This should build the files necessary to use SafariLauncher on your device.
  10. Got to the SafariLauncher directory and copy the files found in the Debug-iphoneos to the following directory: appium > node_modules > appium-ios-driver > build > SafariLauncher

@Cauthon : I tried following your above steps. Everything worked successfully till step 8, when I tried performing the step 9 on terminal, I encountered the following error :

EBs-MacBook-Air:SafariLauncher EB_QA_AUTO$ bash build.sh
Build settings from command line:
SYMROOT = build

xcodebuild: error: ‘SafariLauncher.xcodeproj’ does not exist.
build.sh: line 4: cd: ./build/Debug-iphoneos/: No such file or directory
zip warning: name not matched: SafariLauncher.app

zip error: Nothing to do! (try: zip -r SafariLauncher.zip . -i SafariLauncher.app)
EBs-MacBook-Air:SafariLauncher EB_QA_AUTO$

Please help.

Thanks

I would try downloading SafariLauncher from here: https://github.com/snevesbarros/SafariLauncher., rebuilding it with your provisioning profile and running build.sh on that directory. Hopefully that will build. Then move the debug-iphoneos folder to your appium installation.

@Cauthon : I tried downloading the SafariLauncher from https://github.com/snevesbarros/SafariLauncher and I do not see the build.sh file in this download. You mean to say if I do this - then I should be skipping step 9 and performing step 10 directly?

Thanks

The repository by snevesbarros does not contain the build.sh file, you need to get that from the https://github.com/budhash/SafariLauncher repository and copy and paste it into the snevesbarros version.

If you do not perform step 9, it will not work.

Hi @Cauthon, I tried performing step 9 - was able to succeed with most of the things, but got stuck with this following error while performing bash build.sh .

I am attaching only the error I got on my Terminal below to keep this short(Please let me know if need the whole result after running build.sh - I can attach it too):


CpResource Settings.bundle build/Debug-iphoneos/SafariLauncher.app/Settings.bundle
cd /Users/EB_QA_AUTO/local/lib/node_modules/appium/node_modules/safari-launcher/SafariLauncher
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/EB_QA_AUTO/local/lib/node_modules/appium/node_modules/safari-launcher/SafariLauncher/Settings.bundle /Users/EB_QA_AUTO/local/lib/node_modules/appium/node_modules/safari-launcher/SafariLauncher/build/Debug-iphoneos/SafariLauncher.app

** BUILD FAILED **

The following build commands failed:
CopyPNGFile build/Debug-iphoneos/SafariLauncher.app/Default.png SafariLauncher/Default.png
CopyPNGFile build/Debug-iphoneos/SafariLauncher.app/[email protected] SafariLauncher/[email protected]
CopyPNGFile build/Debug-iphoneos/SafariLauncher.app/[email protected] SafariLauncher/[email protected]
(3 failures)
adding: SafariLauncher.app/ (stored 0%)
adding: SafariLauncher.app/AUTHORS (deflated 3%)
adding: SafariLauncher.app/en.lproj/ (stored 0%)
adding: SafariLauncher.app/en.lproj/InfoPlist.strings (deflated 45%)
adding: SafariLauncher.app/Info.plist (deflated 36%)
adding: SafariLauncher.app/LICENSE (deflated 38%)
adding: SafariLauncher.app/PkgInfo (stored 0%)
adding: SafariLauncher.app/README.md (deflated 29%)
adding: SafariLauncher.app/SafariLauncher (deflated 79%)
adding: SafariLauncher.app/Settings.bundle/ (stored 0%)
adding: SafariLauncher.app/Settings.bundle/en.lproj/ (stored 0%)
adding: SafariLauncher.app/Settings.bundle/en.lproj/Root.strings (deflated 58%)
adding: SafariLauncher.app/Settings.bundle/Root.plist (deflated 65%)
ebs-macbook-air:SafariLauncher EB_QA_AUTO$


I am unable to figure out what is going wrong with this. Can you please help me?

Thanks

I’m not sure why the build is failing when you run the build.sh file.

A couple of questions:

  1. Does the SafariLauncher app build in XCode successfully?
  2. Are you using XCODE 7.X?
  3. Is the build.sh file in the same directory as your XCODE built SafariLauncher app and did you navigate to this folder to in terminal before running the bash build.sh command?

The path reported in your post:
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" doesn’t seem valid.

Adding to this, I also see this SafariLauncher.app having a circle and a slash. When I simply try to double click & open this, I get an error message stating "You can’t open the application “SafariLauncher.app” because it is not supported on this type of Mac"

Is this also something bothering the build.sh run?

Firstly,

  1. Yes, the SafariLauncher app build in Xcode was successful.
  2. I am using XCODE 7.3.1
  3. The build.sh which I pasted to (i,e I pasted build.sh file inside the SafariLauncher folder), but I don’t see the SafariLauncher.app in the same folder. SafariLauncher.app seems to be outside the folder, Can I be copy pasting the SafariLauncher.app into the same folder where I have pasted the build.sh file?

How I got SafariLauncher to build was to download the “Snevesbarros” version of Safari Launcher and then paste the build.sh file into the base folder where the SafariLauncher.xcodeproj file is.

I then built the app in Xcode with my provisioning profile and ran the build.sh file.

If run succesfully, a build folder should appear in the downloaded SafariLauncher folder. Inside of the build folder should be a Debug-iphoneos folder containing SafariLauncher.app, SafariLauncher.app.dSYM, and SafariLauncher.zip. Move these three files to appium > node_modules > appium-ios-driver > build > SafariLauncher.

You also need to set the browserName = “Safari” in your appiumm capabilities and provided the UDID of the device you want to connect to.