GithubHelp home page GithubHelp logo

It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible about mobileautomationframework HOT 18 CLOSED

shankybnl avatar shankybnl commented on May 29, 2024
It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible

from mobileautomationframework.

Comments (18)

shankybnl avatar shankybnl commented on May 29, 2024

Can you please start the appium server from the command prompt and then try to execute the test?

http://automate-apps.com/start-appium-server-from-command-line/

from mobileautomationframework.

essplqaprojects avatar essplqaprojects commented on May 29, 2024

@shankybnl help me brother

still facing the issue..

while i print --> createSessionCucumber.createDriver(invokeDriver, BaseSteps.class.getDeclaredMethod("userHasSlideshareApp",String.class))

i get this error -->

public void cucumberIntegrationTests.stepDefinitions.common.BaseSteps.userHasSlideshareApp(java.lang.String) throws java.lang.Exception

In BaseSteps below line it throws error

createSessionCucumber.createDriver(invokeDriver, BaseSteps.class.getDeclaredMethod("userHasSlideshareApp",String.class));

In COMMAND LINE I GOT THIS:

[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","noReset":false,"automationName":"UiAutomator2","name":"userHasSlideshareApp","platformName":"Android","deviceName":"Android Emulator"},"capabilities":{"alwaysMatch":{"appium:app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appium:appActivity":"net.slideshare.mobile.ui.SplashActivity","appium:appPackage":"net.slideshare.mobile","appium:automationName":"UiAutomator2","appium:deviceName":"Android Emulator","name":"userHasSlideshareApp","appium:noReset":false,"platformName":"android"},"firstMatch":[{}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","noReset":false,"automationName":"UiAutomator2","name":"userHasSlideshareApp","platformName":"Android","deviceName":"Android Emulator"},null,{"alwaysMatch":{"appium:app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appium:appActivity":"net.slideshare.mobile.ui.SplashActivity","appium:appPackage":"net.slideshare.mobile","appium:automationName":"UiAutomator2","appium:deviceName":"Android Emulator","name":"userHasSlideshareApp","appium:noReset":false,"platformName":"android"},"firstMatch":[{}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1587040342565 (18:02:22 GMT+0530 (India Standard Time))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] name
[Appium] Appium v1.17.0 creating new AndroidUiautomator2Driver (v1.44.2) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "appium:name": "userHasSlideshareApp",
[debug] [BaseDriver] "platformName": "android",
[debug] [BaseDriver] "appium:app": "D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk",
[debug] [BaseDriver] "appium:appActivity": "net.slideshare.mobile.ui.SplashActivity",
[debug] [BaseDriver] "appium:appPackage": "net.slideshare.mobile",
[debug] [BaseDriver] "appium:automationName": "UiAutomator2",
[debug] [BaseDriver] "appium:deviceName": "Android Emulator",
[debug] [BaseDriver] "appium:noReset": false
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] name
[BaseDriver] Session created with session id: db607896-b2b9-4278-9b44-3bc999744b27
[BaseDriver] Using local app 'D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk'
[debug] [UiAutomator2] Checking whether app is actually present
[ADB] Using 'adb.exe' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb.exe' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 28
[ADB] Getting device platform version
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 9
[debug] [ADB] Device API level: 28
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_pre_p_apps 1'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_p_apps 1'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy 1'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is not installed
[debug] [ADB] App 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk' is not installed
[debug] [ADB] Installing 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 features'
[ADB] The application at 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 install -g C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[ADB] The installation of 'settings_apk-debug.apk' took 345ms
[debug] [ADB] Install command stdout: Performing Streamed Install
[debug] [ADB] Success
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [ADB] Starting Appium Settings app
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android:mock_location allow'
[debug] [Logcat] Starting logcat capture
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] 'io.appium.uiautomator2.server' is not installed
[debug] [ADB] App 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk' is not installed
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: notInstalled
[debug] [ADB] Checking app cert for C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[ADB] Using 'apksigner.jar' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar'
[debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar verify --print-certs C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[ADB] Cannot use apksigner tool for signature verification. Original error: Command 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' not found. Is it installed?
[debug] [ADB] Defaulting to verify.jar
[debug] [ADB] 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk' is not signed with the default certificate
[debug] [ADB] Command 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' not found. Is it installed?
[ADB] Using 'zipalign.exe' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\zipalign.exe'
[debug] [ADB] C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk' is already zip-aligned. Doing nothing
[debug] [ADB] Signing 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk' with default cert
[debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar sign --key C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\keys\testkey.pk8 --cert C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\keys\testkey.x509.pem C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[ADB] Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' not found. Is it installed?
[debug] [ADB] Starting sign.jar: 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' -jar C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\jars\sign.jar C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk --override
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop net.slideshare.mobile'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp:8200'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_pre_p_apps'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_p_apps'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy'
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1587040347526 (18:02:27 GMT+0530 (India Standard Time))
[debug] [W3C] Encountered internal error running command: Error: Could not sign with default certificate. Original error Command 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' not found. Is it installed?
[debug] [W3C] at ADB.signWithDefaultCert (C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-signing.js:81:13)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 4968 ms - 867

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

@essplqaprojects It seems your first issue has been resolved which was regarding "It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible"

Please upvote the answer if it helped to solve the issue. It will be beneficial for others as well facing same issue. Thank you!

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

@essplqaprojects You are getting the below error as per logs.
" Error: Could not sign with default certificate. Original error Command 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' not found. Is it installed?"

Try starting Appium as administrator on your windows machine then rerun the test.

from mobileautomationframework.

essplqaprojects avatar essplqaprojects commented on May 29, 2024
  1. Getting below error message in cmd while running it as administrator.
  2. apk is installed on my virtual mobile but its not opening
  3. in eclipse same error is showing : "It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible"

please guide me @shankybnl brother

[HTTP] {"desiredCapabilities":{"app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","noReset":false,"automationName":"UiAutomator2","platformName":"Android","deviceName":"Android Emulator"},"capabilities":{"alwaysMatch":{"appium:app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appium:appActivity":"net.slideshare.mobile.ui.SplashActivity","appium:appPackage":"net.slideshare.mobile","appium:automationName":"UiAutomator2","appium:deviceName":"Android Emulator","appium:noReset":false,"platformName":"android"},"firstMatch":[{}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","noReset":false,"automationName":"UiAutomator2","platformName":"Android","deviceName":"Android Emulator"},null,{"alwaysMatch":{"appium:app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appium:appActivity":"net.slideshare.mobile.ui.SplashActivity","appium:appPackage":"net.slideshare.mobile","appium:automationName":"UiAutomator2","appium:deviceName":"Android Emulator","appium:noReset":false,"platformName":"android"},"firstMatch":[{}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1587101433881 (11:00:33 GMT+0530 (India Standard Time))
[Appium] Appium v1.17.1-beta.0 creating new AndroidUiautomator2Driver (v1.49.0) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "platformName": "android",
[debug] [BaseDriver] "appium:app": "D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk",
[debug] [BaseDriver] "appium:appActivity": "net.slideshare.mobile.ui.SplashActivity",
[debug] [BaseDriver] "appium:appPackage": "net.slideshare.mobile",
[debug] [BaseDriver] "appium:automationName": "UiAutomator2",
[debug] [BaseDriver] "appium:deviceName": "Android Emulator",
[debug] [BaseDriver] "appium:noReset": false
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 59f4fe23-7cc1-4cb8-ac62-d9495db69f78
[BaseDriver] Using local app 'D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk'
[debug] [UiAutomator2] Checking whether app is actually present
[ADB] Using 'adb.exe' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb.exe' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 28
[ADB] Getting device platform version
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 9
[debug] [ADB] Device API level: 28
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.1.0' >= '3.1.0')
[debug] [ADB] There is no need to install/upgrade 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android:mock_location allow'
[debug] [Logcat] Starting logcat capture
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] 'io.appium.uiautomator2.server' is installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.6.4' >= '4.6.4')
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [ADB] Checking app cert for C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.6.4.apk
[ADB] Using 'apksigner.jar' from 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar'
[debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar verify --print-certs C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.6.4.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=[email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.6.4.apk' is signed with the default certificate
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] Checking app cert for C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar verify --print-certs C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=[email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[UiAutomator2] Server packages are not going to be (re)installed
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[debug] [ADB] Checking app cert for D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk
[debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-13.0.2\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\debasismohanty\AppData\Local\Android\Sdk\build-tools\29.0.3\lib\apksigner.jar verify --print-certs D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: CN=Android Debug, O=Android, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: bfa42ed7d62ca22d86db115902fa06f52c4f9d588c8c40d5206ee44354e48093
[debug] [ADB] Signer #1 certificate SHA-1 digest: 5a6466898b82605b1588cd30ae11694fbd4625e3
[debug] [ADB] Signer #1 certificate MD5 digest: 80c3112fb42aa268761658fb1c23c913
[debug] [ADB]
[debug] [ADB] 'D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk' is signed with a non-default certificate
[debug] [ADB] Getting install status for net.slideshare.mobile
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package net.slideshare.mobile'
[debug] [ADB] 'net.slideshare.mobile' is not installed
[debug] [ADB] App 'D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk' is not installed
[debug] [ADB] Installing 'D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 features'
[ADB] The application at 'D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 install D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk'
[ADB] The installation of 'am.apk' took 3644ms
[debug] [ADB] Install command stdout: Performing Streamed Install
[debug] [ADB] Success
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 4.6.4
[UiAutomator2] Using UIAutomator2 server from 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.6.4.apk' and test from 'C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with unknown status: {"code":"ECONNRESET"}
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with unknown status: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with unknown status: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"ready":true,"message":"UiAutomator2 Server is ready to accept commands"}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 4365ms
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","automationName":"UiAutomator2","deviceName":"Android Emulator","noReset":false},"platformName":"android","app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","automationName":"UiAutomator2","deviceName":"emulator-5554","noReset":false,"deviceUDID":"emulator-5554"}],"alwaysMatch":{}}}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"2bca7096-4101-4ad1-8760-9acbb27a1b0c","value":{"sessionId":"2bca7096-4101-4ad1-8760-9acbb27a1b0c","capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","automationName":"UiAutomator2","deviceName":"Android Emulator","noReset":false},"platformName":"android","app":"D:\git\MobileAutomationFramework-master\src\main\java\app\am.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","automationName":"UiAutomator2","deviceName":"emulator-5554","noReset":false,"deviceUDID":"emulator-5554"}],"alwaysMatch":{}}}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/2bca7096-4101-4ad1-8760-9acbb27a1b0c/appium/device/info] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"2bca7096-4101-4ad1-8760-9acbb27a1b0c","value":{"androidId":"2b23680ff2207f1f","manufacturer":"Google","model":"AOSP on IA Emulator","brand":"google","apiVersion":"28","platformVersion":"9","carrierName":"Android","realDisplaySize":"480x800","displayDensity":240,"networks":[{"type":0,"typeName":"MOBILE","subtype":13,"subtypeName":"LTE","isConnected":true,"detailedState":"CONNECTED","state":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isFailover":false,"isRoaming":false,"capabilities":{"transportTypes":"TRANSPORT_CELLULAR","networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_IA,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","linkUpstreamBandwidthKbps":51200,"linkDownBandwidthKbps":102400,"sig...
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'net.slideshare.mobile/net.slideshare.mobile.ui.SplashActivity and waiting for 'net.slideshare.mobile/net.slideshare.mobile.ui.SplashActivity'
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n net.slideshare.mobile/net.slideshare.mobile.ui.SplashActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] We tried to start an activity that doesn't exist, retrying with '.net.slideshare.mobile.ui.SplashActivity' activity name
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n net.slideshare.mobile/.net.slideshare.mobile.ui.SplashActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/2bca7096-4101-4ad1-8760-9acbb27a1b0c] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"2bca7096-4101-4ad1-8760-9acbb27a1b0c","value":null}
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop net.slideshare.mobile'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp:8200'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running 'C:\Users\debasismohanty\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1587101448549 (11:00:48 GMT+0530 (India Standard Time))
[debug] [W3C] Encountered internal error running command: Error: Cannot start the 'net.slideshare.mobile' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'net.slideshare.mobile' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name '.net.slideshare.mobile.ui.SplashActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
[debug] [W3C] at ADB.startApp (C:\Users\debasismohanty\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:165:11)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 14677 ms - 1711
[HTTP]
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 4.108
[debug] [Instrumentation]
[debug] [Instrumentation] OK (1 test)
[debug] [Instrumentation] The process has exited with code 0

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

Please share the following information:

  1. Command to execute the tests.
  2. Have you installed the .apk file from internet or installed automatically by appium during execution?

from mobileautomationframework.

essplqaprojects avatar essplqaprojects commented on May 29, 2024

@shankybnl bro

can you please explain the execution flow and its components. how the process executes

from mobileautomationframework.

debasismohanty avatar debasismohanty commented on May 29, 2024
  1. Command to execute the tests.
  2. Have you installed the .apk file from internet or installed automatically by appium during execution?
  1. Through "CucumberRunnerUtil.java" i execute my test using junit/testNG
  2. i got a ".apk" file from my friend

while i run the appium server from cmd line and run the CucumberRunnerUtil.java - runner class apk installed into my emulator but not opening

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

@debasismohanty : Kindly don't install any other Slideshare apk version to execute sample test. As error message says "'.net.slideshare.mobile.ui.SplashActivity' used to start the app doesn't exist or cannot be launched!" It could be possible that latest version of apk has different SplashActivity.

Uninstall the apk installed in your emulator and rerun the tests. Apk is already present in the codebase in the "app" folder and it will be installed automatically before the execution of test. Please give it a try.

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

@shankybnl bro

can you please explain the execution flow and its components. how the process executes

It is explained in README.md file of the project. Kindly go through it and let me know if you have any specific queries.

from mobileautomationframework.

debasismohanty avatar debasismohanty commented on May 29, 2024

from mobileautomationframework.

debasismohanty avatar debasismohanty commented on May 29, 2024

Hi Shanky bro,
While I debug I found the issue on below .
src/main/javacucumberIntegrationTests package    --------->  package
CreateSessionCucumber.java class    --------->  class
androidDriver                    ----------------------->  Method     (public synchronized void androidDriver(String buildPath, Method methodName) throws MalformedURLException{ )
driver = new AndroidDriver(new URL("http://localhost:4723/wd/hub"), capabilities); ------->> Error on this line
app is installed but unable to launch
@shankybnl proper execution flow not getting from that readme.md . therer i got the description of each components.

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

@debasismohanty : As discussed, for the below error:

[UIAutomator2] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner} from pid=14289, uid=14289 not allowed because package io.appium.uiautomator2.server.test does not have a signature matching the target io.appium.uiautomator2.server

Execute below commands and retry:
adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test

from mobileautomationframework.

debasismohanty avatar debasismohanty commented on May 29, 2024

@shankybnl issue resolved . Its working fine.

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

Good to hear that. Please upvote the answers that helped you to solve the issue. It will help others as well. Happy testing!

from mobileautomationframework.

princeprakash17 avatar princeprakash17 commented on May 29, 2024

Hi Sanky,
I"m getting same same error as mentioned in the Issue Header. Earlier it was working fine, only issue was unable to login in app,but once i downloaded the latest apk file of slideshare,i started getting this error then i moved back to old apk file.but issue still persist.
I tried Suggested approach, but due to some reason,i couldn't be able to run from cmd.i'm using Appium GUI.kindly provide some suggestion.i have already gone the above troubleshoot approach

Console error:-
org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'

  Driver info: driver.version: AndroidDriver
  	at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:195)
  	at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209)
  	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
  	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
  	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
  	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
  	at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
  	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
  	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
  	at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
  	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
  	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
  	at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:93)
  	at cucumberIntegrationTests.CreateSessionCucumber.androidDriver(CreateSessionCucumber.java:146)
  	at cucumberIntegrationTests.CreateSessionCucumber.createDriver(CreateSessionCucumber.java:107)
  	at cucumberIntegrationTests.stepDefinitions.common.BaseSteps.userHasSlideshareApp(BaseSteps.java:23)
  	at ?.Given User has slideshare "android" app(LoginTest.feature:5)
  Caused by: java.lang.reflect.InvocationTargetException
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:498)
  	at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:185)
  	at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209)
  	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
  	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
  	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
  	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
  	at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
  	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
  	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
  	at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
  	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
  	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)

