Closed MJB222398 closed 1 month ago
@MJB222398, thank you for creating this issue. We will troubleshoot it as soon as we can.
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!
Hi @nvborisenko is there any update on this? I cannot upgrade to 4.24 as it stands
I see the following even locally
1727099359594 CDP WARN Support for the Chrome DevTools Protocol (CDP) in Firefox will be deprecated after Firefox 128 (ESR) and will be removed in a later release. CDP users should consider migrating to WebDriver BiDi. See https://bugzilla.mozilla.org/show_bug.cgi?id=1872254
1727099359594 CDP WARN Invalid browser preferences for CDP. Set "fission.webContentIsolationStrategy"to 0 and "fission.bfcacheInParent" to false before Firefox starts.
1727099359629 CDP WARN Support for the Chrome DevTools Protocol (CDP) in Firefox will be deprecated after Firefox 128 (ESR) and will be removed in a later release. CDP users should consider migrating to WebDriver BiDi. See https://bugzilla.mozilla.org/show_bug.cgi?id=1872254
1727099359629 CDP WARN Invalid browser preferences for CDP. Set "fission.webContentIsolationStrategy"to 0 and "fission.bfcacheInParent" to false before Firefox starts.
console.error: (new UnknownMethodError("Log.clear", "chrome://remote/content/cdp/Error.sys.mjs", 18))
1727099359638 CDP ERROR UnknownMethodError: Log.clear:
RemoteAgentError@chrome://remote/content/cdp/Error.sys.mjs:18:5
UnknownMethodError@chrome://remote/content/cdp/Error.sys.mjs:101:7
execute@chrome://remote/content/cdp/domains/DomainCache.sys.mjs:92:13
receiveMessage@chrome://remote/content/cdp/sessions/ContentProcessSession.sys.mjs:79:45
caused by:
Unhandled exception. OpenQA.Selenium.WebDriverException: Unexpected error creating WebSocket DevTools session.
---> System.NullReferenceException: Object reference not set to an instance of an object.
I think your options here are:
The first preview is available in Selenium v4.25, something like the following:
var options = new FirefoxOptions() { UseWebSocketUrl = true };
using var driver = new FirefoxDriver(options);
var bidi = await driver.AsBiDiAsync();
await bidi.Log.OnEntryAddedAsync(e => Console.WriteLine(e));
driver.Url = "https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html";
driver.FindElement(By.Id("consoleLog")).Click();
Please try it out and leave feedback.
@nvborisenko Would like to do the BiDi upgrade, wasn't aware it was ready enough yet. Trying out the above for FF is working well on first glance. However for Edge and Chrome it is not:
System.InvalidOperationException : Could not start a new session. Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: Failed to initialize BiDi Mapper: TypeError: Failed to set the 'innerHTML' property on 'Element': This document requires 'TrustedHTML' assignment.
at generatePage (<anonymous>:888:1056)
at <anonymous>:906:295
at <anonymous>:906:1073
(Session info: chrome=129.0.6668.58)
Host info: host: '20e30ca0b129', ip: '172.18.0.5'
Build info: version: '4.25.0', revision: '030fcf7918'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.146.1-microsoft-standard-WSL2', java.version: '17.0.12'
Driver info: driver.version: unknown
Build info: version: '4.25.0', revision: '030fcf7918'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.146.1-microsoft-standard-WSL2', java.version: '17.0.12'
Driver info: driver.version: unknown
Build info: version: '4.25.0', revision: '030fcf7918'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.146.1-microsoft-standard-WSL2', java.version: '17.0.12'
Driver info: driver.version: unknown (SessionNotCreated)
Like this one: https://github.com/SeleniumHQ/selenium/issues/14299
I adjusted code slightly to avoid NullReferenceExcception
which helps to understand what was wrong in terms of CDP commands.
@nvborisenko Thanks you're right thats the issue. Yes definitely makes sense to guard against the NRE, thanks
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.
What happened?
This exception was thrown when setting up my Firefox RemoteWebDriver:
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.24
What are the browser(s) and version(s) where you see this issue?
Firefox
What are the browser driver(s) and version(s) where you see this issue?
Firefox
Are you using Selenium Grid?
Yes 4.24.0-20240907