Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MJB222398 opened this issue Mar 5, 2024 · 4 comments

Comments

@MJB222398
Copy link

MJB222398 commented Mar 5, 2024

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

Copy link

github-actions bot commented Mar 5, 2024

@MJB222398, 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!

@nvborisenko
Copy link
Member

@MJB222398 thank you for detailed report, fixed.

@MJB222398
Copy link
Author

@nvborisenko thanks for sorting quick.

Copy link

github-actions bot commented Apr 4, 2024

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.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants