## 🐛 Bug Report

With latest version of Selenium 4 beta `4.0.0-beta-4` on `java` throws exception when `((ChromeDriver) driver).getDevTools().createSession()` is called from `Test`

<!-- NOTE
FIREFOX 48+ IS ONLY COMPATIBLE WITH GECKODRIVER.

If the issue is with Google Chrome consider logging an issue with chromedriver instead:
https://chromedriver.chromium.org/help

If the issue is with Firefox GeckoDriver (aka Marionette) consider logging an issue with Mozilla:
https://bugzilla.mozilla.org/buglist.cgi?product=Testing&component=Marionette

If the issue is with Microsoft Edge consider logging an issue with Microsoft instead:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/

If the issue is with Safari, only Safari 10+ is supported. Please log any Safari issue with Apple:
https://bugreport.apple.com/

-->

## To Reproduce

<!--
Please be sure to include an SSCCE (Short, Self Contained, Correct [compilable] example) http://sscce.org/
If you can't provide a link to the page, consider creating a reproducible page on https://jsfiddle.net/
-->

- Create a `maven` project with Selenium 4 dependency as `4.0.0-beta-4` and `jdk` version as `jdk-16.0.1` 
- Get `DevTools` object 
- `createSession` using object of `DevTools`
- Run the `Test`

## Expected behavior

Calling `((ChromeDriver) driver).getDevTools().createSession()` should create a session and should allow user to register `Events` & `Listeners`.

## Test script or set of commands reproducing this issue

> `CapturingPerformanceMetricTests.java` _(Test Script)_

```
import com.qa.selenium4.demo.base.BaseDriver;
import com.qa.selenium4.demo.helper.WaitHelper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v91.performance.Performance;
import org.openqa.selenium.devtools.v91.performance.model.Metric;
import org.testng.annotations.Test;

import java.util.List;
import java.util.Optional;

public class CapturingPerformanceMetricTests extends BaseDriver {
    private static final Logger logger = LogManager.getLogger(CapturingPerformanceMetricTests.class.getName());

    @Test(priority = 0, description = "Capture Performance Metrics Using Chrome Dev Tools")
    public void getPerformanceMetricsUsingCDPTest() {
        // Get Dev Tools
        DevTools chromeDevTools = ((ChromeDriver) driver).getDevTools();

        // Create Session
        chromeDevTools.createSession(); // Calling this throws an exception

        // Enable Performance
        chromeDevTools.send(Performance.enable(Optional.of(Performance.EnableTimeDomain.TIMETICKS)));

        // Load URL
        driver.get("https://www.amazon.in/");
        WaitHelper.hardWait(5);
        List<Metric> performanceMatrix = chromeDevTools.send(Performance.getMetrics());

        chromeDevTools.send(Performance.disable());

        performanceMatrix.forEach(matrix -> {
            logger.info(matrix.getName() + " : " + matrix.getValue());
        });
    }
}
```

> Exception details when `((ChromeDriver) driver).getDevTools().createSession()` is called

```
ChromeDriver was started successfully.
Jul 22, 2021 1:24:28 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Jul 22, 2021 1:24:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 92, so returning the closest version found: 91
Jul 22, 2021 1:24:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
INFO: Found CDP implementation for version 92 of 91
Jul 22, 2021 1:24:29 PM org.openqa.selenium.devtools.Connection lambda$send$1
WARNING: Unable to map result for Target.setAutoAttach
java.lang.reflect.InaccessibleObjectException: Unable to make private java.lang.Void() accessible: module java.base does not "opens java.lang" to unnamed module @6537cf78
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357 undefined)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297 undefined)
	at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188 undefined)
	at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181 undefined)
	at org.openqa.selenium.json.InstanceCoercer.getConstructor(InstanceCoercer.java:155 undefined)
	at org.openqa.selenium.json.InstanceCoercer.test(InstanceCoercer.java:48 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$4(JsonTypeCoercer.java:134 undefined)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178 undefined)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812 undefined)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488 undefined)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474 undefined)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150 undefined)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234 undefined)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.buildCoercer(JsonTypeCoercer.java:135 undefined)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:124 undefined)
	at org.openqa.selenium.json.JsonInput.read(JsonInput.java:289 undefined)
	at org.openqa.selenium.devtools.Command.lambda$new$0(Command.java:41 undefined)
	at org.openqa.selenium.devtools.Connection.lambda$send$1(Connection.java:109 undefined)
	at org.openqa.selenium.devtools.Connection$NamedConsumer.accept(Connection.java:92 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:218 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Jul 22, 2021 1:24:29 PM org.openqa.selenium.devtools.Connection lambda$send$1
WARNING: Unable to map result for Log.clear
java.lang.reflect.InaccessibleObjectException: Unable to make private java.lang.Void() accessible: module java.base does not "opens java.lang" to unnamed module @6537cf78
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357 undefined)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297 undefined)
	at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188 undefined)
	at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181 undefined)
	at org.openqa.selenium.json.InstanceCoercer.getConstructor(InstanceCoercer.java:155 undefined)
	at org.openqa.selenium.json.InstanceCoercer.test(InstanceCoercer.java:48 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$4(JsonTypeCoercer.java:134 undefined)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178 undefined)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812 undefined)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488 undefined)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474 undefined)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150 undefined)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234 undefined)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.buildCoercer(JsonTypeCoercer.java:135 undefined)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:124 undefined)
	at org.openqa.selenium.json.JsonInput.read(JsonInput.java:289 undefined)
	at org.openqa.selenium.devtools.Command.lambda$new$0(Command.java:41 undefined)
	at org.openqa.selenium.devtools.Connection.lambda$send$1(Connection.java:109 undefined)
	at org.openqa.selenium.devtools.Connection$NamedConsumer.accept(Connection.java:92 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:218 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
java.lang.reflect.InaccessibleObjectException: Unable to make private java.lang.Void() accessible: module java.base does not "opens java.lang" to unnamed module @6537cf78
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357 undefined)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297 undefined)
	at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188 undefined)
	at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181 undefined)
	at org.openqa.selenium.json.InstanceCoercer.getConstructor(InstanceCoercer.java:155 undefined)
	at org.openqa.selenium.json.InstanceCoercer.test(InstanceCoercer.java:48 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$4(JsonTypeCoercer.java:134 undefined)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178 undefined)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812 undefined)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488 undefined)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474 undefined)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150 undefined)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234 undefined)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.buildCoercer(JsonTypeCoercer.java:135 undefined)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:124 undefined)
	at org.openqa.selenium.json.JsonInput.read(JsonInput.java:289 undefined)
	at org.openqa.selenium.devtools.Command.lambda$new$0(Command.java:41 undefined)
	at org.openqa.selenium.devtools.Connection.lambda$send$1(Connection.java:109 undefined)
	at org.openqa.selenium.devtools.Connection$NamedConsumer.accept(Connection.java:92 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:218 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Jul 22, 2021 1:24:29 PM org.openqa.selenium.devtools.Connection$Listener lambda$onText$0
WARNING: Unable to process: {"id":3,"result":{},"sessionId":"6385B3D3C023139BAB5BA89925C94EF0"}
org.openqa.selenium.json.JsonException: Expected to read a NAME but instead have: START_MAP. Last 17 characters read: {"id":3,"result":
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:300 undefined)
	at org.openqa.selenium.json.JsonInput.nextName(JsonInput.java:136 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:216 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Exception in thread "CDP Connection" org.openqa.selenium.devtools.DevToolsException: Expected to read a NAME but instead have: START_MAP. Last 17 characters read: {"id":3,"result":
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:190 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Caused by: org.openqa.selenium.json.JsonException: Expected to read a NAME but instead have: START_MAP. Last 17 characters read: {"id":3,"result":
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:300 undefined)
	at org.openqa.selenium.json.JsonInput.nextName(JsonInput.java:136 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:216 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	... 3 more
Jul 22, 2021 1:24:29 PM org.openqa.selenium.devtools.Connection$Listener lambda$onText$0
WARNING: Unable to process: {"id":4,"result":{},"sessionId":"6385B3D3C023139BAB5BA89925C94EF0"}
org.openqa.selenium.json.JsonException: Expected to read a NAME but instead have: START_MAP. Last 17 characters read: {"id":4,"result":
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:300 undefined)
	at org.openqa.selenium.json.JsonInput.nextName(JsonInput.java:136 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:216 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Exception in thread "CDP Connection" org.openqa.selenium.devtools.DevToolsException: Expected to read a NAME but instead have: START_MAP. Last 17 characters read: {"id":4,"result":
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:190 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Caused by: org.openqa.selenium.json.JsonException: Expected to read a NAME but instead have: START_MAP. Last 17 characters read: {"id":4,"result":
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:300 undefined)
	at org.openqa.selenium.json.JsonInput.nextName(JsonInput.java:136 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:216 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	... 3 more
org.openqa.selenium.devtools.DevToolsException: Unable to make private java.lang.Void() accessible: module java.base does not "opens java.lang" to unnamed module @6537cf78
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: 'PMCLAP1338', ip: '192.168.207.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'
Driver info: DevTools Connection
	at org.openqa.selenium.devtools.DevTools.createSession(DevTools.java:125 undefined)
	at com.qa.selenium4.demo.devtools.CapturingPerformanceMetricTests.getPerformanceMetricsUsingCDPTest(CapturingPerformanceMetricTests.java:24 undefined)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78 undefined)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43 undefined)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567 undefined)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132 undefined)
	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599 undefined)
	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174 undefined)
	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46 undefined)
	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822 undefined)
	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147 undefined)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146 undefined)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128 undefined)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511 undefined)
	at org.testng.TestRunner.privateRun(TestRunner.java:764 undefined)
	at org.testng.TestRunner.run(TestRunner.java:585 undefined)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384 undefined)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378 undefined)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337 undefined)
	at org.testng.SuiteRunner.run(SuiteRunner.java:286 undefined)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53 undefined)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96 undefined)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218 undefined)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140 undefined)
	at org.testng.TestNG.runSuites(TestNG.java:1069 undefined)
	at org.testng.TestNG.run(TestNG.java:1037 undefined)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66 undefined)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109 undefined)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private java.lang.Void() accessible: module java.base does not "opens java.lang" to unnamed module @6537cf78
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357 undefined)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297 undefined)
	at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188 undefined)
	at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181 undefined)
	at org.openqa.selenium.json.InstanceCoercer.getConstructor(InstanceCoercer.java:155 undefined)
	at org.openqa.selenium.json.InstanceCoercer.test(InstanceCoercer.java:48 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$4(JsonTypeCoercer.java:134 undefined)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178 undefined)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812 undefined)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502 undefined)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488 undefined)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474 undefined)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150 undefined)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234 undefined)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.buildCoercer(JsonTypeCoercer.java:135 undefined)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708 undefined)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:124 undefined)
	at org.openqa.selenium.json.JsonInput.read(JsonInput.java:289 undefined)
	at org.openqa.selenium.devtools.Command.lambda$new$0(Command.java:41 undefined)
	at org.openqa.selenium.devtools.Connection.lambda$send$1(Connection.java:109 undefined)
	at org.openqa.selenium.devtools.Connection$NamedConsumer.accept(Connection.java:92 undefined)
	at org.openqa.selenium.devtools.Connection.handle(Connection.java:218 undefined)
	at org.openqa.selenium.devtools.Connection.access$200(Connection.java:55 undefined)
	at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:187 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130 undefined)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
Jul 22, 2021 1:24:31 PM org.openqa.selenium.remote.http.WebSocket$Listener onError
WARNING: Connection reset
java.net.SocketException: Connection reset
	at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394 undefined)
	at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426 undefined)
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253 undefined)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132 undefined)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350 undefined)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151 undefined)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719 undefined)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655 undefined)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581 undefined)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493 undefined)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989 undefined)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74 undefined)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30 undefined)
	at java.base/java.lang.Thread.run(Thread.java:831 undefined)
```

