I have installed Appium 2.0 using command line but unable to see the appium-webdriveragent folder under /usr/local/lib/node_modules/appium/node_modules/ path (no folder found which is starts with appium).
Theses are the following commands I ran:
npm install -g appium#next
brew install Carthage
npm install -g appium-doctor
appium --base-path /wd/hub
appium driver install xcuitest
appium plugin install images
appium plugin install execute-driver
appium plugin install relaxed-caps
This is the appium version:
~ % appium -v
2.0.0-beta.46
This is the driver installed location:
~ % npm ls -g appium-webdriveragent
/usr/local/lib
└── (empty)
I am using Xcode:
Version 14.1 (14B47b)
This is the execution failure log:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. 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.
Host info: host: 'L0057s-MacBook-Pro.local', ip: 'fe80:0:0:0:1863:fbc8:e2f5:1313%en0'
Build info: version: '4.5.0', revision: 'fe167b119a'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.5.1', java.version: '18.0.1.1'
Driver info: io.appium.java_client.AppiumDriver
Command: [null, newSession {capabilities=[{appium:appName=XXXX APP, appium:automationName=XCUITest, browserName=, appium:deviceName=iPhone 6s, appium:newCommandTimeout=60, platformName=IOS, appium:platformVersion=15.7.1, appium:udid=0ee9ce6c7e262203d06348ed55de4e747cfaab75, appium:usePrebuiltWDA=true}], desiredCapabilities=Capabilities {appName: XXXX APP, automationName: XCUITest, browserName: , deviceName: iPhone 6s, newCommandTimeout: 60, platformName: IOS, platformVersion: 15.7.1, udid: XXXXXXXX1234..., usePrebuiltWDA: true}}]
Capabilities {}
have followed https://github.com/appium/appium
You could try this fix.
For me it didn't work and I had to go back to xcode 13.4.1 to have it working again...
I tried as well with Appium2 (2.0.0-beta.46) but, unfortunately, I had to go back to 1.22.3 and downgraded Xcode from 14.1 to 13.4.1
Try installing XCUITest via:
appium driver install xcuitest or appium driver update xcuitest
appium-webdriveragent folder is available in user's home directory as .appium or can be located via
echo "$(dirname "$(find "$HOME/.appium" -name WebDriverAgent.xcodeproj)")"
Related
In my local Jenkins Docker container, I could run my test plan without any issues .
Even without giving
However, in my office Jenkins server, I setup with that as per the https://www.browserstack.com/docs/automate/selenium/jenkins#configuring-browserstack-credentials
Yet I get this error.
org.openqa.selenium.remote.UnreachableBrowserException:
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'hidden', ip: 'hidden', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.15.2.el7.x86_64', java.version: '1.8.0_201'
Driver info: driver.version: RemoteWebDriver
at com.sam.browserstack.BrowserStackInitiation.setUp(BrowserStackInitiation.java:78)
Caused by: java.net.SocketTimeoutException: connect timed out
at com.sam.browserstack.BrowserStackInitiation.setUp(BrowserStackInitiation.java:78)
My build command is as per below.
export M2_HOME=/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven3
export PATH=$PATH:$M2_HOME/bin
mvn --version
cd CommonPagesStorage
mvn clean install -DskipTests
cd ..
cd AutomationFrameworkDemo
mvn clean test -Dbrowser="${Browser}" -Dbrowser_version="${browser_version}" -Dos_version="10" -Dos="Windows" -Dlocalrun="false" -Dtestxml=src/test/TestSuites/${TestPlanName}
I also tried adding below code as exports but no avail.
export http_proxy="http://proxy-dev.can.myorg.com:8080"
export https_proxy="http://proxy-dev.can.myorg.com:8080"
export NO_PROXY=123.345.145.345,.can.myorg.com,localhost,200.0.0.2
I got the url whitelisted from netwrok team, also below lines of code were needed too.
https://username:password#hub-cloud.browserstack.com/wd/hub
(Since I use free style project, to get M2_HOME, I created a maven project with just mvn --version as a shell command and got the value from output console)
export M2_HOME=/opt/software/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin
export http_proxy="http://proxy-dev.aws.skynet.com:8080"
export https_proxy="http://proxy-dev.aws.skynet.com:8080"
export NO_PROXY=777.777.777.777,.aws.skynet.com,localhost,127.0.0.1
mvn --version
cd CommonPagesStorage
mvn clean install -DskipTests
cd ..
cd AutomationFrameworkDemo
mvn clean test -Dhttp.proxyHost=proxy-dev.aws.skynet.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy-dev.aws.skynet.com -Dhttps.proxyPort=8080 -Dbrowser="${Browser}" -Dbrowser_version="${browser_version}" -Dos_version="10" -Dos="Windows" -Dlocalrun="false" -Dtestxml=src/test/TestSuites/${TestPlanName}
Its my first time building an ionic app build via a Mac and its showing me flames. I have followed steps on the ionic page to do setup and build but for some reason I am having issues.
When I run ionic Cordova build iOS --prod --release
This is the error below:
Wrote out iOS Bundle Version "1.3.8" to /Users/admin/Development/App/platforms/iOS/App/App-Info.plist
Set IPHONEOS_DEPLOYMENT_TARGET to "11.0".
iOS Product Name has not changed (still "App")
Updating icons at platforms/iOS/App/Images.xcassets/AppIcon.appiconset/
Updating launch storyboard images at platforms/iOS/App/Images.xcassets/LaunchStoryboard.imageset/
Updating Storyboard image set contents.json
Updating Background Color color set Contents.json
This app does not have additional resource files defined
Prepared iOS project successfully
Executing script found in plugin cordova-plugin-add-swift-support for hook "after_prepare": plugins/cordova-plugin-add-swift-support/src/add-swift-support.js
No scripts found for hook "before_compile".
Running command: xcodebuild -version
Command finished with error code 0: xcodebuild -version
Running command: ioreg -p IOUSB -l
Command finished with error code 0: ioreg -p,IOUSB,-l
Running command: xcrun simctl list --json
Command finished with error code 0: xcrun simctl,list,--json
Running command: xcrun simctl list --json
Command finished with error code 0: xcrun simctl,list,--json
Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
at /Users/admin/Development/App/platforms/ios/cordova/lib/build.js:145:60
at _fulfilled (/Users/admin/Development/App/node_modules/q/q.js:854:54)
at /Users/admin/Development/App/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (/Users/admin/Development/App/node_modules/q/q.js:816:13)
at /Users/admin/Development/App/node_modules/q/q.js:624:44
at runSingle (/Users/admin/Development/App/node_modules/q/q.js:137:13)
at flush (/Users/admin/Development/App/node_modules/q/q.js:125:13)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
[ERROR] An error occurred while running subprocess cordova.
cordova build ios --release --verbose exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 2 functions +0ms
ionic:utils-process processExit: exiting (exit code: 1) +42ms
I have tried to do a build on a new project and samething happened. I did a build for android and its working fine on a windows machine I was doing dev on for the project.
Here is my ionic info data
Ionic:
Ionic CLI : 6.12.4 (/usr/local/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/angular 5.5.3
#angular-devkit/build-angular : 0.1100.7
#angular-devkit/schematics : 11.0.7
#angular/cli : 11.0.7
#ionic/angular-toolkit : 3.0.0
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 15 other plugins)
Utility:
cordova-res : not installed
native-run : 1.3.0
System:
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v14.15.4 (/usr/local/bin/node)
npm : 6.14.10
OS : macOS Big Sur
Xcode : Xcode 12.3 Build version 12C33
Thanks
Happy new year all, I'd gratefully appreciate if someone could help or shed some light into this issue.
I've just set up appium 1.7.2 server on MAC OS High Sierra v 10.13.2, running appium through below command.
appium -a 127.0.0.1 -p 4723 --log-level=debug
Below is my .bash_profile
n.nadarajah#EGHJ-MACRDV01 ~ $ cat ~/.bash_profile
# Setting PATH for Python 2.7
# The original version is saved in .bash_profile.pysave
ANDROID_HOME=/Users/n.nadarajah/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
ANDROID_PLATFORM_TOOLS=$ANDROID_HOME/platform-tools
ANDROID_TOOLS=$ANDROID_HOME/tools
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}:$JAVA_HOME:$ANDROID_HOME:
$ANDROID_PLATFORM_TOOLS:$ANDROID_TOOLS"
export PATH
Echoing $ANDRIOD_HOME env variable
n.nadarajah#EGHJ-MACRDV01 ~ $ echo $ANDROID_HOME
/Users/n.nadarajah/Library/Android/sdk
Below are the Appium logs on test execution.
n.nadarajah#EGHJ-MACRDV01 ~ $ appium -a 127.0.0.1 -p 4723 --log-l .
level=debug
info: Welcome to Appium v1.4.16 (REV
ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"capabilities":{"alwaysMatch":
{"platformName":"Android"},"firstMatch":
[{}]},"desiredCapabilities":{"deviceName":"Android
Emulator","app":"/Users/n.nadarajah/sites/Resilient-
QA/EndToEndTesting/apks/app-
debug.apk","platformName":"Android","automationName":"appium",
"appPackage":"com.resilientplc.smartnumbers.debug"}}
info: Client User-Agent string: Python http auth
info: [debug] No appActivity desired capability or server param.
Parsing from apk.
info: [debug] Using local app from desired caps:
/Users/n.nadarajah/sites/Resilient-QA/EndToEndTesting
/apks/app-debug.apk
info: [debug] Creating new appium session
a5cfbee9-bcd6-41af-a90c-0389ab244d2c
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_151
info: [debug] Checking whether adb is present
warn: The ANDROID_HOME environment variable is not set to the Android
SDK root directory path.
ANDROID_HOME is required for compatibility with SDK 23+.
Checking along PATH for adb.
info: [debug] executing cmd: which adb
info: [debug] Using adb from /Users/n.nadarajah/
Library/Android/sdk/platform-tools/adb
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
warn: The ANDROID_HOME environment variable is not set to the Android
SDK root directory path.
ANDROID_HOME is required for compatibility with SDK 23+.
Checking along PATH for aapt.
info: [debug] executing cmd: which aapt
error: Problem parsing package and activity from manifest: Error: Could
not find aapt. Please set the ANDROID_HOME environment
variable with the Android SDK root directory path.
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Could not
find aapt. Please set the ANDROID_HOME environment variable
with the Android SDK root directory path.
info: [debug] Error: Could not find aapt.
Please set the ANDROID_HOME environment variable with the
Android SDK root directory path.at ADB.<anonymous>
(/usr/local/lib/node_modules/appium
/node_modules/appium-adb/lib/adb.js:126:12)
at ChildProcess.exithandler (child_process.js:279:5)
at ChildProcess.emit (events.js:159:13)
at maybeClose (internal/child_process.js:943:16)
at Socket.stream.socket.on (internal/child_process.js:363:11)
at Socket.emit (events.js:159:13)
at Pipe._handle.close [as _onclose] (net.js:568:12)
info: [debug] Responding to client with error: {"status":33,"value":
{"message":"A new session could not be created.
(Original error: Could not find aapt. Please set the ANDROID_HOME
environment variable with the Android SDK root
directory path.)","origValue":"Could not find aapt. Please set the
ANDROID_HOME environment variable with the
Android SDK root directory path."},"sessionId":null}
info: <-- POST /wd/hub/session 500 164.317 ms - 344
Questions:
1. Why does appium cannot see the system environment variable?
I've tried appium server versions 1.7.2 & 1.7.1 & 1.6.2 & 1.4.16 the symptoms were the same.
Could someone help me out with this please.
Thanks
Niro
I've got to the bottom of this issue,
turns out I've missed another android env variable.
In the above case I've missed ANDROID_BUILD_TOOLS
At the point of writing this, below are the list of Env variables required for appium.
ANDROID_HOME=/Users/n.nadarajah/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/
Contents/Home/bin
ANDROID_PLATFORM_TOOLS=$ANDROID_HOME/platform-tools
ANDROID_TOOLS=$ANDROID_HOME/tools
ANDROID_BUILD_TOOLS=$ANDROID_HOME/build-tools/27.0.3
Append all the above env variables to $PATH
works for me in Mojave.
After editing ~/.bash_<profile or rc> I use:
source ~/.bash_<profile or rc>
It not only loads the new variables values, as reports any error on file as well.
here is the workin list of environment variables:
export ANDROID_HOME=/Users/user/Library/Android/sdk
export PATH=$ANDROID_HOME/:$PATH
export
PATH=$ANDROID_HOME/platform-tools/:$PATH
export
PATH=$ANDROID_HOME/tools/:$PATH export PATH=/usr/local/bin/:$PATH
launchctl setenv ANDROID_HOME /Users/user/Library/Android/sdk
works on highSierra, of course, tweak Your paths...
here I have installed android studio in default path.
First Set Android home: create a new System Variable
ANDROID_HOME : C:\Users\<user name>\AppData\Local\Android\Sdk
Add bellow three path in path system variables
C:\Users\<user name>\AppData\Local\Android\Sdk\platform-tools
C:\Users\<user name>\AppData\Local\Android\Sdk\tools
C:\Users\<user name>\AppData\Local\Android\Sdk\tools\bin
UPDATE
It stopped working without livereload too - so now it wasn't being cause by livereload - but I still need help with this problem
After the iOS 11 update (I think that is the cause of this because things were fine before), I am not able to use livereload. If I try to use livereload, it hangs on the splash screen - with the loading wheel spinning. Here is some info about my ionic environment:
Eamons-MBP:myapp eamonwhite$ ionic info
cli packages: (/Users/eamonwhite/ionicmane/myApp/node_modules)
#ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
#ionic/app-scripts : 1.3.12
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.5.0
System:
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v7.7.3
npm : 4.1.2
OS : macOS High Sierra
Xcode : Xcode 9.0 Build version 9A235
Misc:
backend : legacy
When I run it with xcode, it says this in the xcode console:
2017-10-10 15:49:17.417901-0400 myApp[8476:3520766] Resetting plugins due to page load.
2017-10-10 15:49:38.433127-0400 myApp[8476:3520766] Failed to load webpage with error: The request timed out.
In the ionic console, it stops before the deviceready event:
------ Debug phase ------
Starting debug of 2e5ac6066864be48322a757c4d0ccdfde52cf356 (N51AP, iPhone 5s (GSM), iphoneos, arm64) a.k.a. 'Eamon White’s iPhone' connected through USB...
[ 0%] Looking up developer disk image
[ 90%] Mounting developer disk image
[ 95%] Developer disk image already mounted
[100%] Connecting to remote debug server
-------------------------
(lldb) command source -s 0 '/tmp/2F06F4BB-A7E5-4B97-87EC-A01CBEE5661A/fruitstrap-lldb-prep-cmds-2e5ac6066864be48322a757c4d0ccdfde52cf356'
Executing commands in '/tmp/2F06F4BB-A7E5-4B97-87EC-A01CBEE5661A/fruitstrap-lldb-prep-cmds-2e5ac6066864be48322a757c4d0ccdfde52cf356'.
(lldb) platform select remote-ios --sysroot '/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols'
Platform: remote-ios
Connected: no
SDK Path: "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols"
(lldb) target create "/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device/myApp.app"
Current executable set to '/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device/myApp.app' (arm64).
(lldb) script fruitstrap_device_app="/private/var/containers/Bundle/Application/5EBCC0EF-FDB9-4DE7-A961-D91B6139AEA0/myApp.app"
(lldb) script fruitstrap_connect_url="connect://127.0.0.1:50188"
(lldb) target modules search-paths add /usr "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols/usr" /System "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols/System" "/private/var/containers/Bundle/Application/5EBCC0EF-FDB9-4DE7-A961-D91B6139AEA0" "/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device" "/var/containers/Bundle/Application/5EBCC0EF-FDB9-4DE7-A961-D91B6139AEA0" "/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device" /Developer "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols/Developer"
(lldb) command script import "/tmp/2F06F4BB-A7E5-4B97-87EC-A01CBEE5661A/fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.py"
(lldb) command script add -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.connect_command connect
(lldb) command script add -s asynchronous -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.run_command run
(lldb) command script add -s asynchronous -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.autoexit_command autoexit
(lldb) command script add -s asynchronous -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.safequit_command safequit
(lldb) connect
(lldb) run
success
(lldb) safequit
Process 7681 detached
Also, I updated my ios-deploy from 1.9.1 to 1.9.2 before this started happening.
Why can't I use livereload? Again, I think this might have something to do with the iOS 11 update. Does anybody know a workaround...I have read something about npm run watch but couldn't get it running.
I have created a blank app to see if that would run with livereload and it doesn't.
The wifi on my phone was off so it wasn't connecting to ionic.
I am trying to automate ios mobile application. I have configure all classpath , installed appium , eclipse and have done everything. But now when I run my program , I am getting error :
A new session could not be created. (Original error: Could not initialize
ideviceinstaller; make sure it is installed and works on your system)(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.34 seconds
Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:16:47'
System info: host: 'www.example.com', ip: 'xxx.xxx.x.xxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.4', java.version: '1.8.0_45'
Driver info: io.appium.java_client.ios.IOSDriver
My code is :
File path = new File("/Users/test/Desktop/myapp.ipa");
// Setting capabilities
DesiredCapabilities capabilities = new DesiredCapabilities();
//capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("device", "iPhone 6+");
capabilities.setCapability("udid", "xxxxxxx");
capabilities.setCapability("deviceName","iPhone 6+");
capabilities.setCapability("platformVersion", "8.4.1");
capabilities.setCapability("app", "settings");
driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub/"), capabilities)
Note : I have tried all these - https://goo.gl/rf4KJV solutions but no luck.
Please install ideviceinstaller properly and set the path for ideviceinstaller
Use the following command to install ideviceinstaller brew install --HEAD ideviceinstaller
$ brew install --HEAD ideviceinstaller
if ideviceinstaller is already install. then unlink it and link it back using following commands
$ brew unlink ideviceinstaller
$ brew link ideviceinstaller