-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appium Settings app is not running after 5000ms #14209
Comments
Did you try to investigate the logcat output? Are there any exceptions? Is the process present in the |
Please let me know how to get logcat output? I provided you whole logs which i was getting in command line after starting the appium server. |
As per this link I updated my code: package SampleProject; import java.io.IOException; import org.openqa.selenium.logging.LogEntries; import io.appium.java_client.AppiumDriver; public class AppiumTest {
} Console Output: Line 54 is below in code ( SampleProject.AppiumTest.captureLogcat(AppiumTest.java:54))
java.lang.NullPointerException |
this won't work because the driver cannot be created if session init fails. You must use adb to collect the logcat output |
I ran command "adb logcat" and getting big response in cmd console I copied few lines, please find below: cmd console log: 04-21 18:24:12.922 13687 13828 E QTagParser: Error reading from /proc/net/xt_qtaguid/stats. Please check if this file exists. |
Please get the logcat output for the time period when the test fails. Also, please don't copypaste it here, but rather attach as GIST |
I don't observe any crashes in the logcat output. What |
adb shell pgrep -f io.appium.settings --> Not returning anything in cmd console. adb shell ps --> returning many lines in cmd console. Please find attached txt file for details. |
The ps output does not contain Unfortunately here I cannot suggest nothing else except of changing the device under test. It is just probably not good for automation purposes. |
As you told I shifted to another device i.e. realmeU1, however for that device 'm getting error then I followed below link and currently i am not able to proceed with mobile appium automation in my realme device |
You could set IMHO all these phones with customised firmware and artificial security limitations create more and more obstacles to automated tests rather than really helping with anything. Consider using devices with minimally altered firmwares or devices which at least have a possibility to control such manufacturer settings. |
What should I added ignoreHiddenApiPolicyError in my capabilities. caps.setCapability("ignoreHiddenApiPolicyError", "true"); Is it correct, if not then please suggest the right way. |
|
It didn't work. |
The capability works over appium-android-driver@4.27.0+. (Appium 1.17.0 does not have it yet) |
Closed as third party issue |
Tried with the same code, this worked for me! |
Hello, you can try this. It worked for me and many other people. adb uninstall io.appium.settings |
@mykola-mokhnach we could add a driver script to the uiauto2 driver that clears these things out. so users can simply run |
I am facing an issue while executing my appium test script.
I am getting an error "Appium Settings app is not running after 5000ms" error, I couldn't fix this issue after reading forums then I uninstalled android studio, node.js, appium and again reinstalled everything but still 'm getting same issue while running my appium script.
Below version is installed in my system
Android studio version: 3.6.2
Node version: v13.13.0
Npm version: 6.14.4
Appium version: Appium v1.17.0
I installed appium by below command, which mentioned in link (http://appium.io/)
npm install -g appium # get appium
npm install wd # get appium client
TestCase:
package SampleProject;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
public class AppiumTest {
public static void main(String[] args) {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "Brij");
caps.setCapability("udid", "ba5e03b");
caps.setCapability("platformName", "Android");
caps.setCapability("platformVersion", "9.0");
caps.setCapability("appPackage", "in.amazon.mShop.android.shopping");
caps.setCapability("appActivity", "com.amazon.mShop.home.HomeActivity");
caps.setCapability("noReset", "true");
}
Appium Error:
Encountered internal error running command: Error: Appium Settings app is not running after 5000ms
[debug] [W3C] at ADB.requireRunningSettingsApp (mylocalpath\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\settings-client-commands.js:70:11)
Complete Error Log:
[Appium] Welcome to Appium v1.17.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":"com.amazon.mShop.home.HomeActivity","appPackage":"in.amazon.mShop.android.shopping","noReset":"true","platformVersion":"9.0","platformName":"Android","udid":"ba5e03b","deviceName":"Brij"},"capabilities":{"firstMatch":[{"appium:appActivity":"com.amazon.mShop.home.HomeActivity","appium:appPackage":"in.amazon.mShop.android.shopping","appium:deviceName":"Brij","appium:noReset":"true","platformName":"android","appium:platformVersion":"9.0","appium:udid":"ba5e03b"}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.amazon.mShop.home.HomeActivity","appPackage":"in.amazon.mShop.android.shopping","noReset":"true","platformVersion":"9.0","platformName":"Android","udid":"ba5e03b","deviceName":"Brij"},null,{"firstMatch":[{"appium:appActivity":"com.amazon.mShop.home.HomeActivity","appium:appPackage":"in.amazon.mShop.android.shopping","appium:deviceName":"Brij","appium:noReset":"true","platformName":"android","appium:platformVersion":"9.0","appium:udid":"ba5e03b"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1587468149931 (16:52:29 GMT+0530 (India Standard Time))
[Appium]
[Appium] ======================================================================
[Appium] DEPRECATION WARNING:
[Appium]
[Appium] The 'automationName' capability was not provided in the desired
[Appium] capabilities for this Android session
[Appium]
[Appium] Setting 'automationName=UiAutomator2' by default and using the
[Appium] UiAutomator2 Driver
[Appium]
[Appium] The next major version of Appium (2.x) will require the
[Appium] 'automationName' capability to be set for all sessions on all
[Appium] platforms
[Appium]
[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] 'automationName=UiAutomator1'
[Appium]
[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add 'automationName=UiAutomator1' to your desired capabilities
[Appium]
[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] 'Drivers' menu
[Appium]
[Appium] ======================================================================
[Appium]
[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] "platformName": "android",
[debug] [BaseDriver] "appium:appActivity": "com.amazon.mShop.home.HomeActivity",
[debug] [BaseDriver] "appium:appPackage": "in.amazon.mShop.android.shopping",
[debug] [BaseDriver] "appium:deviceName": "Brij",
[debug] [BaseDriver] "appium:noReset": "true",
[debug] [BaseDriver] "appium:platformVersion": "9.0",
[debug] [BaseDriver] "appium:udid": "ba5e03b"
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Session created with session id: 24cdc388-1ca0-4fe8-ad47-5e0c2ad4d3ac
[UiAutomator2] Starting 'in.amazon.mShop.android.shopping' directly on the device
[ADB] Found 1 'build-tools' folders under 'myLocalPath\AppData\Local\Android\Sdk' (newest first):
[ADB] C:/Users/Qapitol/AppData/Local/Android/Sdk/build-tools/29.0.3
[ADB] Using 'adb.exe' from 'myLocalPath\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":"ba5e03b","state":"device"},{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: ba5e03b
[ADB] Using 'adb.exe' from 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] [ADB] Setting device id to ba5e03b
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 28
[ADB] Getting device platform version
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b 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 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell settings put global hidden_api_policy_pre_p_apps 1'
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell settings put global hidden_api_policy_p_apps 1'
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell settings put global hidden_api_policy 1'
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b wait-for-device'
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b 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 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b 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 'myLocalPath\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 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell 'pgrep --help; echo $?''
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Starting Appium Settings app
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b 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 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell pgrep -f io\.appium\.settings'
[debug] [AndroidDriver] Error: Appium Settings app is not running after 5000ms
[debug] [AndroidDriver] at ADB.requireRunningSettingsApp (myLocalPath\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\settings-client-commands.js:70:11)
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell am force-stop in.amazon.mShop.android.shopping'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell settings delete global hidden_api_policy_pre_p_apps'
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell settings delete global hidden_api_policy_p_apps'
[debug] [ADB] Running 'myLocalPath\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ba5e03b shell settings delete global hidden_api_policy'
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1587468158491 (16:52:38 GMT+0530 (India Standard Time))
[debug] [W3C] Encountered internal error running command: Error: Appium Settings app is not running after 5000ms
[debug] [W3C] at ADB.requireRunningSettingsApp (myLocalPath\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\settings-client-commands.js:70:11)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 8653 ms - 659
[HTTP]
The text was updated successfully, but these errors were encountered: