SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.19k stars 8.11k forks source link

org.openqa.selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response #13081

Closed swapnabhaskarun closed 10 months ago

swapnabhaskarun commented 10 months ago

What happened?

Test script now running, failing with the exception posted below

How can we reproduce the issue?

i just updated chrome browser to Version 119.0.6045.105 (Official Build) (x86_64)

Relevant log output

org.openqa.selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: chrome=119.0.6045.105)
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.6', java.version: '11.0.20'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [bb412efb885ef19d59a1b0da41839f6f, findElements {using=id, value=username}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 119.0.6045.105, chrome: {chromedriverVersion: 118.0.5993.70 (e52f33f30b91..., userDataDir: /var/folders/43/9pqt32gs27g...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:62674}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: mac, proxy: Proxy(), se:cdp: ws://localhost:62674/devtoo..., se:cdpVersion: 119.0.6045.105, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: bb412efb885ef19d59a1b0da41839f6f

    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:196)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:171)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
    at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElements(ElementLocation.java:182)
    at org.openqa.selenium.remote.ElementLocation.findElements(ElementLocation.java:110)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:368)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:362)
    at com.pandora.qa.oms.util.ElementUtil.findAll(ElementUtil.java:86)
    at com.pandora.qa.oms.util.ElementUtil.isVisible(ElementUtil.java:121)
    at com.pandora.qa.oms.app.SfdcLoginPage.sfdcSignIn(SfdcLoginPage.java:25)
    at com.pandora.qa.oms.VCPMTest.vCPMTest(VCPMTest.java:28)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    at org.testng.TestRunner.privateRun(TestRunner.java:648)
    at org.testng.TestRunner.run(TestRunner.java:505)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    at org.testng.TestNG.runSuites(TestNG.java:1049)
    at org.testng.TestNG.run(TestNG.java:1017)
    at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
    at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)

org.openqa.selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: chrome=119.0.6045.105)
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.6', java.version: '11.0.20'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [bb412efb885ef19d59a1b0da41839f6f, deleteAllCookies {}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 119.0.6045.105, chrome: {chromedriverVersion: 118.0.5993.70 (e52f33f30b91..., userDataDir: /var/folders/43/9pqt32gs27g...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:62674}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: mac, proxy: Proxy(), se:cdp: ws://localhost:62674/devtoo..., se:cdpVersion: 119.0.6045.105, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: bb412efb885ef19d59a1b0da41839f6f

    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:196)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:171)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:591)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions.deleteAllCookies(RemoteWebDriver.java:800)
    at com.pandora.qa.oms.TestBase.afterMethod(TestBase.java:81)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    at org.testng.TestRunner.privateRun(TestRunner.java:648)
    at org.testng.TestRunner.run(TestRunner.java:505)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    at org.testng.TestNG.runSuites(TestNG.java:1049)
    at org.testng.TestNG.run(TestNG.java:1017)
    at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
    at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)

===============================================
Default Suite
Total tests run: 1, Failures: 1, Skips: 0
Configuration Failures: 1, Skips: 0
===============================================

Process finished with exit code 0

Operating System

Mac OS

Selenium version

4.11.0

What are the browser(s) and version(s) where you see this issue?

chrome

What are the browser driver(s) and version(s) where you see this issue?

chrome browser to Version 119.0.6045.105 (Official Build) (x86_64)

Are you using Selenium Grid?

No response

github-actions[bot] commented 10 months ago

@swapnabhaskarun, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

swapnabhaskarun commented 10 months ago

updating selenium version in build.gradle fixed the issue
compile 'org.seleniumhq.selenium:selenium-java:4.14.1'

diemol commented 10 months ago

Thanks for letting us know.

Anandh1924 commented 10 months ago

I am using robot framework with Selenium Library - I had update Successfully installed selenium-4.15.0 , Successfully installed robotframework-seleniumlibrary-6.1.3 , My IDE Is Pycharm still getting above error can you help me . Only facing issue in chrome

