Unable to remove app using Appium in iOS device


#1

I’m recently working on iOS automation using Appium. I find issue while using removeApp function.
The error is that, they find error looking up for removeApp function. Any solutions?

FAILED CONFIGURATION: @AfterMethod tearDown
java.lang.NoSuchMethodError: io.appium.java_client.ios.IOSDriver.removeApp(Ljava/lang/String;)V


#2

@Arjun_P_S can you share the logs.


#3

FAILED CONFIGURATION: @AfterMethod tearDown
java.lang.NoSuchMethodError: io.appium.java_client.ios.IOSDriver.removeApp(Ljava/lang/String;)V
at appium_ios.cityvan.PoolRideTest.tearDown(PoolRideTest.java:185)
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:124)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)


#4

is your app bundle id is Ljava/lang/String;
the bundle id might be wrong, it’s looks suspicious.


#5

No. The bundle identifier which i had specified on the code is not this.


#6

which java client version you are using.?
there may be some issue with dependencies.it will be easy if u provide some more details like line of codes or dependencies


#7

public void tearDown() {
System.out.println(“Removing app from device”);
driver.removeApp(“com.cityvankw.pax.qc”);
System.out.println(“Removed”);

}


#8

java-client-2.1.0.jar


#9

try to upgrade java client 5.0.4 and perform the same.


#10

Thanks. Issue solved!!