Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1 - appium-ios

Hi Im still having an issue when running my basic script using Appium.
The issue is Unable to launch WebDriveragent because of xcodebuild failure.
Tried executing the Carthage bootstrap --platform iOS,tvOS' but returns an error
platform iOS,tvOS
IntelliJ Error
I've tried to backtrack the issue by going to my webdriveragent and entering
./Scripts/bootstrap.sh -d
but still it produce an issue
Bootstrap Issue
so I tried to use
carthage bootstrap --use-xcframeworks --platform iOS --no-use-binaries;
it does not return any issue
Appium Server Issue
Im using
MacOS = BigSur 11.5
Appium = 1.17
Xcode = 12.5.1
Carthage version = 0.38.0
Sorry I'm really new to iOS world. Followed all tutorial in the web. Manage to connect an app (IntegrationApp.app) and it works in iOS Real device and simulator but when I tried to connect Appium to real device and simulator it fails
Also tried to reinstall Carthage and even the whole Appium (tried the whole process)
Steps I did
Install Appium desktop and Appium doctor
Open the location of Appium and look for webdriveragent
Open terminal and set it to the location of webdriveragent
code I use is : mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh -d (didn't work so tried other which stated above)
Open the WebDriverAgent file in Xcode and set the necessary field (Build success)
Tried to open IntegrationApp.app in iOS device(real and simulator)(Success)
Tried to open Appium inspector and set the following:
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability("platformName", "iOS");
cap.setCapability("platformVersion", "14.5");
cap.setCapability("deviceName", "iPhone 12");
cap.setCapability(CapabilityType.BROWSER_NAME, "safari");
// cap.setCapability("app");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
IOSDriver driver = new IOSDriver(url, cap);

Manage to solve this problem (Though it has another issue on real device - still has answers here)
Download new Appium version v1.18.3
Tried to setup again but after creating the Resource Directory (mkdir -p Resource/WebDriverAgent.bundle). instead using ./Source/bootstrap.sh -d I used
sudo ./Source/bootsrap.sh -d
I'm using a company provided macbook air. And I also run the
sudo carthage bootstrap --use-xcframeworks --platform iOS --no-use-binaries;
And this is a good read to https://www.mutuallyhuman.com/blog/webdriveragent-getting-started-with-automated-ios-testing/

Related

Android Terminal does not recognise firebase command

I have this weird situation where I am not able to run firebase commands from android studio. I can run such commands in terminal but not in the terminal inside android studio.
As an example if I run firebase login in terminal, I can login but if run it in android studio I get this error: zsh: command not found: firebase.
See below an image to prove this case.
I tried to run the following command and got the following in terminal
MyMac:my_folder myuser$ which firebase
/Users/myuser/.nvm/versions/node/v17.0.1/bin/firebase
MyMac:my_folder myuser$ readlink $(which firebase)
../lib/node_modules/firebase-tools/lib/bin/firebase.js
If I do the same in Android I get nothing. I suspect it is a matter of Android studio not finding the right path to the firebase files?
Any help?
I am on a macOS Ventura and using Android Studio Electric Eel
Thanks so much!!
How did you install firebase tools (locally or globally)?
if you have globally installed firebase-cli,
I suggest you to look into environment PATH variables for both nodejs and firebase tools.
if you have installed locally as a dependancy,
here is a installation guide to install firebase-cli on macOS.
Eitherway, I suggest you to Invalidate cache and restart your Android studio before running the terminal again.

Any solution for firebase packages integration in flutter in MacBook m1 pro

I have a flutter project which is dependent on some firebase services like auth, db etc. It was working fine on mac mini (intel). But on my MacBook pro I can't build project for podfile error. It showing firebase issue. Any solution?
There is no direct solution for the same. But there is a work around for resolving the Podfile related errors. Follow the steps below,
Execute the below command to install ffi from the terminal,
sudo arch -x86_64 gem install ffi
Then in the iOS folder of Flutter project execute the below command to install the pods. You have to run this command every time a new Flutter project is created and if it needs firebase.
arch -x86_64 pod install
Finally run the application in the Android studio

Can't open app on Simulator MacOS Catalina

I can't install app on my simulator after update to MacOS Catalina, it was fine on earlier versions. But Now when I try to run the app installed in the simulator I get this popup.
I have changed system Security & Privacy setting using this command in the terminal sudo spctl --master-disable and now my it looks like this.
But even after this I can't run the app, any idea, suggestion ?
My Xcode version is 11.1 & target iOS version is 13.1, app runs smoothly when ran using xcode, but exported app is causing this issue.
I was able to solve this problem by running the following command.
xattr -dr com.apple.quarantine <path_to_app>
It turns out if you download app using some browser then it adds a flag which is considered a security threat in catalina, running this commands solves the issue.

IOS mobile automation

I am new to IOS automation testing. I have to install appium for automation on actual physical device. I have followed a number of links but I am still confused. I have installed appium and xcode. But when I run appium inspector I always get error 'Could not launch Appium Inspector'. What could be the possible cause? Also can someone suggest a link which I can follow for appium set up on MAC.
Here's a very basic list of things you need to have to make Appium work for iOS:
It's helpful to use Homebrew to install some of these items.
https://brew.sh/
First you need to have ruby version 2.2 or higher to utilize the newest appium. I would suggest you use a ruby manager like RVM to install this Ruby.
\curl -sSL https://get.rvm.io | bash -s stable
Then install a ruby version above 2.2 (I personally default to 2.4.0):
rvm install 2.2.0
you can set a default rvm to use for convenience:
rvm default 2.2.0
If you don't set the rvm default you will have to use the "rvm use rubyversion" command every time you open a terminal.
Node.js: Essential, can not do without.
brew install node
(Note: DO NOT INSTALL WITH SUDO)
Appium Desktop: Convenient implementation of appium for building test cases. Uses a GUI and has inspector build in.
https://github.com/appium/appium-desktop
Appium CLI: command line Appium which is best for running multiple devices at once.
npm install -g appium
npm install -g appium-doctor
Check the Doctor: You can use appium doctor to diagnose what next steps you need to do next. Run it with the --ios or --android tags to find out what you need for each of these operating systems. You'll have to make adjustments to your .bash_profile so Appium can find your JDK folder among other things.
Authorize iOS testing on your computer:
npm install -g authorize-ios
sudo authorize-ios
Carthage: required to automate after Xcode 8
brew install carthage
brew update carthage
Hopefully this will help to diagnose what is going on with your set up. If you're using ruby to do your automation scripts don't forget to actually download the appium_lib gem:
sudo gem install appium_lib
Good Luck!
Check this out latest appium desktop :
AppiumDesktop1.1.0beta4 iOS setup - Inspector and Record the scripts,
Link : https://www.youtube.com/watch?v=2_xHmofGgUE
If you face any issue please comment it.

Unable to deploy Qt 5.3 Quick application to AVD under Mac OS X 10.9

I have spent dozens of time looking for the solution. I gave up.
I use Qt 5.3 for development and I build cross platform solution.
My MacbBook Pro runs Mac OS X 10.9.3 Mavericks.
My project successfully runs in ios-simulator and desktop builds.
But I couldn't deploy it to neither AVD nor real Android Device.
Here is the logs:
Building the android package failed!
-- For more information, run this command with --verbose.
Generating Android Package
Input file: /Users/xxx/build-xxx-Android_for_armeabi_v7a-Debug/android-libxxx.so-deployment-settings.json
Output directory: /Users/xxx/build-xxx-Android_for_armeabi_v7a-Debug/android-build
Application binary: /Users/xxx/build-xxx-Android_for_armeabi_v7a-Debug/libxxx.so
Android build platform: android-19
Install to device: emulator-5554
19:43:56: The process "/Applications/Qt/5.2.1/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project xxx (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
When executing step 'Deploy to Android device'
19:43:56: Elapsed time: 02:13.
Do you have any ideas?
Solved.
The issue was:
I set incorrect path to ant executable.
Qt was not able to build android app and for sure deploy it.
Now I am able to run app on the device, but still can't run app with emulator.
Good luck.

Resources