I'm new to appium and i'm running some automation scripts on a real device. When i run that particular script on simulators. There are no issue. But when i try to run the same on real device then i get the below mentioned error.
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.
(WARNING: The server did not provide any stack-trace information)
Any type of help will be appreciated
Thanks in advance.
SafariLauncher is used when you are trying to automate the safari browser. The safari launcher has to be built for iPhone (real device). It looks like the safari launcher that is built in is built for simulator, which is why the fruitstrap/ideviceinstaller (app installer used by appium-ios) complains as bad app.
To compile the safarilauncher for your real device.
1. Download safarilauncher code from github
https://github.com/budhash/SafariLauncher
2. Compile the code using your developer provisioning profile (having wildcard as bundle id)
3. Place this safari launcher app for the real device automation.
To compile the safari launcher follow this link for detailed info:
https://discuss.appium.io/t/error-installing-safari-launcher-on-real-device-appium-v1-3-7/3793
Related
I'm trying to integrate and run sample automation test using Appium.
Followed all the mentioned steps to install and setup environment from
http://latestsoftwaretestingnews.com/mobiletesting/appium-ios-testing-with-node-js-step-by-step-guide/
From Appium Desktop v 1.13.0 (1.13.0.20190505.5), on start session always getting an error.
Please refer screenshot:
Appreciate your help! Thanks
.ipa files can not be used with simulators, you have to use a .app file instead.
#Harshal Wani - First just try to deploy the ipa to that simulator by command line, also try launching the simulator and deploy the app via Xcode..
I'm trying to run an appium script with a real iOS device. I am currently getting this error:
Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Apparently this error is associated with security issues at noted here, but I've already completed that step and it's still not working. So then I thought maybe this is b/c my appium script does NOT set the 'APP' capability. 'APP' capability is of course is the full path to the application that is under test. The appium documentation here obviously doesn't indicate which settings are required if any. My question is will the Webdriver Agent not get installed on the device if the 'APP' capability is not set and thus throwing the error above?
You can right-click on the appium app (which is in ur application folder) you are using > show package contents > search for .xcodeproj > you will see a couple of projects including web driver. Now open web driver agent Xcode project and use an apple developer account to code sign it.
If you have already done this, then please update your question with appium capabilities that you have set.
I am new with calabash-ios and have a dummy question is:
How possibly could I run a calabash test with real device which have installed ipa file (included calabash framework) and without xcodeproj?
Problem is I am doing QA and Dev only gives me ipa file to test without source code.
UPDATE:
I am able to run the ipa file in console and cucumber by adding BUNDLE_ID. And make sure the CFNetwork.framework is including in app framework to establish the connection.
But I got another problem to run the scenario:
1. When I run the command below:
DEVICE_ENDPOINT=http://192.168.1.9:37265 NO_LAUNCH=1 BUNDLE_ID=com.example.appname DEVICE_TARGET=UDID cucumber
Then I got this error:
A JSON text must at least contain two octets! (JSON::ParserError)
features/my_first.feature:8:in `Then I touch "LOG-IN/ CREATE ACCOUNT"'
all other steps was skipped
Then I run the console code
DEVICE_ENDPOINT=http://192.168.1.9:37265 NO_LAUNCH=1 BUNDLE_ID=com.example.appname DEVICE_TARGET=UDID calabash-ios console
Then I run server_version
I got reply back that said connection SUCCEED
But when I run start_test_server_in_background
It took me too long to wait and I see the app my physical device kept crashed and launch again and again until it stop as:
Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported by this simulator version
Calabash::Cucumber::Launcher::StartError: Calabash::Cucumber::Launcher::StartError:
"Timed out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError.
2015-10-01 10:49:41.634 instruments[15640:10558880] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-10-01 10:49:42.574 instruments[15640:10558978] Attempting to change event horizon while disengage
2015-10-01 10:49:42.577 instruments[15640:10558877] Attempting to change event horizon while disengage
Instruments Trace Error : Target failed to run: Permission to debug app
Anyone can help please! I tried to search some solution but they almost issue on simulator and they contain xcodeproj. As a QA, I dont have the source code, only .ipa file. :(
Thanks
You should set 3 variables:
$ DEVICE_TARGET=<UDID> \
DEVICE_ENDPOINT=http://<ip>:37265 \
BUNDLE_ID=com.example.YourApp cucumber
The device and the host computer should be on the same network.
The .ipa must be installed on your device.
You can do this in Xcode by dragging-and-dropping in the Device Manager window or with a third-party tool like ideviceinstaller (available with homebrew).
You should never set NO_LAUNCH.
http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-NO_LAUNCH
You also need to enable you device for develop and turn on UIAutomation in the Settings.app > Developer.
Enabling device for development
RunLoop::Fifo::NoReaderConfiguredError
UPDATE In response to this question, I rewrote the Testing on Physical Devices Calabash iOS wiki page. Wow, that content was ancient!
As long as the file is build with calabash then that is not a problem. You just call cucumber with APP_BUNDLE_PATH to where ever your .ipa file is and should be all set.
But you should be aware that .ipa needs to be build to match the target you run the tests on.
Am trying to run appium tool for testing apps. While starting appium server i finished all setting right way. When appium running the app will start at time but suddently it get crash.
Yes.Am using Xcode 6.0 and Appium 1.3.4
Make sure the .app file you are using is build for simulator if you are running appium for simulator and a different build i.e the build for device if you want to run it into real device....This is one of the cause which causes the instruments to crash at start up.
When I create an new project with XCode then generate the app file, it is working fine - I can open the inspector.
But I have a problem when I use an already developed application and the build is coming from a developer profile : I can't open the inspector and instruments crash on startup.
While running the script please start xcode and go in the settings of the mobile device and find developer options. Make sure UIAutomation is enabled there. If it is not then enable it and after it try to run the script again. Surely it will work.
I am trying to automate the test cases in real apple device using appium but not able to do so.
Need help to setup the appium from appium.app not from terminal to test real apple devices.
There are currently issues with the current release of Appium.app (1.2.0). You cannot use Appium.app alone to run Appium.
You need to install Appium via Source or Appium-version-manager
You need to install XCode
You need to install XCode's command line tools
Follow these setup instructions.
Then follow these instructions to get the application ready for testing.
After that, run a simple test in your language of choice. Examples here
Once you get that working on the simulator, you need to prepare your application for testing on a real device by archiving the Application into an .ipa file signed with a Development certificate that contains your target device's UDID.
THEN, you can supply the udid and deviceName arguments to Appium server/desired_capabilities as defined in the desired_caps document.