'Unable to start application on this device:Unable to create a new remote session' error occurs when selecting Start on Mobile Recorder or Mobile Objects Spy

Hi,

I am not able to use mobile recorder or mobile object spy, I got this error message ‘Unable to start application on this device:Unable to create a new remote session’. please see the screenshot and log, can someone help me?


katalon mobile error log .txt (55.9 KB)

Thanks,
Tina

Hi @tinachen8998,

If you upgrade Appium from an old version, please follow this tweak:

You can also add these desired capabilities in Project Settings/Desired Capabilities/Mobile/Android:

appWaitActivity: com.temenos.edgehybrid.EdgeActivity
appWaitPackage: com.temenos.retailmobile.uat


then run the Spy/Record again.

Hi @duyluong,

Thank you very much for your help. No luck this time, I still received the same error message when I try to use mobile recorder or mobile object spy.


Mobile error log 16082019.txt (64.7 KB)

Hi @tinachen8998,

Can you share us your apk file and what Appium version are you using?

Thanks

Hi @duyluong,
Appium has been installed in this directory: C:\Users\chen\AppData\Roaming\npm\node_modules\appium
Appium version number is 1.12.1
I am so sorry based on my workplace security policy I am unable to share the apk file, I hope you can understand.

Thanks,
Tina

Hi @tinachen8998,

We understand your problem. We asked for .apk file to make sure the problem didn’t come from your .apk file. Another solution: You should update Katalon Studio to v6.3.2 and try Start with Existing Application that means KS can start your installed app in your device.

Hi @duyluong,

I installed the Katalon Studio to v6.3.2 and also add desired capabilities in Project Settings/Desired Capabilities/Mobile/Android. Now I got error on "unable to start application Reason :Unable to create a new remote session. Please check the server log for more details. " when I use mobile recorder or mobile object spy. Any help will be much appreciate.
image
image

Select the details button:
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: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘xxxx’, ip: xxxx, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘xxxxx’, ip: xxxx, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
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:474)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
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: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: 'xxxxxx’, ip: ‘xxxxx’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘XXXXXX’, ip: ‘xxxxxx’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
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:24)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:497)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:479)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startLocalMobileDriver(MobileDriverFactory.java:460)
at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startMobileApp(MobileInspectorController.java:191)
at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12$1.call(MobileLocalAppComposite.java:479)
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 io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 22 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘xxxx’, ip: 'xxxx, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\userAppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
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)
… 23 more

event log.txt (57.5 KB)

Hi @tinachen8998,

The startExistingApplication requires the application ID, not the application file. You should install the apk to your device and use the application ID.
For Android, the application ID is the package name. In your case, the application ID should be: com.temenos.retailmobile.uat

Thanks

Hi @duyluong,

I got the same error but I think we have moved one step forward.


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: Cannot start the ‘com.android.settings’ application. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting. Original error: ‘com.temenos.edgehybrid.EdgeActivity’ or ‘com.temenos.retailmobile.uat.com.temenos.edgehybrid.EdgeActivity’ never started. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘XXXX’, ip: ‘XXXX’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.android.settings’ application. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting. Original error: ‘com.temenos.edgehybrid.EdgeActivity’ or ‘com.temenos.retailmobile.uat.com.temenos.edgehybrid.EdgeActivity’ never started. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting
at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘XXXX’, ip: ‘XXXX’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
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:474)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
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: Cannot start the ‘com.android.settings’ application. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting. Original error: ‘com.temenos.edgehybrid.EdgeActivity’ or ‘com.temenos.retailmobile.uat.com.temenos.edgehybrid.EdgeActivity’ never started. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘XXXX’, ip: ‘XXXX’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.android.settings’ application. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting. Original error: ‘com.temenos.edgehybrid.EdgeActivity’ or ‘com.temenos.retailmobile.uat.com.temenos.edgehybrid.EdgeActivity’ never started. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting
at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘XXXX’, ip: ‘XXXX’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
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:24)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:497)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:479)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:341)
at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startExistingApp(MobileInspectorController.java:138)
at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12$1.call(MobileLocalAppComposite.java:482)
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 io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 22 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.android.settings’ application. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting. Original error: ‘com.temenos.edgehybrid.EdgeActivity’ or ‘com.temenos.retailmobile.uat.com.temenos.edgehybrid.EdgeActivity’ never started. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘XXXX’, ip: ‘XXXX’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.android.settings’ application. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting. Original error: ‘com.temenos.edgehybrid.EdgeActivity’ or ‘com.temenos.retailmobile.uat.com.temenos.edgehybrid.EdgeActivity’ never started. Visit appium/activity-startup.md at master · appium/appium · GitHub for troubleshooting
at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
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)
… 23 more

LOG.txt (61.5 KB)

@duyluong: Thank you very much, it is working for Katalon Studio V6.2.2

@duyluong I got the similar error when using Keyword “Mobile.startExistingApplication” ;

CONFIG : Android9 KS7.2.6 Appium 1.16.0

appium.log (18.9 KB)

Hi,
Even i’m facing same issue when selecting start on mobile recorder or Mobile Objects Spy,
Mobile device: Vivo s1 Android version 9
Appium version: 1.17.1
npm version : 6.14.7
node : v10.16.3
Katalon studio: 7.6.2

Hi, despite the weather I think it might be useful for someone…

In my case, I used a device and with it connected to the notebook I accessed the folder ‘Android → Data’ and deleted the folder ‘io.appium.uiautomator2.server.’

I asked him to run Recorder Mobile again and it started working again.

image