ansteisija-kat commented 10 months ago

@Anandh1924 same case here. You could try updating chromedriver to the latest version, it helps me for now.

Anandh1924 commented 10 months ago

Thanks it helped

denis-sklyarov commented 10 months ago

On windows, update to latest version help but in docker was helpful to degrade version from 4.15 to 4.14.1. It was with c# client

mooragor commented 10 months ago

I'm getting this as well. C# and using the driver manager to get the driver required.
Initially got the problem on Weds 1st Nov with 4.14.1. Have tried upgrading to 4.15, but still have the issue.
Driver Manager is downloading ChromeDriver 118.0.5993.70, which has worked in the past with 4.14.1

Swapping to Edge (which also has version number 118.0.2088.76) seems to bypass the problem, but that's not ideal!

Starting ChromeDriver 118.0.5993.70 (e52f33f30b91b4ddfad649acddc39ab570473b86-refs/branch-heads/5993@{#1216}) on port 60679
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
  Failed LegalGeneralUsersSeeAppropriateOptions [3 s]
  Error Message:
   OpenQA.Selenium.WebDriverException : unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: chrome=119.0.6045.105)

Edit:

Doh - now I see that the Chrome that's being called is 119.0.6045.105, but the driver is 118 - I guess that's the problem.
As I'm just letting DriverManager download what it wants, is there any way we can get it to be smarter about combinations that work? In my code I'm setting: chromeOptions.BrowserVersion = "stable";

I guess I need to set something different here to be "latest that Driver Manager has a driver for" ? Anyone know what that might be?

titusfortner commented 10 months ago

@bonigarcia we don't have logging in dotnet, can you think of why these might not match?

bonigarcia commented 10 months ago

I don't understand what is happening here. But some hints are the following:

https://github.com/SeleniumHQ/selenium/tree/trunk/common/manager

... and executing the following shell command:

./selenium-manager --browser chrome --debug
mooragor commented 10 months ago

I'll try and get more details, but this failure is happening on our build VMs in the cloud, and I don't think I have command line access to them at all. There shouldn't be any Chromedriver on the VM's before the test starts, but I'm not 100% certain that everything is totally clean before we start - there is a possibility that a chromedriver from a previous run has somehow been left lying around somewhere.

krmahadevan commented 10 months ago

@mooragor - Maybe you can turn up the log levels and then perhaps look for this line in the logs.

You can refer here to learn more about turning on logs.

mooragor commented 10 months ago

Looking at the documentation, the C# implementation unfortunately doesn't yet have logging https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

krmahadevan commented 10 months ago

Ok my bad. For some reason, I missed the C# part and assumed you were on Java.

krmahadevan commented 10 months ago

Do you think you can perhaps try making an explicit call to SeleniumManager and maybe print the path that being returned in your test and then have it run on the VMs? Maybe that will tell us what is being used on the vms.

It would require modification to your tests, but I guess its worth the effort. The line that calls SeleniumManager.DriverPath needs to be before your test instantiates the driver object

mooragor commented 10 months ago

This is the value I'm getting from DriverPath.
SeleniumManager.DriverPath(chromeOptions) C:\SeleniumWebDrivers\ChromeDriver\chromedriver.exe

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Starting ChromeDriver 118.0.5993.70 (e52f33f30b91b4ddfad649acddc39ab570473b86-refs/branch-heads/5993@{#1216}) on port 63081
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

  Failed DoerCheckerUsersSeeAppropriateOptions [30 s]

  Error Message:
   OpenQA.Selenium.WebDriverException : unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: chrome=119.0.6045.105)
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value)
   at OpenQA.Selenium.By.<.ctor>b__11_0(ISearchContext context)
   at OpenQA.Selenium.By.FindElement(ISearchContext context)
   at OpenQA.Selenium.WebDriver.FindElement(By by)
   at Hymans.Ihli.Smoke.Pages.LoginPage.Login(User user) in D:\a\1\s\backends\APIs\ihli-api\Hymans.Ihli.Smoke\Pages\LoginPage.cs:line 19
   at Hymans.Ihli.Smoke.Steps.SharedStepsDefinitions.GivenILogInToIHLIAsUser(String UserRole) in D:\a\1\s\backends\APIs\ihli-api\Hymans.Ihli.Smoke\Steps\SharedStepsDefinitions.cs:line 23
   at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments, TimeSpan& duration)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
   at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
   at Hymans.Ihli.Smoke.Features.IHLITestsFeature.ScenarioCleanup()
   at Hymans.Ihli.Smoke.Features.IHLITestsFeature.DoerCheckerUsersSeeAppropriateOptions() in D:\a\1\s\backends\APIs\ihli-api\Hymans.Ihli.Smoke\Features\IHLI.feature:line 63
  Standard Output Messages:
 ======================================================================
 Doer/Checker users see appropriate options
 ======================================================================
 Using Env: [qa]
 Automated fund for this run: Z-Auto-Fund-2023-11-03T15_09_28_597
 ##############################################
 SeleniumManager.DriverPath(chromeOptions)
 C:\SeleniumWebDrivers\ChromeDriver\chromedriver.exe
 ##############################################
 Given I log in to IHLI as "INTERNAL" user
 -> error: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
   (Session info: chrome=119.0.6045.105) (2.6s)
mooragor commented 10 months ago

Looking at the path (C:\SeleniumWebDrivers\ChromeDriver\chromedriver.exe) - if that's where the drivers are downloaded to, they very likely aren't tidied up after the build/test run (because that isn't aren't under the build directory). So it could well be an old driver. What I don't understand is whether the SeleniumManager checks the version of that driver and whether that can cope with the requested Browser version (for my tests, chromeOptions.BrowserVersion = "stable";)

Is there a way to force Selenium manager to update the driver to latest, even if there is already one downloaded?

nvborisenko commented 10 months ago

In my personal opinion Selenium Manager should never respect PATH env var. It should be something like "SE_DRIVER_PATH".

mooragor commented 10 months ago

Alternatively, if there's a way to tell SeleniumManager where to look for the driver, and to download if it can't find one there? Then I could explicitly configure the tests to have a driver path under the build directory (which will get blown away after the test run and allows for nice isolation), but re-used during the the run.

krmahadevan commented 10 months ago

@mooragor - You can read more about the selenium manager feature here

if there's a way to tell SeleniumManager where to look for the driver, and to download if it can't find one there?

I think the way it works is that selenium manager downloads the required driver binary if it can't find one in the PATH variable. So its looking at the PATH and finding the chromedriver and so, skips downloading the relevant one and just uses the one available in that directory (Am guessing that this path is added to the PATH variable. Maybe you can alter the PATH and get rid of this directory? )

krmahadevan commented 10 months ago

In Java, you can explicitly set the driver path via the JVM argument -Dwebdriver.chrome.driver. Not sure if something like that exists in C#

mooragor commented 10 months ago

I've done some more debugging, and the System PATH does indeed include "C:\SeleniumWebDrivers\ChromeDriver\" as well as a bunch of other SeleniumWebDriver paths.

I've no idea how or who put those there (they are shared machines). I will investigate and see if I can't get them removed. It does at least begin to explain why this weirdness is happening!

mooragor commented 10 months ago

Apparently these are 'Microsoft-hosted agents' at 'windows-latest', and we have no control over what is pre-installed on them, which unfortunately doesn't help solve the problem!

https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml

This includes a bunch of Selenium and Browser software at specific versions, which, since I'm asking SeleniumManager to get me the latest stable Chrome is then conflicting with the chromedriver the host has helpfully put on the path.

Google Chrome 118.0.5993.118 Chrome Driver 118.0.5993.70 Microsoft Edge 118.0.2088.76 Microsoft Edge Driver 118.0.2088.76 Mozilla Firefox 119.0 Gecko Driver 0.33.0 IE Driver 4.14.0.0 Selenium server 4.14.0

