After upgrading to 10.2, can't open Chrome Mobile

I updated both ChromeDriver and Chrome app on mobile to latest version, but bug still occurs.

Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: invalid argument: cannot parse capability: goog:chromeOptions

Then I ReRun on 10.1, code work OK

So I debug and see the reason is Katalon always auto adds this pref everytime I start existing app : profile.password_manager_leak_detection=false

10.2
User set preference: [‘goog:chromeOptions’, ‘{args=[–disable-popup-blocking, --disable-notifications], extensions=, prefs={profile.password_manager_leak_detection=false}}’]

10.1:
User set preference: [‘goog:chromeOptions’, ‘{args=[–disable-popup-blocking, --disable-notifications], extensions=}’]

My code to start Chrome on Mobile:

RunConfiguration.setMobileDriverPreferencesProperty('chromedriverExecutable', pathDriver)
RunConfiguration.setMobileDriverPreferencesProperty('browserName', 'Chrome')

Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put("args", Arrays.asList("--disable-popup-blocking", "--disable-notifications"))

RunConfiguration.setMobileDriverPreferencesProperty("goog:chromeOptions", chromeOptions)

Mobile.startExistingApplication(GlobalVariable.G_ANDROID_OMNI_PACKAGEID)

// use WebUI to continue test:
WebUI.openBrowser(Url)

Here’s full log:

Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: invalid argument: cannot parse capability: goog:chromeOptions
from invalid argument: unrecognized chrome option: prefs 
Host info: host: 'HCM-HMK-014', ip: '10.168.16.215'
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.14'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[Capabilities {appium:allowTestPackages: true, appium:appWaitActivity: *, appium:autoGrantPermissions: true, appium:automationName: uiautomator2, appium:browserName: chrome, appium:chromedriverExecutable: C:/Users/lamnt21/.katalon/p..., appium:deviceId: , appium:deviceName: HONOR CRT-LX2 (Android 14), appium:disableIdNamespace: true, appium:newCommandTimeout: 1800, appium:noReset: true, appium:platformVersion: 14, appium:udid: AH8M6R3616004440, appium:unlockKey: 147147, appium:unlockType: pin, goog:chromeOptions: {args: [--disable-popup-blocking, --disable-notifications], extensions: [], prefs: {profile.default_content_setting_values.notifications: 2}}, platformName: ANDROID}]}]
Capabilities {appium:allowTestPackages: true, appium:appWaitActivity: *, appium:autoGrantPermissions: true, appium:automationName: uiautomator2, appium:browserName: chrome, appium:chromedriverExecutable: C:/Users/lamnt21/.katalon/p..., appium:deviceId: , appium:deviceName: HONOR CRT-LX2 (Android 14), appium:disableIdNamespace: true, appium:newCommandTimeout: 1800, appium:noReset: true, appium:platformVersion: 14, appium:udid: AH8M6R3616004440, appium:unlockKey: 147147, appium:unlockType: pin, goog:chromeOptions: {args: [--disable-popup-blocking, --disable-notifications], extensions: [], prefs: {profile.default_content_setting_values.notifications: 2}}, platformName: ANDROID}```
1 Like

To resolve the Chrome Mobile session error in Katalon Studio 10.2 caused by the unrecognized prefs capability, follow these steps:

Solution: Remove prefs from ChromeOptions

The error occurs because Appium’s ChromeDriver on mobile does not support prefs in goog:chromeOptions. Modify your code to exclude prefs:

Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put("args", Arrays.asList("--disable-popup-blocking", "--disable-notifications"))

// Remove any references to 'prefs' (e.g., chromeOptions.put("prefs", ...))
// Also ensure no project-level Desired Capabilities are injecting 'prefs'

RunConfiguration.setMobileDriverPreferencesProperty("goog:chromeOptions", chromeOptions)

Why This Works

  • Appium Restriction: Mobile Chrome (via Appium) does not support prefs in goog:chromeOptions, unlike desktop Chrome.
  • Katalon 10.2 Behavior: Version 10.2 may auto-inject prefs (e.g., profile.password_manager_leak_detection=false) into capabilities, causing conflicts. Explicitly omitting prefs bypasses this.

Additional Fixes

1. Update Appium Server

Ensure you’re using Appium 2.x, which better handles mobile Chrome capabilities:

npm install -g appium@latest

2. Downgrade Katalon (Temporarily)

If urgent, revert to Katalon 10.1 while verifying the fix in 10.2.

3. Verify ChromeDriver Compatibility

  • Ensure the ChromeDriver version matches the Chrome version on the mobile device (check via chrome://version on the device).
  • Update ChromeDriver in Katalon via Tools > Update WebDrivers.

4. Clean Capabilities

Add code to explicitly remove prefs if Katalon injects them:

Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put("args", Arrays.asList("--disable-popup-blocking", "--disable-notifications"))
chromeOptions.remove("prefs") // Forcefully remove if present

Modified Code Example

// Set ChromeDriver path
RunConfiguration.setMobileDriverPreferencesProperty('chromedriverExecutable', pathDriver)
RunConfiguration.setMobileDriverPreferencesProperty('browserName', 'Chrome')

// Configure ChromeOptions WITHOUT 'prefs'
Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put("args", Arrays.asList("--disable-popup-blocking", "--disable-notifications"))

// Assign to capabilities
RunConfiguration.setMobileDriverPreferencesProperty("goog:chromeOptions", chromeOptions)

// Launch Chrome on Android
Mobile.startExistingApplication(GlobalVariable.G_ANDROID_OMNI_PACKAGEID)

// Continue with WebUI
WebUI.openBrowser(Url)

Debugging Tips

  • Check Appium Logs: Look for invalid argument errors related to goog:chromeOptions.
  • Minimal Test Case: Validate with a script that only opens Chrome:
Mobile.startExistingApplication('com.android.chrome')
WebUI.navigateToUrl('chrome://version')

By removing unsupported prefs and ensuring compatibility with Appium’s ChromeDriver, the session creation error should resolve.

Thank @dineshh , I want use Katalon 10.2 since its new beautiful report. So I tried some of your solutions

Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put(“args”, Arrays.asList(“–disable-popup-blocking”, “–disable-notifications”))
chromeOptions.remove(“prefs”) // Forcefully remove if present

This doesn’t work because this code WebUI.openBrowser(Url) always create a new ChromeDriver with prefs profile.password_manager_leak_detection=false

I also tried to use WebUI.navigateToUrl(Url), but it makes error
navigate

So all I want is the code to manually create a new Chrome mobile driver without any prefs.

Hi @lamnt21,

Thank you for sharing your issue. In the case that you dont want prefs to be injected, I would like to suggest that:

  • You remove it from google:chromeOptions by overriding. Try the following code before calling Mobile.startExistingApplication()
Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put("args", Arrays.asList("--disable-popup-blocking", "--disable-notifications"))
chromeOptions.put("extensions", new ArrayList<>()) // Ensure this is explicitly set

// Do NOT set 'prefs' key at all
RunConfiguration.setMobileDriverPreferencesProperty("goog:chromeOptions", chromeOptions)

  • If not work, you can consider roll back to 10.1.0 and I will create a ticket for my team to investigate this issue of auto-injecting breaking Appium mobile Chrome sessions.

Thank you

1 Like

can you share the full error trace

Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put(“args”, Arrays.asList(“–disable-popup-blocking”, “–disable-notifications”))
chromeOptions.put(“extensions”, new ArrayList<>()) // Ensure this is explicitly set

// Do NOT set ‘prefs’ key at all
RunConfiguration.setMobileDriverPreferencesProperty(“goog:chromeOptions”, chromeOptions)

I tried your suggest but it still have the same error:
cannot parse capability: goog:chromeOptions since chrome option: prefs profile.password_manager_leak_detection: false

Anyway, I got a workaround solution to run Chrome WebMobile on Katalon 10.2 by manually start a Android Driver with native Appium.
Below is full steps

  1. Start appium server

String command = ‘cmd /c start appium --address 127.0.0.1 --port 4723’
runCmdCommand(command)

  1. Using UIAutomator2Options to create a new AndroidDriver and changeWebDriver to it

UiAutomator2Options options = new UiAutomator2Options()
options.setPlatformName(“Android”)
options.setAutomationName(“UiAutomator2”)
options.withBrowserName(“Chrome”)
options.setChromedriverExecutable(pathDriver)
URL appiumServer = new URL(“http://127.0.0.1:4723/”)
AndroidDriver driver = new AndroidDriver(appiumServer, options)

DriverFactory.changeWebDriver(driver)
KeywordUtil.logInfo(“:white_check_mark: Chrome Mobile Driver created successfully.”)

  1. Continue test using WebUI.navigateToURL (avoid WebUI.openBrowser() because it use default Katalon setup with pref profile.password_manager_leak_detection: false)

WebUI.navigateToUrl(Url_Qrcode)
WebUI.click()…

  1. Once done test on WebMobile, Stop window of appium server

String command = ‘taskkill /IM cmd.exe’
runCmdCommand(command)

1 Like