[Fixed] unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response – Java

by
Alexei Petrov
selenium-webdriver

Quick Fix: Update both Selenium’s ChromeDriver and the version of Chrome you’re using to the latest stable versions. Check the compatibility of your browser and ChromeDriver versions to ensure they are aligned.

The Problem:

When running an automated script using Selenium WebDriver, I encounter an unknown error with the following message: "result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response". This error arises during the execution of the Runtime.callFunctionOn function, which is used to evaluate JavaScript functions in the context of a web page. It seems that the error is related to the browser version and the compatibility of the WebDriver version. I tried to use a matching WebDriver version for my browser version (119), but the error persists.

The Solutions:

Solution 1: Update both ChromeDriver and Chrome to the latest versions

The error message “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response” typically indicates that the Selenium session could not be created. In this specific case, updating both the ChromeDriver and the Chrome browser to the latest versions (119) resolved the issue. It was recommended to upgrade both the Selenium.Webdriver.Chromedriver (\119.0.6045.10500) and Chrome to version 119.

It’s worth noting that the Selenium team has since closed the associated issue on GitHub (https://github.com/SeleniumHQ/selenium/issues/13081), indicating that this issue has been addressed.

Solution 2: Switch Browser and Selenium Driver

To resolve the “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response” error, consider switching your browser and Selenium driver.

Here are the steps to follow:

  1. Switch to Chrome or Firefox:

    Instead of using Microsoft Edge, try using a different browser like Google Chrome or Mozilla Firefox. These browsers are widely supported and less prone to such issues.

  2. Use the Corresponding Selenium WebDriver:

    Make sure you use the Selenium WebDriver that is compatible with your chosen browser. For Chrome, use ChromeDriver, and for Firefox, use GeckoDriver.

  3. Update Selenium.WebDriver and WebDriverManager:

    Ensure that you have the latest versions of Selenium.WebDriver and WebDriverManager. These libraries handle browser drivers and provide automatic downloads of the necessary drivers.

  4. Set Up Driver:

    Use WebDriverManager to automatically download and set up the correct driver for your browser version. This will ensure compatibility and prevent driver-related errors.

By switching to a supported browser, using the correct Selenium driver, and updating the necessary libraries, you can resolve the “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response” error and ensure smooth execution of your tests.

Solution 3: Upgrade Chromedriver Version

If you encounter the error “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response,” consider upgrading your Chromedriver version to match your Google Chrome version. Here’s how you can resolve the issue:

  1. Determine Your Chrome Version:

    Open Google Chrome and click the three-dot menu in the top-right corner. Select “Help” and then “About Google Chrome.” Note down the version number displayed.

  2. Check Current Chromedriver Version:

    Open your Chromedriver installation directory and check the version number. If it doesn’t match your Chrome version, you need to upgrade.

  3. Download the Latest Chromedriver:

    Go to Chromedriver download page and find the latest stable version that corresponds to your Chrome version. Click the download link to obtain the appropriate Chromedriver executable.

  4. Replace the Existing Chromedriver:

    Locate the current Chromedriver executable in your system (typically in “C:\webdrivers” or a similar location). Replace it with the newly downloaded Chromedriver.

  5. Restart Your Testing Framework:

    Relaunch your testing framework or tool. The updated Chromedriver should now be recognized, and the error should be resolved.

By upgrading your Chromedriver version to match your Chrome version, you can ensure compatibility and eliminate the “result.webdriverValue.value list is missing or empty” error.

Solution 4: Update ChromeDriver

The error “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response” indicates that the ChromeDriver version is incompatible with the current browser version. To resolve this issue, update the ChromeDriver to a version compatible with the browser version. In this case, the ChromeDriver version 119.0.6045.105 was compatible with the browser version 119, and updating to this version solved the problem.

Solution 5: Check Chromedriver Compatibility

The error “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response” usually occurs when you are using an incompatible Chromedriver with your actual browser. To resolve this issue, you can try the following steps:

  • Update Chromedriver:

    Make sure you have the latest version of Chromedriver installed. You can download the latest version from the official Chromedriver download page: https://chromedriver.chromium.org/downloads. Select the version that is compatible with your operating system and browser version.

  • Check Chromedriver version:

    Ensure that the Chromedriver version you are using matches the version of your actual browser. You can check your browser version by going to the “About” page in your browser’s settings. Compare the browser version with the Chromedriver version. If they are not the same, download the appropriate Chromedriver version that matches your browser.

  • Use Chrome for Testing Availability:

    If you are using Chromedriver version 115 or newer, you can update it from the “Chrome for Testing Availability” page. This page provides access to the latest Canary and Dev builds of the Chrome browser and their corresponding Chromedriver versions. You can download the latest Chromedriver version from this page and use it with your testing framework.

  • By following these steps, you can ensure that you are using a compatible Chromedriver with your actual browser, which should resolve the “result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response” error.

    Q&A

    What is the meaning of the error message?

    Session cannot be created due to incompatible driver/browser versions.

    How can this issue be resolved?

    Update both Chrome and ChromeDriver to the latest versions.

    What are some other possible solutions?

    Try using Chrome/ChromeDriver instead of EdgeDriver.

    Video Explanation:

    The following video, titled "Selenium WebDriver not working on Chrome fix - YouTube", provides additional insights and in-depth exploration related to the topics discussed in this post.

    Play video

    Selenium #WebDriver #Chrome Select the respective ChromeDriver relevant to your version of Chrome via this link; ...