An unknown server side error

@Cauthon : Finally I was able to bash build.sh successfully.

Here is the Terminal o/p of running build.sh:


** BUILD SUCCEEDED **

adding: SafariLauncher.app/ (stored 0%)
adding: SafariLauncher.app/_CodeSignature/ (stored 0%)
adding: SafariLauncher.app/_CodeSignature/CodeResources (deflated 74%)
adding: SafariLauncher.app/AUTHORS (deflated 3%)
adding: SafariLauncher.app/[email protected] (deflated 71%)
adding: SafariLauncher.app/Default.png (deflated 45%)
adding: SafariLauncher.app/[email protected] (deflated 68%)
adding: SafariLauncher.app/embedded.mobileprovision (deflated 32%)
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 76%)
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$


But after this, when I try to perform step 10 - I only see SafariLauncher.app and SafariLauncher.zip files in Debug-iphoneos folder but not SafariLauncher.app.dSYM

Any idea on how to get this SafariLauncher.app.dSYM file along the other 2 files?

@Cauthon : I have an update now, I was able to get the SafariLauncher.app.dSYM file and was able to copy & paste all the 3 files to appium > node_modules > appium-ios-driver > build > SafariLauncher successfully.

May I please know the next step to launch the browser on the actual iPad device?

To run my tests I launch my appium server (I’m not sure if you are doing this manually or via code) 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).

Make sure that you are passing in “Safari” as the browserName capability to the appium server. As long as your provisioning profiles are correct, your test should install the SafariLauncher.app onto your iDevice (it will only reinstall if a new version is available) and then launch Safari. Note: Unless you changed the default URL in the SafariLauncher x code project, the default URL will most likely be apple.com. You will need to driver.navigate to your site URL.

Also make sure that you have enbaled WebInspector on all of your iOS devices! This setting is on each device, Safari > Advanced > WebInspector

@Cauthon : I tried your above steps, but I get the following error on Xcode console:


Message: u’An unknown server-side error occurred while processing the command. Original error: Could not find a device to launch. You requested ‘iPad_v9 (10.1)’, but the available devices were: [“Apple TV 1080p (9.2) [89DEC713-7AA5-4E13-B6AF-6DE4DEB8BD32] (Simulator)”,“Apple Watch - 38mm (2.2) [6747E18E-8AB8-4009-8215-CF62EEF8D183] (Simulator)”,“Apple Watch - 42mm (2.2) [C61FA94B-56C0-49C0-9EA4-5C3F865FBDB0] (Simulator)”,“iPad 2 (9.3) [0EE3B49B-4948-4789-B44C-AC1CE620DB19] (Simulator)”]’

FYI : My device(iPad real device) name is iPad_v9 which is showing up when navigated to Window>Devices>iPad_v9 in Xcode.

Please help.!

It looks like your iPad has been upgraded to iOS10.1, you will not be able to interact with your iPad unless you use Appium 1.6 as iOS 10 uses the new XCUITEST framework and Xcode 8.

I have not yet upgraded to 1.6, so I am not 100% if you can still hit devices on iOS 9.X or not. I believe you have to install multiple versions of XCode to make that work, maybe someone else can comment on that. Can you connect to the iPad 2 listed in your original post? It looks like it is on iOS 9.3. Note: Your iPad 2 must be included in the provisioning profile that was used to build SafariLauncher.

If you are not ready to upgrade to 1.6, you could also try to roll back your original iPad to 9.3

@Cauthon : I was now able to use the other iPad with 9.3.5 version installed in it. I tried running the Safari Launcher app on the iPad & was able to successfully launch it on the device.

But then, I tried to run a program from Xcode on the device & got the following error on the Xcode console.


