Closed AnBAng97 closed 10 months ago
@AnBAng97, 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!
Exception in thread "CDP Connection" org.openqa.selenium.devtools.DevToolsException: Expected to read a NAME but instead have: START_MAP. Last 33 characters read: {"id":1,"result":{"targetInfos":[
The error is because Selenium is trying to parse an incomplete JSON. I'm not sure why it doesn't get the full response.
Hi, @AnBAng97. Please follow the issue template, we need more information to reproduce the issue.
Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.
Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.
Reply to this issue when all information is provided, thank you.
This code is working: https://github.com/ronPy/seleniumhq.github.io/blob/patch-1//examples/java/src/test/java/dev/selenium/bidirectional/chrome_devtools/BidiApiTest.java#L36-L39
So we need to figure out what you are doing differently to get a different response. Does the above code work for you? What is different with your setup?
but instead have: START_MAP. Last 33 characters read: {"id":1,"result":{"targetInfos":[
@titusfortner The error message is confusing, it will only show what has been parsed so far and not was is the next text to parse.
However, i think this is allready fixed in the latest snapshot, as there was a other issue reported parsing targetInfos in #13163
Great. @AnBAng97 please try the nightly version of the jar and let us know if you still have this issue https://www.selenium.dev/downloads/#nightly
Hi, @AnBAng97. Please follow the issue template, we need more information to reproduce the issue.
Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.
Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.
Reply to this issue when all information is provided, thank you.
Thanks for your response. You can find a Demo Project here https://github.com/AnBAng97/SeleniumBugDemo
I have tried the same code without JavaFX it works just fine. But with JavaFX, it is giving the error
I think this is the key here: InaccessibleObjectException: Unable to make private static org.openqa.selenium.devtools.v117.target.model.TargetInfo org.openqa.selenium.devtools.v117.target.model.TargetInfo.fromJson(org.openqa.selenium.json.JsonInput) accessible: module org.seleniumhq.selenium.devtools_v117 does not "opens org.openqa.selenium.devtools.v117.target.model" to module org.seleniumhq.selenium.json
It looks like you are using the java module system and the module info of the dev tools do not allow the reflective access here. Creating json interfaces #13189 should fix this, as there is no reflection needed any more, or the module info should be changed. I think they are generated and it works in other areas, might be a bug in the generator.
I had a look inside the generated module-info, it looks broken:
opens org.openqa.selenium.devtools.v117.target.model to
org.openqa.selenium.json;
It should be opens {package} to {module}
and not opens {package} to {package}
.
@AnBAng97 could you check the fix with one of the next nightly releases? You need to add the snapshots repo and change the version to 4.16.0-SNAPSHOT
.
This was fixed, please open a new ticket with updated information if there are still problems.
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.
What happened?
The issue happens when I trying to use Selenium in a JavaFX project
The Error throws when I uses this line of code
driver.register(UsernameAndPassword.of(credential.username, credential.password));
How can we reproduce the issue?
Relevant log output
Operating System
Windows 11
Selenium version
Java 4.15.0
What are the browser(s) and version(s) where you see this issue?
Microsoft Edge Version 117.0.2045.43
What are the browser driver(s) and version(s) where you see this issue?
MsEdgeDriver
Are you using Selenium Grid?
No response