Appiumlog Error-
[Appium] Welcome to Appium v1.15.1
[Appium] Non-default server args:
[Appium] allowInsecure: {
[Appium] }
[Appium] denyInsecure: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"C:\Users\80833\Desktop\MobileAutomationFramework-master\MobileAutomationFramework-master\src\main\java\app\SSapp.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","noReset":false,"automationName":"UiAutomator2","name":"userHasSlideshareApp","platformName":"Android","deviceName":"Android Emulator"},"capabilities":{"alwaysMatch":{"appium:app":"C:\Users\80833\Desktop\MobileAutomationFramework-master\MobileAutomationFramework-master\src\main\java\app\SSapp.apk","appium:appActivity":"net.slideshare.mobile.ui.SplashActivity","appium:appPackage":"net.slideshare.mobile","appium:automationName":"UiAutomator2","appium:deviceName":"Android Emulator","name":"userHasSlideshareApp","appium:noReset":false,"platformName":"android"},"firstMatch":[{}]}}
[W3C] Calling AppiumDriver.createSession() with args: [{"app":"C:\Users\80833\Desktop\MobileAutomationFramework-master\MobileAutomationFramework-master\src\main\java\app\SSapp.apk","appActivity":"net.slideshare.mobile.ui.SplashActivity","appPackage":"net.slideshare.mobile","noReset":false,"automationName":"UiAutomator2","name":"userHasSlideshareApp","platformName":"Android","deviceName":"Android Emulator"},null,{"alwaysMatch":{"appium:app":"C:\Users\80833\Desktop\MobileAutomationFramework-master\MobileAutomationFramework-master\src\main\java\app\SSapp.apk","appium:appActivity":"net.slideshare.mobile.ui.SplashActivity","appium:appPackage":"net.slideshare.mobile","appium:automationName":"UiAutomator2","appium:deviceName":"Android Emulator","name":"userHasSlideshareApp","appium:noReset":false,"platformName":"android"},"firstMatch":[{}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1620131822640 (18:07:02 GMT+0530 (India Standard Time))
[BaseDriver] The capabilities ["name"] are not standard capabilities and should have an extension prefix
[Appium] Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] "alwaysMatch": {
[BaseDriver] "appium:name": "userHasSlideshareApp",
[BaseDriver] "platformName": "android",
[BaseDriver] "appium:app": "C:\Users\80811\Desktop\MobileAutomationFramework-master\MobileAutomationFramework-master\src\main\java\app\SSapp.apk",
[BaseDriver] "appium:appActivity": "net.slideshare.mobile.ui.SplashActivity",
[BaseDriver] "appium:appPackage": "net.slideshare.mobile",
[BaseDriver] "appium:automationName": "UiAutomator2",
[BaseDriver] "appium:deviceName": "Android Emulator",
[BaseDriver] "appium:noReset": false
[BaseDriver] },
[BaseDriver] "firstMatch": [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] name
[BaseDriver] Session created with session id: 564118dd-8c0c-462d-a47d-45b2c603f418
[BaseDriver] Using local app 'C:\Users\80833\Desktop\MobileAutomationFramework-master\MobileAutomationFramework-master\src\main\java\app\SSapp.apk'
[UiAutomator2] Checking whether app is actually present
[ADB] Found 2 'build-tools' folders under 'C:\Users\808477\AppData\Local\Android\Sdk' (newest first):
[ADB] C:/Users/808477/AppData/Local/Android/Sdk/build-tools/30.0.3
[ADB] C:/Users/808477/AppData/Local/Android/Sdk/build-tools/24.0.1
[ADB] Using 'adb.exe' from 'C:\Users\808477\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] Connected devices: [{"udid":"emulator-5554","state":"device"},{"udid":"emulator-5556","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb.exe' from 'C:\Users\808477\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[ADB] Setting device id to emulator-5554
[ADB] Running 'C:\Users\808477\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[UiAutomator2] Deleting UiAutomator2 session
[ADB] Running 'C:\Users\80833\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop net.slideshare.mobile'
[UiAutomator2] Unable to force stop app: Error executing adbExec. Original error: 'Command 'C:\Users\80833\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop net.slideshare.mobile' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running 'C:\Users\80833\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp:8200'
[UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command 'C:\Users\80833\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp:8200' exited with code 1'; Stderr: 'adb.exe: error: listener 'tcp:8200' not found'; Code: '1''
[ADB] Running 'C:\Users\80833\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[BaseDriver] Event 'newSessionStarted' logged at 1620131895064 (18:08:15 GMT+0530 (India Standard Time))
[W3C] Encountered internal error running command: Error: Error getting device API level. Original error: Error executing adbExec. Original error: 'Command 'C:\Users\808477\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability
[W3C] at ADB.getApiLevel (C:\Users\80833\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\adb-commands.js:106:13)
[HTTP] <-- POST /wd/hub/session 500 72525 ms - 1418
[HTTP]

from mobileautomationframework.

princeprakash17 avatar princeprakash17 commented on May 29, 2024

Issue was with slideshare apps. i tried with another Appdemo app..it is working fine.

from mobileautomationframework.

shankybnl avatar shankybnl commented on May 29, 2024

Good to hear it is working fine with another app. I used the SlideShare app for examples and it's version is old. Hence might be giving the problem.

Happy Testing!

from mobileautomationframework.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.