Traceback (most recent call last):
File “test.py”, line 17, in
self.driver = webdriver.Remote(‘http://localhost: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: Command failed: ideviceinstaller -u bcaf***************************************************** -i /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app\n’
Program ended with exit code: 1


Can you please help me with this?

I would not recommend posting your actual UDID’s on the forum. The error states that the i-device installer command failed…I’m not sure why are calling idevice installer in your test…I would comment that call and see how the test proceeds.

It is great that SafariLauncher installed itself on the iPad, it means your configuration is correct (at least up to that point!) After your test instantiated your appium server, did Safari open and navigate to a URL?

I’ve never attempted to use Xcode as my test harness, so I’m not sure that I’ll be able to provide you with much help. Given your last post, I would guess that the issue might be in your test code at this point. I would try to execute a basic test of navigating to a URL and interacting with/validating and element.

Good luck!

Hi @Cauthon,

  1. Thank you for your tip on posting the UDID, will make sure to not include it anymore.
  2. After my test was instantiated, I could see the logs in the appium console, but it never opened up Safari browser on the iPad device(real device).
  3. You said you do not use Xcode, So do you happen to use Eclipse? The reason I am asking you is - I have all my test suites in eclipse - Don’t know if I would be able to execute the tests from eclipse, so I was thinking to migrate everything to Xcode.
  4. I am trying to run my test which has this simple code - intended to open the browser & navigate to google home page on the iPad device. Can you please let me know if the following snippet is correct?

Note: This is written in python language


test.py

import unittest
from appium import webdriver
from selenium import sleep

desired_caps = {}
desired_caps[‘platformName’] = ‘iOS’
desired_caps[‘appiumVersion’] = ‘1.5.3’
desired_caps[‘platformVersion’] = ‘9.3.5’
desired_caps[‘browserName’] = ‘Safari’
desired_caps[‘deviceName’] = ‘daus iPad’

self.driver = webdriver.Remote(‘http://localhost:4723/wd/hub’, desired_caps)
driver.get(‘http://www.google.com’)
sleep(200)


Thanks.

My tests are written in Ruby so I can’t comment on if the python syntax is valid, but make sure that you include the udid for the device you are trying to connect with.

I use the following capabilities:
platformName = “ios”
platformVersion = “9.3”
deviceName = “iPad Air”
browserName = “Safari”
udid = “xxxxxxxxxxxxxxxxxxxxxx”

Also make sure that you have closed any open Safari Instances on the device before executing your test.

Hi @Cauthon, Following this above error "selenium.common.exceptions.WebDriverException: Message: u’An unknown server-side error occurred while processing the command. Original error: Command failed: ideviceinstaller -u bcaf*************************************************** -i /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app\n’"**

I tried to locate this directory where in the SafariLauncher.app was residing, I was able to see the icon with a circle & a dash. I don’t what that means with respect to this. I have attached the screenshot below for you.

Do you by chance know what it might be telling me?

That is the same icon for the SafariLauncher.app file that my computer displays. I assume that it is the default icon.

I am not sure what that error refers to. Can you double check that you have Web Inspector enabled on your iPad?

Yes, I have enabled the Web Inspector on my iPad.

I have the ideviceinstaller installed on my mac. Do you think, if I uninstall that - something might work?

You need idevice installer to make things work, however you could try re-installing it…

I would also take a look at this thread:
https://discuss.appium.io/t/the-app-must-be-signed-with-a-development-identity-and-such-an-app-cant-be-installed-resolved/4103/9

Hi @Cauthon, I tried uninstalling ideviceinstaller - was able to successfully uninstall it.

Next, i tried reinstalling it by using the cmd: brew install ideviceinstaller on Terminal, it is just showing me the below things.

But some stuff ran(like numerous file names flashed) on the header i,e in the place of EB_QA_AUTO-bash-80x24

And also to confirm I just tried which ideviceinstaller to find out where it is, but I got blank after running this. So, I really dunno if I was able to install it again. Can please comment on this?

You’ll need to install an earlier version, the current version only works with Xcode 8+

Can I please know how to install the previous version of ideviceinstaller or which version would be suitable for Xcode 7.3.1?

Hi @Cauthon, I was able to successfully re-install libilmobiledevice & ideviceinstaller. The issue now I am facing is, I am not able to start the ios_webkit_debug_proxy. When I try doing this on the Terminal, I get the following error:


ebs-macbook-air:~ EB_QA_AUTO$ ios_webkit_debug_proxy -d -c bcaf5*****************************************:27753
ss.add_fd(3)
ss.recv fd=3 len=294
ss.recv fd=3 len=686
ss.add_server_fd(4)
Could not connect to lockdownd. Exiting.: Permission denied
ss.remove_server_fd(4)
Unable to attach bcaf5*******************************************************inspector


Please help.!

Checkout out these threads on github, one of them may help.

https://github.com/google/ios-webkit-debug-proxy/issues/160

https://github.com/google/ios-webkit-debug-proxy/issues/168