Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘RANA’, ip: ‘192.168.10.4’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘15.0.2’
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
at getResponseForW3CError (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolerrors.js:804:9)
at asyncHandler (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolprotocol.js:380:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘RANA’, ip: ‘192.168.10.4’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘15.0.2’
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
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:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
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:95)
at Calculator.main(Calculator.java:30)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 13 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘RANA’, ip: ‘192.168.10.4’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘15.0.2’
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
at getResponseForW3CError (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolerrors.js:804:9)
at asyncHandler (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolprotocol.js:380:37)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
… 18 more
Source: Read More