krmahadevan commented 10 months ago

@mooragor - The software list says that chrome browser 118 and driver 118 is going to be available.

https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md#browsers-and-drivers

In that case, I am not sure how/what is causing the browser version to be resolved as 119.

and we have no control over what is pre-installed on them, which unfortunately doesn't help solve the problem!

Maybe you can have the path variable updated for the agents that skips the driver path. I can't think of anything additional here.

mooragor commented 10 months ago

I'm specifically requesting chromeOptions.BrowserVersion = "stable"; in my code, which I believe is currently 119. I'm trying removing that to see if not requesting 'stable' will just use whatever's on the system currently.

mooragor commented 10 months ago

For background, our company has 'internal' and 'external' webservers. I've previously been testing 'internal' ones, that are inside the company firewall, and have to be tested from systems also inside the firewall - these systems have no browsers/selenium drivers installed. SeleniumManager was a fantastic thing for those machines as the company didn't want to install chrome on the machines at all.

I'm now testing against 'external' webservers from these 'windows-latest' machines, but was using the same test code - so it wasn't expecting there to be a chromedriver available in the path and was trying to use SeleniumManager to get the latest of everything!

Being able to tell SeleniumManager to ignore any drivers on the host and just do it's own thing would be very handy for me, but I can understand why that's not come up before!

krmahadevan commented 10 months ago

@mooragor

Being able to tell SeleniumManager to ignore any drivers on the host and just do it's own thing would be very handy for me, but I can understand why that's not come up before!

