-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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]: org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$RwtMl7Wf cannot be cast to org.openqa.selenium.devtools.HasDevTools #10132
Comments
@jantekb, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Thank you for providing the details. I have tried running the script mentioned above in my local maven project with Java Version: 9.0.4 and I am unable to reproduce the error after multiple attempts when running on IDE. If I use |
The issue might be potentially similar to #10010, in terms of overwriting the |
Hello, I have absolutely the same issue using Selenoid v1.10.7. I use jdk 11.0.4. I don't use maven-assembly-plugin.
Also I use bytebuddy for Augmenter
Maybe I need to add maven-assembly-plugin with specific config ? |
@hellfish46 Thank you for providing the details. How are you running the code? Are you running a java jar or running on IDE? |
I run it on IDE: |
I don't use maven either, I use Gradle and shadowJar and in my final jar file these are the selenium related service entries:
Interestingly each one of these files contain the below single line, which does not match what I can see in the original jar files. Thanks for the hint, I'll investigate it and report back on my results
|
Confirming the fix: by adding the below to my
Thank you very much! |
Can't understand how to fix this issue and what the problem was here |
@hellfish46 Can you provide a GitHub repo with a project we can use to reproduce the issue? |
@diemol Hello, tried to make it ) Want to emphasize that this issue appears when I use Selenoid. When I use Selenium Grid standalone there was another issue - somethins with websokets connection. Maybe you already fixed it in #9803 |
@hellfish46 That was the root reason why I created #9803 because we are running a moon-cluster (kubernetes version of selenoid). To find a reason why it is not working I tried to get it run with the selenium-grid just to find out where the problem is. Today I tried many versions of the grid, except the standalone solution I don't get the CDP running, and we really want to use that. Also tried the docker-selenium-grid version (with the docker-compose) but still get it not running :-( I can provide a lot of examples, to help to fix it. |
Thank you, @jantekb, for sharing how the issue got fixed! @hellfish46 not sure how this can get done with Selenoid. You would need to ask them over there. We have tested this with Grid 4 and I believe some cloud vendors work as well. @boris779, #9803 was fixed and I gave context on why it was failing. The key part to have it working with the official Docker images is to set the Closing as the original reported issue is now fixed. |
For the people using Maven: You need to use the maven shade plugin (maven assembly won't work) and configure a <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>YourMainClass</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin> |
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?
I am running latest selenium-docker image:
In my Java application I have the following code snippet that throws ClassCastException:
As soon as the
HasDevTools
cast is attempted, I am getting:org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$RwtMl7Wf cannot be cast to org.openqa.selenium.devtools.HasDevTools: java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$RwtMl7Wf cannot be cast to org.openqa.selenium.devtools.HasDevTools
I have carefully reviewed all the similar issues, but none of them seems to have concluded on this particular bug.
My relevant grade dependency is:
My JDK is:
OS Version: 4.14.252-195.483.amzn2.x86_64
Java Name: OpenJDK 64-Bit Server VM
Java Vendor: Oracle Corporation
Java Version: 9.0.4
Java VM Version: 9.0.4+11
How can we reproduce the issue?
Relevant log output
Operating System
Amazon Linux
Selenium version
4.1.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?
the one in your docker image
Are you using Selenium Grid?
4.1.0
The text was updated successfully, but these errors were encountered: