Chrome session kills appium session

Hello. I want to create two sessions on the same android device. Firstly, i launched two instances of appium server on 4723 and 4724 ports, also i defined the same uid for both instances. Then, i successfully created new appium session for Android on port 4723. After that, i created session for chrome mobile browser on port 4724, but unfortunately, first appium session was closed with the next log:

[debug] UiAutomator exited
[debug] executing cmd: D:\Software\Android\android-sdk\platform-tools\adb.exe -s 4d0
4f5021c7 shell “echo ‘ping’”
[debug] Attempting to uninstall app
[debug] Not uninstalling app since server not started with --full-reset
[debug] Cleaning up android objects
[debug] Cleaning up appium session

Is it possible to create two session (for Android and for chrome browser) separately on the same device?
Thanks in advance.

Getting the same issue

No you can’t do that. What is the use case?

For example, in test case i should perform some actions with mobile ui, then i should start mobile chrome with some specified URL, get some text info and return to mobile app.
Generally i want to have possibility to switch between mobile application and chrome browser during one test.

@0x1mason my use case is this:

On a music app I can add a music service
Part of this is done via the native app
The native app then presents a link which, when tapped, takes you to a web browser.
On the web browser, you enter your credentials for the music service and allow the two to be linked
You are then returned to the native app at the exact same point you left, and you complete the process.

I need to be able to do this on Android and iOS

Does that make sense?

We have the start activity feature that might allow you to achieve the same thing.

Cool, I will give this a try. Thanks for the help.

@0x1mason your suggestion, and the stopAppOnReset flag has sorted me out… thanks

That’s great to hear!