Just to ensure that this specific ask (doesn't look unreasonable to me), maybe you should log this as a separate github issue.

mooragor commented 10 months ago

Removing the chromeOptions.BrowserVersion = "stable"; seems to have let the chromedriver and chrome pre-installed on these vm's to work nicely together. Thank you ever so much for all your help tracking this down everyone.

I will raise that request as a separate issue.

Thank you all so much again!

Martin.

krmahadevan commented 10 months ago

@titusfortner - I think we can close this issue

nganesan9 commented 10 months ago

@krmahadevan I have updated to the latest chrome driver and selenium version yet I see this error with both WebDriver 4.14.1 and 4.15.0:

    OpenQA.Selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
      (Session info: headless chrome=119.0.6045.106)

Minor Version =119.0.6045.106 doesn't appear to have been released on the package manager. Latest is 119.0.6045.105 - Not sure how that one is getting picked up...

These are the versions I have:

<PackageReference Include="Selenium.Axe" Version="4.0.14" />
<PackageReference Include="Selenium.WebDriver" Version="4.14.1" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="119.0.6045.10500" /> 
krmahadevan commented 10 months ago

@nganesan9 - I believe you are experiencing this on the C# side? I am not very conversant with the .NET eco system and so I am not sure what those <PackageReference> xml tags mean (I am guessing that they are some sort of a dependency entry in the .NET world).

The latest stable version of chrome is Version 119.0.6045.105 (Atleast that's the version I see on the browser). I think I will have to step aside and let someone else who is more conversant with the .NET world help out more.

But here are the general debug options

nganesan9 commented 10 months ago

@krmahadevan Thanks! Yes this is C# and .NET,,, Runtime is on x64, version .NET6

Despite updating ChromeDriver to version 119.0.6045.10500 per code above, Driver version that gets started is 118.0.5993.70 per error below. I tried setting chromeOptions.BrowserVersion to "stable" and then removed that as well..

The DevTools version I set the code to use is OpenQA.Selenium.DevTools.V119 also the latest

I also suspect that the error is in that the older version of ChromeDriver is getting started.. Same as @mooragor

A total of 1 test files matched the specified pattern.
Starting ChromeDriver 118.0.5993.70 (e52f33f30b91b4ddfad649acddc39ab570473b86-refs/branch-heads/5993@{#1216}) on port 65056
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
  Failed AnalyzeAccessibility [43 s]
  Error Message:
   Test method SupportService.UIAutomation.Tests.AccessibilityTests.AnalyzeAccessibility threw exception: 
OpenQA.Selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: headless chrome=119.0.6045.106)
krmahadevan commented 10 months ago

@nganesan9 - I would suggest that you go through this thread a bit more in detail (since it has a lot of various debugging steps) to see if it can identify and fix your problem. If you are having a stale chromedriver in your PATH, then you would need to find it and have it removed because the chromedriver required by your test is now internally managed by Selenium and you don't need to be worrying about it.

MargaritaLadybird commented 10 months ago

I use the Webdriver manager Nuget packet to load the latest driver. When I started debugging I found out that Manager loaded Edge Driver 118 version instead of 119, and I changed browserVersion Strategy from Latest to MatchingBrowser. And the problem was solved.

string browserVersion = VersionResolveStrategy.MatchingBrowser;

nganesan9 commented 10 months ago

@MargaritaLadybird What namespace does VersionResolveStrategy belong to? C# .NET 6 doesn't resolve the property..

MargaritaLadybird commented 10 months ago

@MargaritaLadybird What namespace does VersionResolveStrategy belong to? C# .NET 6 doesn't resolve the property.. It is in the fllowing namaspace WebDriverManager.Helpers:

namespace WebDriverManager.Helpers
{
    public static class VersionResolveStrategy
    {
        public const string Latest = "Latest";

        public const string MatchingBrowser = "MatchingBrowser";
    }
}

Or just use "MatchingBrowser" when setupping the driver

IDriverConfig config = new EdgeConfig(); 
string browserVersion = VersionResolveStrategy.MatchingBrowser; // "MatchingBrowser"
var driverPath = new DriverManager().SetUpDriver(config, browserVersion);
bonigarcia commented 10 months ago

Is there a way to force Selenium manager to update the driver to latest, even if there is already one downloaded?

I created a PR https://github.com/SeleniumHQ/selenium/pull/12960 some weeks ago to force Selenium Manager for not using the drivers found on PATH. My opinion is that the options implemented in that PR can be helpful, but @titusfortner is concerned to introduce these new flags.

MiguelMLR9 commented 10 months ago

Hi, Im using Microsoft Edge driver, and had the same problem. I updated the driver to the same version as the browser (119.0.2151.44), also updated selenium to the last versión, but those actions didnt fix the issue. Then I found a page where a user had the same error message as me (but using chrome): https://note.com/yuu________/n/n48b3530b0fe6

so, I updated the chrome driver version to the same version I have on chrome browser, with: pip install chromedriver-binary==119.0.6045.105.0

and after that, I run again my script and the problem was solved for Microsoft Edge too.

asdqwefasd commented 10 months ago

Hi good day how can i fix this problem in my katalon studio cant run after click the menu thumbnail =============== ROOT CAUSE ===================== Caused by: org.openqa.selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response Caused by: org.openqa.selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

11-14-2023 07:17:25 pm Test Cases/New Test Case

Elapsed time: 10.023s

Test Cases/New Test Case FAILED. Reason: com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/Page_Singapore Airlines Cargo Internationa_be9777/a_Show Less_meanmenu-reveal' at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64) at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26) at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:74) at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:40) at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74) at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:620) at New Test Case.run(New Test Case:24) at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194) at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119) at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448) at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439) at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418) at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410) at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285) at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:144) at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135) at TempTestCase1699960642672.run(TempTestCase1699960642672.groovy:25) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Caused by: org.openqa.selenium.WebDriverException: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response (Session info: MicrosoftEdge=119.0.2151.58) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'DESKTOP-NLTHKJE', ip: '192.168.100.38', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7' Driver info: com.kms.katalon.selenium.driver.CEdgeDriver Capabilities {acceptInsecureCerts: false, browserName: msedge, browserVersion: 119.0.2151.58, fedcm:accounts: true, javascriptEnabled: true, ms:edgeOptions: {debuggerAddress: localhost:63397}, msedge: {msedgedriverVersion: 118.0.2088.46 (175bd6acfc46..., userDataDir: C:\Users\vasal\AppData\Loca...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true} Session ID: c97851dbae44751b33b179a34ef1878c *** Element info: {Using=xpath, value=//li[@id='menu-item-69']/a[2]} at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at com.kms.katalon.selenium.driver.CEdgeDriver.execute(CEdgeDriver.java:20) at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:353) at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:432) at org.openqa.selenium.By$ByXPath.findElements(By.java:348) at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:311) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.openqa.selenium.support.events.EventFiringWebDriver.lambda$new$1(EventFiringWebDriver.java:105) at jdk.proxy2/jdk.proxy2.$Proxy23.findElements(Unknown Source) at org.openqa.selenium.support.events.EventFiringWebDriver.findElements(EventFiringWebDriver.java:182) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findElementByNormalMethods(WebUiCommonHelper.java:1025) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findElementsBySelectedMethod(WebUiCommonHelper.java:915) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findElementsBySelectedMethod(WebUiCommonHelper.java:897) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findElementsBySelectedMethod(WebUiCommonHelper.java:892) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findElementsByDefault(WebUiCommonHelper.java:888) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findElementsWithSelfHealing(WebUiCommonHelper.java:734) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElements(WebUiCommonHelper.java:718) at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1374) at com.kms.katalon.core.webui.common.WebUiCommonHelper.switchToParentFrame(WebUiCommonHelper.java:1445) at com.kms.katalon.core.webui.common.WebUiCommonHelper.switchToParentFrame(WebUiCommonHelper.java:1434) at com.kms.katalon.core.webui.common.WebUiCommonHelper.switchToParentFrame(WebUiCommonHelper.java:1456) at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:63) at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy) at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)

titusfortner commented 10 months ago

Make sure your driver and browser versions match and are the latest versions

asdqwefasd commented 10 months ago

@titusfortner Hello sir where can i find chromedriver 119.0.6045.124

MargaritaLadybird commented 10 months ago

@titusfortner Hello sir where can i find chromedriver 119.0.6045.124

https://googlechromelabs.github.io/chrome-for-testing/

titusfortner commented 10 months ago

This should be the default behavior for using the latest version of Selenium if you remove any driver that is on your system and do not use any other driver management tool.

vedmack commented 10 months ago

updating chrome driver fixed the issue on my mac, brew upgrade chromedriver

titusfortner commented 10 months ago

I wonder how long it will take people to stop using other driver managers...

krmahadevan commented 10 months ago

I wonder how long it will take people to stop using other driver managers...

@titusfortner - What if we were to show a user friendly warning message, that explicitly warns the user that they are not using the selenium manager, and the driver is being managed by something else and that they should look at what is being used to manage the driver. If the drivers are being provided explicitly by them in the path, then they should ignore the warning. But if the driver is being provided in the path via some other means then, they should perhaps look at moving over to getting rid of it.

I know the verbiage perhaps is very elaborate. Maybe we could just log the link of a user friendly page on selenium.dev that includes all this.

I believe people don't move/migrate because they are either not aware of what is doing it (or) it still works and so they dont want to fix something that's not broken.

What do you think ?

titusfortner commented 10 months ago

There's no way to know the difference between someone manually setting the value because they can't use automated tools for some reason and someone using a driver manager.

But... Maybe we can do something more to make sure they know if they aren't using the best driver.

asdqwefasd commented 10 months ago

I update the chromdriver in the katalono studion then put in the build.gradle the compile 'org.seleniumhq.selenium:selenium-java:4.14.1' and its working now thank you so much

RubTalha commented 9 months ago

https://stackoverflow.com/questions/77531953/selenium-common-exceptions-webdriverexception-message-unknown-error-result-we/77532346#77532346

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.