Skip to content

[🐛 Bug]: JavaScriptConsoleApiCalledEventArgs.MessageTimeStamp has incorrect year #13654

@MJB222398

Description

@MJB222398

What happened?

I am listening into the JavaScriptConsoleApiCalledEvents using the following code:

var webDriver = new RemoteWebDriver(
    remoteAddress: new Uri("http://localhost:4444/wd/hub"),
    capabilities: (new ChromeOptions()).ToCapabilities(),
    commandTimeout: TimeSpan.FromSeconds(300));

var jsEngine = new JavaScriptEngine(webDriver);
var consoleLogs= new List<JavaScriptConsoleApiCalledEventArgs>();
jsEngine.JavaScriptConsoleApiCalled += (_, e) => consoleLogs.Add(e);
await jsEngine.StartEventMonitoring();

The JavaScriptConsoleApiCalledEventArgs instances that are added to the list have MessageTimeStamp that is correct except for the year - it gives this as 2033 rather than 2024. The MessageContent property has the correct date and time it it, for example:

Tue Mar 05 2024 14:14:20 GMT+0000 (Coordinated Universal Time): 1709648060938 {"id":19021,"severity":1,"pb":{"build":"20240301.545","appType":"edgeChromium","pcsVersion":"20240228.4_master","pcsEnv":"prod-ssrntp","buildAlias":"latest","shouldSupressWarnings":false,"shouldSampleErrorsForTreatement1":false,"shouldSampleErrorsForTreatement2":false,"networkStatus":"connected","w":1},"message":"Edge Next page refresh due to implicit market cookie restored. market: en-US||gb|en-gb|en-gb|en||RefA=479D0A23C97646BDB9205FAABF02A900.RefC=2024-03-05T10:38:31Z"}

I have confirmed that my system time has the correct date time.

How can we reproduce the issue?

See above

Relevant log output

14:27:39.198 INFO [LocalNode.newSession] - Session created by the Node. Id: d04a99988398a5fd060594fd729cae03, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 121.0.6167.184, chrome: {chromedriverVersion: 121.0.6167.184 (057a8ae7deb..., userDataDir: /home/seluser/selenium/profile}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:37429}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://localhost:4444/session..., se:cdpVersion: 121.0.6167.184, se:vnc: ws://localhost:4444/session..., se:vncEnabled: true, se:vncLocalAddress: ws://172.19.0.3:7900, 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}
14:27:39.266 INFO [ProxyNodeWebsockets.createWsEndPoint] - Establishing connection to ws://localhost:37429/devtools/browser/ad3260ca-8884-4705-9cd1-945909c77a50
14:27:45.476 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "896b1882009978879e36cb2b8a55403a","eventTime": 1709648865474734575,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.remote.http.Route$PredicatedRoute","http.host": "172.19.0.3:5555","http.method": "GET","http.request_content_length": "0","http.scheme": "HTTP","http.status_code": 404,"http.target": "\u002fsession\u002fd04a99988398a5fd060594fd729cae03\u002felement\u002fE62623D6742444BEC71A5F8F32C69CB5_element_82\u002ftext","http.user_agent": "selenium\u002f4.18.1 (.net windows)"}}

14:27:47.698 INFO [SessionSlot.stop] - Stopping session d04a99988398a5fd060594fd729cae03

Operating System

Windows 10

Selenium version

4.18.1

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

Chrome 121.0.6167.184

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

Chrome Driver 121.0.6167.184

Are you using Selenium Grid?

4.18.0-20240220

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-dotnet.NET BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions