Unable to start application for mobile testing

Hello guys, I’m trying to run mobile (android) recording but encountered error - Unable to start application, unable to create a new remote session. I’m using the below:
a) Katalon Studio Enterprise (Trial) Version 9.4.0
b) node - v20.12.2
c) npm - v 2.5.4
d) appium - v 2.5.4
e) java -v 1.8.0_202
Any idea what is the issue pls?

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi,

Welcome to our community. Thank you for letting us know your problem. Can you please share any available error log (Help -> Error Log) and screenshot / video recording so that people can better understand and investigate it? Thank you!

java.util.concurrent.ExecutionException: 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: Error executing adbExec. Original error: ‘Command ‘C:\Users\csliew\.katalon\tools\android_sdk\platform-tools\adb.exe -P 5037 -s R5CRC0MPJHY shell cmd package list packages’ exited with code 255’; Command output:
Exception occurred while executing ‘list’:
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:15877 android.app.ActivityManager.handleIncomingUser:5132 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15877)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5132)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7084)
at android.os.Binder.shellCommand(Binder.java:1104)
at android.os.Binder.onTransact(Binder.java:914)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7068)
at android.os.Binder.execTransactInternal(Binder.java:1380)
at android.os.Binder.execTransact(Binder.java:1311)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘PF43LSDH’, ip: ‘100.2.4.177’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\csliew\.katalon\tools\android_sdk\platform-tools\adb.exe -P 5037 -s R5CRC0MPJHY shell cmd package list packages’ exited with code 255’; Command output:
Exception occurred while executing ‘list’:
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:15877 android.app.ActivityManager.handleIncomingUser:5132 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15877)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5132)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7084)
at android.os.Binder.shellCommand(Binder.java:1104)
at android.os.Binder.onTransact(Binder.java:914)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7068)
at android.os.Binder.execTransactInternal(Binder.java:1380)
at android.os.Binder.execTransact(Binder.java:1311)

at getResponseForW3CError (C:\Users\csliew\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1145:9)
at asyncHandler (C:\Users\csliew\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:491:57)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘PF43LSDH’, ip: ‘100.2.4.177’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: SwipeableAndroidDriver
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)
at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12.run(MobileLocalAppComposite.java:488)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: 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: Error executing adbExec. Original error: ‘Command ‘C:\Users\csliew\.katalon\tools\android_sdk\platform-tools\adb.exe -P 5037 -s R5CRC0MPJHY shell cmd package list packages’ exited with code 255’; Command output:
Exception occurred while executing ‘list’:
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:15877 android.app.ActivityManager.handleIncomingUser:5132 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15877)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5132)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7084)
at android.os.Binder.shellCommand(Binder.java:1104)
at android.os.Binder.onTransact(Binder.java:914)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7068)
at android.os.Binder.execTransactInternal(Binder.java:1380)
at android.os.Binder.execTransact(Binder.java:1311)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘PF43LSDH’, ip: ‘100.2.4.177’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\csliew\.katalon\tools\android_sdk\platform-tools\adb.exe -P 5037 -s R5CRC0MPJHY shell cmd package list packages’ exited with code 255’; Command output:
Exception occurred while executing ‘list’:
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:15877 android.app.ActivityManager.handleIncomingUser:5132 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15877)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5132)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7084)
at android.os.Binder.shellCommand(Binder.java:1104)
at android.os.Binder.onTransact(Binder.java:914)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7068)
at android.os.Binder.execTransactInternal(Binder.java:1380)
at android.os.Binder.execTransact(Binder.java:1311)

at getResponseForW3CError (C:\Users\csliew\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1145:9)
at asyncHandler (C:\Users\csliew\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:491:57)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘PF43LSDH’, ip: ‘100.2.4.177’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: SwipeableAndroidDriver
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 com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:85)
at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.(SwipeableAndroidDriver.java:23)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:560)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:542)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:467)
at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startExistingApp(MobileInspectorController.java:146)
at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.smartStartAndroidApp(MobileLocalAppComposite.java:554)
at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.smartStartApp(MobileLocalAppComposite.java:523)
at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12$1.call(MobileLocalAppComposite.java:494)
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.startThreadAndWait(ProgressMonitorDialogWithThread.java:36)
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:48)
… 2 more
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 24 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\csliew\.katalon\tools\android_sdk\platform-tools\adb.exe -P 5037 -s R5CRC0MPJHY shell cmd package list packages’ exited with code 255’; Command output:
Exception occurred while executing ‘list’:
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:15877 android.app.ActivityManager.handleIncomingUser:5132 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15877)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5132)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7084)
at android.os.Binder.shellCommand(Binder.java:1104)
at android.os.Binder.onTransact(Binder.java:914)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7068)
at android.os.Binder.execTransactInternal(Binder.java:1380)
at android.os.Binder.execTransact(Binder.java:1311)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘PF43LSDH’, ip: ‘100.2.4.177’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\csliew\.katalon\tools\android_sdk\platform-tools\adb.exe -P 5037 -s R5CRC0MPJHY shell cmd package list packages’ exited with code 255’; Command output:
Exception occurred while executing ‘list’:
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:15877 android.app.ActivityManager.handleIncomingUser:5132 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15877)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5132)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7084)
at android.os.Binder.shellCommand(Binder.java:1104)
at android.os.Binder.onTransact(Binder.java:914)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7068)
at android.os.Binder.execTransactInternal(Binder.java:1380)
at android.os.Binder.execTransact(Binder.java:1311)

at getResponseForW3CError (C:\Users\csliew\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1145:9)
at asyncHandler (C:\Users\csliew\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:491:57)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
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 org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
... 28 more

Hi,

Your problem here is a security issue. I found this reference: applications - Getting "java.lang.SecurityException: Shell does not have permission to access user 150" when uninstalling apps from Samsung Secure folder using ADB - Android Enthusiasts Stack Exchange or Expo run:android fails when deploying on Galaxy device with secure folder · Issue #26111 · expo/expo · GitHub please take a look. If these are not your device, please research this error on the Internet. Thank you

Thanks for the feedback, Elly_Tran. Appreciate it.