Our test runs smoothly with Java-Cleint 4.1.2 (Appium - 1.6.5)
Now we upgrade it to Java-Client 5.0.1
When the code attempts to initiate the appium driver it fails with the bottom error log.
It says that the Java home wasnât set properly however on the appium-doctor it seems fine & on the Java-Client 4.1.2 it works fine as well.
Any idea what we are missing?
This is The desired capabilities (is anything missing for Java-Client 5.0.1?)
DesiredCapabilities capabilities = DesiredCapabilities.android();
capabilities.setCapability(MobileCapabilityType.APP, genMeth.getValueFromPropFile(âappPathâ));
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, genMeth.getValueFromPropFile(âdeviceNameâ));
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 1200);
capabilities.setCapability(âautomationNameâ,âuiautomator2â);
[RemoteTestNG] revisions:
git.commit.id=4f29d2b
git.branch=4f29d2b4f03d98ec727e1941758af66ae27e0458
git.build.version=1.2.0
[RemoteTestNG] detected TestNG version 6.9.9
[RemoteTestNG] Invoked with -serport 52344 -protocol json -d /Users/menypeled/Documents/workspace/Droid_Appium/test-output /Users/menypeled/Documents/workspace/Droid_Appium/src/resources/Testng.xml
[BaseMessageSender] Waiting for Eclipse client on localhost:52344
[BaseMessageSender] Received a connection from Eclipse on localhost:52344
[BaseMessageSender] Connection established, starting reader thread
[BaseMessageSender] ReaderThread waiting for an admin message
[JsonMessageSender] Sending message [GenericMessage ==> suiteCount:1, testCount:1]
[BaseMessageSender] ReaderThread received admin message:>ACK
[BaseMessageSender] Received ACK:>ACK
[BaseMessageSender] Received ACK:>ACK
[TestNG] Running:
/Users/menypeled/Documents/workspace/Droid_Appium/src/resources/Testng.xml
[JsonMessageSender] Sending message [SuiteMessage ==> suite:Suite, starting, methodCount:0]
[BaseMessageSender] Received ACK:>ACK
[BaseMessageSender] Received ACK:>ACK
Please choose Environment mode(1 for QA, 2 for Staging or 3 for PROD):1
Testing against QA Environment
Do you want to use Applitools eye?(1 for Yes, or continue for No):2
Testing without Applitools visual testing
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {âbuildâ:{âversionâ:â1.6.5â,ârevisionâ:null}}
[HTTP] <-- GET /wd/hub/status 200 18 ms - 83
[HTTP] --> POST /wd/hub/session {âdesiredCapabilitiesâ:{âappâ:"/Users/menypeled/Documents/workspace/Droid_Appium/APK/SkyGiraffe__Beta_5_11_5.apk",ânewCommandTimeoutâ:1200,âautomationNameâ:âuiautomator2â,âbrowserNameâ:âandroidâ,âplatformNameâ:âAndroidâ,âversionâ:"",âdeviceNameâ:âNexus 5Xâ,âplatformâ:âANDROIDâ}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{âappâ:"/Users/menypeled/Documents/workspace/Droid_Appium/APK/SkyGiraffe__Beta_5_11_5.apk",ânewCommandTimeoutâ:1200,âautomationNameâ:âuiautomator2â,âbrowserNameâ:âandroidâ,âplatformNameâ:âAndroidâ,âversionâ:"",âdeviceNameâ:âNexus 5Xâ,âplatformâ:âANDROIDâ},null,null]
[debug] [BaseDriver] Event ânewSessionRequestedâ logged at 1504081646424 (11:27:26 GMT+0300 (IDT))
[Appium] Creating new AndroidUiautomator2Driver (v0.3.3) session
[Appium] Capabilities:
[Appium] app: â/Users/menypeled/Documents/workspace/Droid_Appium/APK/SkyGiraffe__Beta_5_11_5.apkâ
[Appium] newCommandTimeout: 1200
[Appium] automationName: âuiautomator2â
[Appium] browserName: âandroidâ
[Appium] platformName: âAndroidâ
[Appium] version: ââ
[Appium] deviceName: âNexus 5Xâ
[Appium] platform: âANDROIDâ
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version, platform.
[BaseDriver] Session created with session id: f4da3a9f-4fec-488c-86de-79fb68f9d970
[BaseDriver] Using local app â/Users/menypeled/Documents/workspace/Droid_Appium/APK/SkyGiraffe__Beta_5_11_5.apkâ
[debug] [UiAutomator2] Checking whether app is actually present
[UiAutomator2] UIAutomator2 Driver version:0.3.3
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_111
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/menypeled/Library/Android/sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: 00cfa6ed1739c2e7
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/menypeled/Library/Android/sdk/platform-tools/adb
[debug] [ADB] Setting device id to 00cfa6ed1739c2e7
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Checking whether aapt is present
[ADB] Using aapt from /Users/menypeled/Library/Android/sdk/build-tools/25.0.2/aapt
[ADB] Extracting package and launch activity from manifest
[debug] [ADB] badging package: com.skygiraffe.operationaldata
[debug] [ADB] badging act: com.skygiraffe.operationaldata.LoginScreenActivity
[debug] [AndroidDriver] Parsed package and activity are: com.skygiraffe.operationaldata/com.skygiraffe.operationaldata.LoginScreenActivity
[ADB] Getting device platform version
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âgetpropâ,âro.build.version.releaseâ]
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âwmâ,âsizeâ]
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âgetpropâ,âro.product.modelâ]
[debug] [ADB] Current device property âro.product.modelâ: Nexus 5X
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âgetpropâ,âro.product.manufacturerâ]
[debug] [ADB] Current device property âro.product.manufacturerâ: LGE
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âamâ,âforce-stopâ,âio.appium.uiautomator2.serverâ]
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âwait-for-deviceâ]
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âechoâ,âpingâ]
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing settings apk to deviceâŚ
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âpmâ,âlistâ,âpackagesâ,âio.appium.settingsâ]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.settings
[debug] [ADB] Getting connected devicesâŚ
[ADB] Checking whether aapt is present
[ADB] Using aapt from /Users/menypeled/Library/Android/sdk/build-tools/25.0.2/aapt
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âdumpsysâ,âpackageâ,âio.appium.settingsâ]
[ADB] Cannot read version codes of /usr/local/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk and/or io.appium.settings. Assuming correct app version is already installed
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âgetpropâ,âro.build.version.sdkâ]
[debug] [ADB] Device API level: 25
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âdumpsysâ,âpackageâ,âio.appium.settingsâ]
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âpmâ,âdumpâ,âio.appium.settingsâ]
[debug] [ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âpmâ,âgrantâ,âio.appium.settingsâ,âandroid.permission.WRITE_SETTINGSâ,";",âpmâ,âgrantâ,âio.appium.settingsâ,âandroid.permission.ACCESS_MOCK_LOCATIONâ,";"]
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âpmâ,âgrantâ,âio.appium.settingsâ,âandroid.permission.WRITE_SETTINGSâ,";",âpmâ,âgrantâ,âio.appium.settingsâ,âandroid.permission.ACCESS_MOCK_LOCATIONâ,";"]
[debug] [AndroidDriver] Pushing unlock helper app to deviceâŚ
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âinstallâ,"/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"]
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âinstallâ,"/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"]
[debug] [ADB] Application â/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apkâ already installed. Continuing.
[debug] [ADB] Device API level: 25
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âappopsâ,âsetâ,âio.appium.settingsâ,âandroid:mock_locationâ,âallowâ]
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âforwardâ,âtcp:8200â,âtcp:6790â]
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âdumpsysâ,âwindowâ]
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [AndroidDriver] Extracting strings from apk /Users/menypeled/Documents/workspace/Droid_Appium/APK/SkyGiraffe__Beta_5_11_5.apk null /var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/T/com.skygiraffe.operationaldata
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 25
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âgetpropâ,âpersist.sys.localeâ]
[debug] [ADB] Current device property âpersist.sys.localeâ: en-US
[debug] [ADB] No strings.xml for language âenâ, getting default strings.xml
[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âpushâ,"/var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/T/com.skygiraffe.operationaldata/strings.json","/data/local/tmp"]
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: Error: Trying to proxy a session command without session id
[debug] [ADB] Getting connected devicesâŚ
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âshellâ,âamâ,âforce-stopâ,âcom.skygiraffe.operationaldataâ]
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running â/Users/menypeled/Library/Android/sdk/platform-tools/adbâ with args: ["-P",5037,"-s",â00cfa6ed1739c2e7â,âforwardâ,"âremove",âtcp:8200â]
[MJSONWP] Encountered internal error running command: Error: JAVA_HOME is not set currently. Please set JAVA_HOME.
at getJavaHome (../../lib/helpers.js:104:9)
at getJavaForOs (../../lib/helpers.js:93:17)
at ADB.callee$0$0$ (../../../lib/tools/apk-signing.js:75:16)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at ADB.callee$0$0 [as checkApkCert] (../../../lib/tools/apk-signing.js:75:13)
at AndroidUiautomator2Driver.initAUT$ (../../lib/driver.js:318:35)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 9328 ms - 190
created
Aug '17
last reply
Feb '19
- 17
replies
- 1.9k
views
- 6
users
- 1
like