Skip to content
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

Closed
helloAppium opened this issue Apr 21, 2020 · 22 comments
Closed

Appium Settings app is not running after 5000ms #14209

helloAppium opened this issue Apr 21, 2020 · 22 comments
Labels
Android related to Android-native driver(s) ThirdParty upstream problems

Comments

@helloAppium
Copy link

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");

    try {
        AppiumDriver<MobileElement> driver = new AndroidDriver<MobileElement>(new URL("http://0.0.0.0:4723/wd/hub"), caps);

    } catch (MalformedURLException e) {
        System.out.println(e.getMessage());
    }
}

}

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]

@mykola-mokhnach mykola-mokhnach added the Needs Info typically non-actionable; needs author to respond label Apr 21, 2020
@mykola-mokhnach
Copy link
Collaborator

mykola-mokhnach commented Apr 21, 2020

Did you try to investigate the logcat output? Are there any exceptions?

Is the process present in the pgrep output if executed manually? How about the ps output?

@helloAppium
Copy link
Author

Please let me know how to get logcat output?
The script I was trying to automate from my redmi note 5 pro device.

I provided you whole logs which i was getting in command line after starting the appium server.

@mykola-mokhnach
Copy link
Collaborator

@mykola-mokhnach
Copy link
Collaborator

@helloAppium
Copy link
Author

#14209 (comment)

As per this link I updated my code:

package SampleProject;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Set;
import java.util.stream.StreamSupport;

import org.openqa.selenium.logging.LogEntries;
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;
import org.testng.Assert;
import org.testng.annotations.Test;

import io.appium.java_client.AppiumDriver;
import org.junit.After;
import org.junit.Before;

public class AppiumTest {

AppiumDriver driver;

@Before
public void setUp() throws IOException {

    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");

    driver = new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), caps);
}


@After
public void tearDown() {
    try {
        driver.quit();
    } catch (Exception ign) {
    }
}


@Test
public void captureLogcat() throws NullPointerException{

    Set<String> logtypes = driver.manage().logs().getAvailableLogTypes();
    System.out.println("suported log types: " + logtypes.toString()); // [logcat, bugreport, server, client]

    LogEntries logs = driver.manage().logs().get("logcat");
    System.out.println("First and last ten lines of log: ");
    StreamSupport.stream(logs.spliterator(), false).limit(10).forEach(System.out::println);
    System.out.println("...");
    StreamSupport.stream(logs.spliterator(), false).skip(logs.getAll().size() - 10).forEach(System.out::println);

    try {
        Thread.sleep(5000);
    } catch (Exception ign) {
    } // pause to allow visual verification

    LogEntries secondCallToLogs = driver.manage().logs().get("logcat");
    System.out.println("\nFirst ten lines of next log call: ");
    StreamSupport.stream(secondCallToLogs.spliterator(), false).limit(10).forEach(System.out::println);

    Assert.assertNotEquals(logs.iterator().next(), secondCallToLogs.iterator().next());
}

}

Console Output:

Line 54 is below in code ( SampleProject.AppiumTest.captureLogcat(AppiumTest.java:54))

 Set<String> logtypes = driver.manage().logs().getAvailableLogTypes();

java.lang.NullPointerException
at SampleProject.AppiumTest.captureLogcat(AppiumTest.java:54)
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 org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:584)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.testng.TestRunner.privateRun(TestRunner.java:770)
at org.testng.TestRunner.run(TestRunner.java:591)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)
at org.testng.SuiteRunner.run(SuiteRunner.java:304)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)
at org.testng.TestNG.runSuites(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:1000)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:110)

@mykola-mokhnach
Copy link
Collaborator

this won't work because the driver cannot be created if session init fails. You must use adb to collect the logcat output

@helloAppium
Copy link
Author

helloAppium commented Apr 21, 2020

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.
04-21 18:24:12.918 13687 13687 W ParseThread: type=1400 audit(0.0:57350): avc: denied { read } for name="stats" dev="proc" ino=4026532802 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:proc_qtaguid_stat:s0 tclass=file permissive=0
04-21 18:24:13.136 15837 15837 F linker : CANNOT LINK EXECUTABLE "/system/bin/dpmd": "/system/lib64/libdpmframework.so" is 32-bit instead of 64-bit
04-21 18:24:13.929 13687 13828 E QTagParser: Error reading from /proc/net/xt_qtaguid/stats. Please check if this file exists.
04-21 18:24:13.918 13687 13687 W ParseThread: type=1400 audit(0.0:57351): avc: denied { read } for name="stats" dev="proc" ino=4026532802 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:proc_qtaguid_stat:s0 tclass=file permissive=0

@mykola-mokhnach
Copy link
Collaborator

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

@helloAppium
Copy link
Author

@mykola-mokhnach
Copy link
Collaborator

I don't observe any crashes in the logcat output. What adb shell pgrep -f io\.appium\.settings says if executed manually? What is the output of adb shell ps?

@helloAppium
Copy link
Author

helloAppium commented Apr 21, 2020

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.
adbshell_cmd_console_output.txt

@mykola-mokhnach
Copy link
Collaborator

The ps output does not contain io.appium.settings process in the list, which most likely means the app gets silently killed. Silently, because there are also no traces about that in the logcat output.

Unfortunately here I cannot suggest nothing else except of changing the device under test. It is just probably not good for automation purposes.

@mykola-mokhnach mykola-mokhnach added ThirdParty upstream problems Android related to Android-native driver(s) and removed Needs Info typically non-actionable; needs author to respond labels Apr 21, 2020
@helloAppium
Copy link
Author

helloAppium commented Apr 21, 2020

As you told I shifted to another device i.e. realmeU1, however for that device 'm getting error
"shell settings delete global hidden_api_policy_pre_p_apps' exited with code 255'; Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS"

then I followed below link and currently i am not able to proceed with mobile appium automation in my realme device
#13802

@mykola-mokhnach
Copy link
Collaborator

You could set ignoreHiddenApiPolicyError capability to workaround the error message above.

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.

@helloAppium
Copy link
Author

What should I added ignoreHiddenApiPolicyError in my capabilities.
It should be something like below:

caps.setCapability("ignoreHiddenApiPolicyError", "true");

Is it correct, if not then please suggest the right way.

@mykola-mokhnach
Copy link
Collaborator

caps.setCapability("ignoreHiddenApiPolicyError", true); is correct

@helloAppium
Copy link
Author

It didn't work.

@KazuCocoa
Copy link
Member

KazuCocoa commented Apr 24, 2020

The capability works over appium-android-driver@4.27.0+. (Appium 1.17.0 does not have it yet)
Please try out appium@beta

@mykola-mokhnach
Copy link
Collaborator

Closed as third party issue

@Kishorerksa
Copy link

caps.setCapability("ignoreHiddenApiPolicyError", true);

Tried with the same code, this worked for me!

@vacipderici
Copy link

Hello, you can try this. It worked for me and many other people.

adb uninstall io.appium.settings
adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test
adb uninstall io.appium.unlock

@jlipps
Copy link
Member

jlipps commented Jun 30, 2022

@mykola-mokhnach we could add a driver script to the uiauto2 driver that clears these things out. so users can simply run appium driver run uiautomator2 reset and we could document this as a troubleshooting technique.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android related to Android-native driver(s) ThirdParty upstream problems
Projects
None yet
Development

No branches or pull requests

6 participants