Trying to switch to custom chrome tab from native app causes the chrome instance to crash

Hello,
In my application, when an user clicks on a button of a web view, it opens a page in a custom chrome instance(note this is not a web view but a separate chrome instance is opened).
I am trying to automate this with appium + webdriverIO but facing a challenge. The webview part is working fine but unable to get the custom chrome instance interaction working.
As I found in most of the articles online, they suggested to create a new instance of remote (i.e. WebDriverIO) with proper Android + Chrome related capabilties to be able to interact with this custom chrome instance.
I did so with below piece of code

//code to interact with webview using a separate driver. This part works fine

//new driver to interact with custom chrome instance
const chromeDriver = await remote({
        hostname: "localhost",
        port: 4723,
        capabilities: {
            platformName: "Android",
            "appium:deviceName": "Pixel_9_API_35",
            "appium:automationName": "UiAutomator2",
            browserName: "chrome",
            "appium:chromedriverExecutable": "Path to correct chromedriver version",
            "goog:chromeOptions": {
                    androidPackage: "com.android.chrome",
                    androidUseRunningApp: true,  // Connect to the already running instance
                    w3c: false

                } as any,
        }
    });

However, as soon as this chromedriver is initialized, the chrome instance in the emulator on which the desired url was opened closes(crashes)
Below message is what I see in the appium logs
DEBUG @wdio/appium-service: [727f3913][AndroidUiautomator2Driver@435d] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:INSTRUMENTATION_RESULT: shortMsg=Process crashed.

Is there a way I can get it to work? Any pointers would really be helpful

Thanks!

Use logcat to get the crash error. You can post it here but might need help from your developers to see what’s really going on here.

Thanks @wreed for the reply.
Attaching the logcat logs. I have only kept logs containing appium or chrome, as the size was getting too big.
device_logs.txt (1.6 MB)
In case you find something. Will also take help from our developers and try to get more info.

Regards,
Nishant Shah

Ok, is this the crash?

io.appium.uiautomator2.server.test/10216} → PackageSetting{b608d17 com.housinganywhere.app/10213} BLOCKED
02-20 20:35:27.743 571 2185 I AppsFilter: interaction: PackageSetting{3c73571 io.appium.settings/10207} → PackageSetting{b608d17 com.housinganywhere.app/10213} BLOCKED
02-20 20:35:35.870 571 2184 W ActivityManager: pid 8276 io.appium.uiautomator2.server sent binder code 1 with flags 2 to frozen apps and got error -32
02-20 20:35:35.891 8276 8290 E AndroidRuntime: Process: io.appium.uiautomator2.server, PID: 8276
02-20 20:35:35.907 571 954 I ActivityManager: Process io.appium.uiautomator2.server (pid 8276) has died: fg FGS
02-20 20:35:35.907 571 954 W ActivityManager: Crash of app io.appium.uiautomator2.server running instrumentation ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner}
02-20 20:35:35.908 571 8905 I ActivityManager: Failure reporting to instrumentation watcher: comp=ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner} results=Bundle[{shortMsg=Process crashed.}]

If your app is com.housinganywhere.app, I would want to know what process is BLOCKED and I’d bring this to the Devs. I don’t know your app so that’s about as deep as I can go.