## Environment

OS: `Windows 10`
Browser: `Chrome`
Browser version: `92.0.4515.107`
Browser Driver version: `ChromeDriver 92.0.4515.43`
Language Bindings version: `Java jdk-16.0.1` 
Selenium Grid version (if applicable): `Not applicable`

#### Additionally, I have tried checking the same code with following environment configuration as well, and the results are same as mentioned in this issue.

OS: `Windows 10`
Browser: `Chrome`
Browser version: `91.0.4464.0`
Browser Driver version: `ChromeDriver 91.0.4472.101`
Se.cdp Version : `91.0.4464.0`
Language Bindings version: `Java jdk-16.0.1` 
Selenium Grid version (if applicable): `Not applicable`
package org.openqa.selenium.devtools;
import com.google.common.collect.ImmutableMap;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.json.JsonInput;
import java.lang.reflect.Type;
import java.util.Map;
import java.util.function.Function;
public class Command<X> {
  private final String method;
  private final Map<String, Object> params;
  private final Function<JsonInput, X> mapper;
  private final boolean sendsResponse;
  public Command(String method, Map<String, Object> params) {
    this(method, params, Void.class);
  }
  public Command(String method, Map<String, Object> params, Type typeOfX) {
    this(method, params, input -> input.read(Require.nonNull("Type to convert to", typeOfX)));
  }