ChromeDriver 111.0.5563.19 unable to establish connection to chrome

33,595 views
Skip to first unread message

xinchao zhang

unread,
Feb 14, 2023, 5:39:23 AM2/14/23
to ChromeDriver Users
Hi,

Our selenium tests against Chrome Beta all started to fail a few days ago since Chrome 111 moved into beta. All the tests throw exception when initializing the ChromiumDriver (version 111.0.5563.19):

Feb 14, 2023 6:22:46 PM org.openqa.selenium.remote.http.WebSocket$Listener onError
WARNING: Invalid Status code=403 text=Forbidden
java.io.IOException: Invalid Status code=403 text=Forbidden
    at org.asynchttpclient.netty.handler.WebSocketHandler.abort(WebSocketHandler.java:92)
    at org.asynchttpclient.netty.handler.WebSocketHandler.handleRead(WebSocketHandler.java:118)
Invalid Status code=403 text=Forbidden

    at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
    at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:833)

Exception in thread "main" org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:55989/devtools/browser/d9f96e05-4316-4f7c-b431-8b5586d81a28
Build info: version: '4.8.0', revision: '267030adea'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '13.1', java.version: '17.0.3'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.http.netty.NettyWebSocket.<init>(NettyWebSocket.java:102)
    at org.openqa.selenium.remote.http.netty.NettyWebSocket.lambda$create$3(NettyWebSocket.java:128)
    at org.openqa.selenium.remote.http.netty.NettyClient.openSocket(NettyClient.java:107)
    at org.openqa.selenium.devtools.Connection.<init>(Connection.java:78)
    at org.openqa.selenium.chromium.ChromiumDriver.lambda$new$2(ChromiumDriver.java:116)
    at java.base/java.util.Optional.map(Optional.java:260)
    at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:114)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:71)


It is the same even with a minimal setup:

System.setProperty("webdriver.chrome.driver","/Users/xinchao/.cache/selenium/chromedriver/mac-arm64/111.0.5563.19/chromedriver");
ChromeOptions ops = new ChromeOptions();
ops.setBinary("/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta");
WebDriver driver = new ChromeDriver(ops);
driver.get("https://www.google.com");

Not sure if it is an issue with the driver or an issue with selenium. Any help will be very much appreciated!

xinchao zhang

unread,
Feb 14, 2023, 6:09:53 AM2/14/23
to ChromeDriver Users
Actually, I have it figured out after enabling verbose logging of chromedriver:

[32332:259:0214/190812.204658:ERROR:devtools_http_handler.cc(766)] Rejected an incoming WebSocket connection from the http://localhost:58642 origin. Use the command line flag --remote-allow-origins=http://localhost:58642 to allow connections from this origin or --remote-allow-origins=* to allow all origins.

So I added the --remote-allow-origin=* to the ChromeOptions and I can successfully connect:

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Mark Owen

unread,
Mar 7, 2023, 5:48:05 PM3/7/23
to ChromeDriver Users
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.

John Castberg

unread,
Mar 7, 2023, 7:04:42 PM3/7/23
to ChromeDriver Users
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'

John Castberg

unread,
Mar 7, 2023, 7:38:51 PM3/7/23
to ChromeDriver Users
temporary fix here is to use firefox driver instead, working as expected

James Lawry

unread,
Mar 7, 2023, 8:32:13 PM3/7/23
to ChromeDriver Users
We are getting the same error.  Started today a couple hours ago after 111 released both locally and in our gitlab runners.

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50519/devtools/browser/d39d5d78-a788-495e-b43a-5c945d974ce9
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'sdg-mac334.local', ip: '2601:681:8004:57a0:0:0:0:5bfc%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.1', java.version: '17.0.4.1'

Here are the Selenium dependencies:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-devtools-v108</artifactId>
<version>4.7.2</version>
</dependency>

Dolph Lei

unread,
Mar 8, 2023, 1:21:28 AM3/8/23
to ChromeDriver Users
I got the same error, when the V111 is released. I've applied to the chromeDriver  v 111.0.5563.41.
No matter it's executed in headless or not, and for both windows/linux, the error the same.
And I even tried the --remote-allow-origins=*, 
the error still the same.

 [AsyncHttpClient-1-4] o.o.s.r.h.WebSocket$Listener: Invalid Status code=403 text=Forbidden

java.io.IOException: Invalid Status code=403 text=Forbidden

And cause the Google doesn't provide previous V110 download, may system is down there,
what a nightmare.



James Lawry 在 2023年3月8日 星期三上午9:32:13 [UTC+8] 的信中寫道:

sharanaprasad Mailar

unread,
Mar 8, 2023, 3:37:46 AM3/8/23
to ChromeDriver Users
Even I am getting same error with Chrome version  Version 111.0.5563.65 and Chrome driver version  ChromeDriver 111.0.5563.64

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:49183/devtools/browser/5e8d2420-a9be-4d67-9ae9-6511ba5c7786

Build info: version: '4.8.0', revision: '267030adea'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_331'

Driver info: driver.version: ChromeDriver
        at org.openqa.selenium.remote.http.netty.NettyWebSocket.<init>(NettyWebSocket.java:102)
        at org.openqa.selenium.remote.http.netty.NettyWebSocket.lambda$create$3(NettyWebSocket.java:128)
        at org.openqa.selenium.remote.http.netty.NettyClient.openSocket(NettyClient.java:107)
        at org.openqa.selenium.devtools.Connection.<init>(Connection.java:78)
        at org.openqa.selenium.chromium.ChromiumDriver.lambda$new$2(ChromiumDriver.java:116)
        at java.util.Optional.map(Optional.java:215)

        at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:114)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:71)
        at Genericlibrary.Base.launchApp(Base.java:146)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
        at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:523)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)



Ciddagoni Ravi

unread,
Mar 8, 2023, 3:41:29 AM3/8/23
to ChromeDriver Users
Even I got the same error using chrome V111 is released. 
but the workaround is reverting chrome-driver to the previous version 
WebDriverManager.chromedriver().driverVersion("110.0.5481").setup();
it's working for me.  pls, try it.

Just Like That !!

unread,
Mar 8, 2023, 3:50:38 AM3/8/23
to ChromeDriver Users
I was facing this issue from today morning, but after this it worked for me 


//WebDriverManager.chromedriver().browserVersion("111.0.5563.64").setup();

WebDriverManager.chromedriver().setup();

ChromeOptions options = new ChromeOptions();

//options.addArguments("--headless");

options.addArguments("--disable-notifications");

options.addArguments("--disable-gpu");

options.addArguments("--disable-extensions");

options.addArguments("--no-sandbox");

options.addArguments("--disable-dev-shm-usage");

options.addArguments("--remote-allow-origins=*");  // this i added  this and it worked, Thanks a ton  xinchao zhang !! 

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(capabilities);

wd = new ChromeDriver(options);

wd.manage().window().maximize();

wd.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(20));

wd.manage().timeouts().implicitlyWait(Duration.ofSeconds(20));



Sivaramakrishnan Selvakumar

unread,
Mar 8, 2023, 4:10:42 AM3/8/23
to ChromeDriver Users
Thanks xinchao zhang!
options.addArguments("--remote-allow-origins=*"); 
it's resolved my issue.

Dolph Lei

unread,
Mar 8, 2023, 4:24:32 AM3/8/23
to ChromeDriver Users
Yes,
options.addArguments("--remote-allow-origins=*"); 
did the trick!!

There's a typo on my previous revision.

Thank you all !!

Sivaramakrishnan Selvakumar 在 2023年3月8日 星期三下午5:10:42 [UTC+8] 的信中寫道:

sharanaprasad Mailar

unread,
Mar 8, 2023, 4:32:43 AM3/8/23
to ChromeDriver Users
Thanks a lot @ Just Like That !!,  xinchao zhang!

options.addArguments("--remote-allow-origins=*");  

is working !!!  .

usama sohail

unread,
Mar 8, 2023, 5:07:22 AM3/8/23
to ChromeDriver Users
@ sharanaprasad Mailar

options.addArguments("--remote-allow-origins=*");  

is working !!!  . 

Not working for me please help 


tarting ChromeDriver 111.0.5563.41 (976ef12907ef9b413c2d929c043307b415d27b9e-refs/branch-heads/5563@{#737}) on port 64403
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Mar 08, 2023 3:05:28 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
Mar 08, 2023 3:05:28 PM org.openqa.selenium.remote.http.WebSocket$Listener onError

WARNING: Invalid Status code=403 text=Forbidden
java.io.IOException: Invalid Status code=403 text=Forbidden
at org.asynchttpclient.netty.handler.WebSocketHandler.abort(WebSocketHandler.java:92)
at org.asynchttpclient.netty.handler.WebSocketHandler.handleRead(WebSocketHandler.java:118)
at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:314)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerCo

David Goodridge

unread,
Mar 8, 2023, 5:18:13 AM3/8/23
to ChromeDriver Users
Thanks, chromeOptions.addArguments("--remote-allow-origins=*"); does workaround the issue.

Could this be the change that introduced this behaviour? https://github.com/chromium/chromium/commit/0154caeefc74530d5cb57ce71608beb1b77bca39
PR description states "This CL should not affect non-browser clients such as Puppeteer and WebDriver" so I guess its a bug.

Milica Popovic

unread,
Mar 8, 2023, 5:57:04 AM3/8/23
to ChromeDriver Users
Thanks xinchao zhang ,  options.addArguments("--remote-allow-origins=*"); workaround also worked out for me!

Raider ALH

unread,
Mar 8, 2023, 6:33:21 AM3/8/23
to ChromeDriver Users
Thank you  xinchao zhang, it works for me with  "--remote-allow-origins=*"

Jitendra Reddy TS

unread,
Mar 8, 2023, 6:36:12 AM3/8/23
to ChromeDriver Users
This is not working when I'm trying to execute my script through debugger mode. 

String cmdCommand = "chrome.exe -remote-debugging-port=2708 --no-first-run --no-default-browser-check --user-data-dir=C:\\Users\\user1\\OneDrive\\Documents\\Chromedata";
String chromePath = "C:\\Program Files\\Google\\Chrome\\Application";
Runtime.getRuntime().exec("cmd /c start cmd.exe /K " + cmdCommand, null, new File(chromePath));
Thread.sleep(500);
Runtime.getRuntime().exec("taskkill /f /im cmd.exe");
WebDriverManager.chromedriver().setup();
ChromeOptions opt = new ChromeOptions();
opt.setExperimentalOption("debuggerAddress", "localhost:2708");
opt.addArguments("--disable notifications");
opt.addArguments("--remote-allow-origins=http://localhost:2708");

Any help with this?

Message has been deleted

jayachandran ramachandran

unread,
Mar 8, 2023, 10:27:47 AM3/8/23
to ChromeDriver Users
help me with this issue////
options.addArguments("--remote-allow-origins=*"); 
how and where to add this

John Guin

unread,
Mar 8, 2023, 10:52:33 AM3/8/23
to ChromeDriver Users
Jayachandran,

Without seeing your code, we won't be able to tell you where to add it.

In my codebase, I looked for the class where we were creating the WebDriver.  In my case, this named Browser.java.  We were already setting some arguments there using  the .addArguments() method on a ChromeOptions class and I added this command there.

So you could search your codebase for a few things.
1. Where you are creating a WebDriver object
2. Where you are already adding arguments to a ChromeOptions object

If #2 does not exist, you can set this up right before you create the WebDriver.  Again, for my codebase we do this with a call to new RemoteWebDriver(url, options) so you may want to see if you are calling that method.  That method is in the RemoteWebDriver class from Selenium, so you might want to look for usages of that class as well.

Ideally, you could also invoke and debug a unit test to validate behavior for your implementation here, but no such unit test may exist.

In any case, good luck!

James Lawry

unread,
Mar 8, 2023, 10:53:11 AM3/8/23
to ChromeDriver Users
Confirmed, the above does work.

you need to add it like this:

ChromeOptions chromeOptions = new ChromeOptions();

so here you declare a new ChromeOptions instance.

chromeOptions.addArguments("--remote-allow-origins=*");

then you add the argument like that ^^^

Titus Fortner

unread,
Mar 8, 2023, 11:28:01 AM3/8/23
to ChromeDriver Users
If people are using Java 11+ can you try using the new http client and see if that fixes the issue without needing to update the options?

Антон Страшевський

unread,
Mar 8, 2023, 11:52:03 AM3/8/23
to ChromeDriver Users
The Java 11+  variant with new http client worked for me with Selenium 4.5.0. Thank you Titus!

середа, 8 березня 2023 р. о 18:28:01 UTC+2 Titus Fortner пише:

James Lawry

unread,
Mar 8, 2023, 11:52:36 AM3/8/23
to ChromeDriver Users
https://bugs.chromium.org/p/chromium/issues/detail?id=1422444

I submitted this bug yesterday and got responses this morning.  Sounds like it was intentional and will need to file a bug with Selenium to stop setting the origin header.

James Lawry

unread,
Mar 8, 2023, 12:00:27 PM3/8/23
to ChromeDriver Users
https://github.com/SeleniumHQ/selenium/issues/11750

Here is the bug I submitted with Selenium.

Nicole Horner

unread,
Mar 8, 2023, 12:43:46 PM3/8/23
to ChromeDriver Users
This fixed it for me too, thanks!

Titus Fortner

unread,
Mar 8, 2023, 12:55:18 PM3/8/23
to ChromeDriver Users
TL;DR

1. If you are Java 11+ please use the new HTTP Client
2. Selenium will add this parameter to the Chrome service class by default for Java < 11 users (we already do this for Firefox); It will be in Selenium 4.9
3. If you can't update to Selenium 4.9 (when we release it) and can't upgrade to Java 11, you'll need to use: chromeOptions.addArguments("--remote-allow-origins=*")

Mohammad asghar Meo

unread,
Mar 8, 2023, 1:27:38 PM3/8/23
to ChromeDriver Users
Thank you it worked

Phaneesh Kashyap

unread,
Mar 8, 2023, 2:13:02 PM3/8/23
to ChromeDriver Users
version 111.0.5563.65

Works fine!!! 
when you add dependency

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-http-jdk-client</artifactId>

<version>4.5.0</version>

</dependency>


and add 

System.setProperty("webdriver.http.factory", "jdk-http-client");


Haonan Zhu

unread,
Mar 8, 2023, 6:59:22 PM3/8/23
to ChromeDriver Users
Use playwright to run npx playwright install to install chrome does not work.
Error message:
$ npx playwright install Downloading Chromium 111.0.5563.19 (playwright build v1048) from https://playwright.azureedge.net/builds/chromium/1048/chromium-linux.zip | | 0% of 143.7 Mb Failed to install browsers Error: Failed to download Chromium 111.0.5563.19 (playwright build v1048), caused by Error: end of central directory record signature not found at /home/vsts/work/1/s/Cloud-RPA/playwright-testing/node_modules/playwright-core/lib/zipBundleImpl.js:1:24033 at /home/vsts/work/1/s/Cloud-RPA/playwright-testing/node_modules/playwright-core/lib/zipBundleImpl.js:1:31712 at /home/vsts/work/1/s/Cloud-RPA/playwright-testing/node_modules/playwright-core/lib/zipBundleImpl.js:1:17288 at FSReqCallback.wrapper [as oncomplete] (node:fs:671:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. yarn run v1.22.19

Should I file a bug to yarn? 

Praveen Christopher Joseph

unread,
Mar 8, 2023, 8:21:54 PM3/8/23
to ChromeDriver Users
Hi All,

I have added the below line but it does not work out to my problem.

System.setProperty("webdriver.chrome.driver", "C:\\Praveen\\SeleniumTesting\\chromedriver_win32\\chromedriver.exe");

WebDriver driver = new ChromeDriver();

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

driver.quit();

Invalid Status code=403 text=Forbidden
java.io.IOException: Invalid Status code=403 text=Forbidden


Exception in thread "main" org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:51723/devtools/browser/3ad2985f-1c9e-475b-8dbe-81071c677ec4

Kindly help me to resolve this issue.

On Wednesday, March 8, 2023 at 12:04:42 AM UTC John Castberg wrote:
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'
On Tuesday, March 7, 2023 at 2:48:05 PM UTC-8 Mark Owen wrote:
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.


Bojana Radonjic

unread,
Mar 9, 2023, 5:01:57 AM3/9/23
to ChromeDriver Users
For me this not working, I have sesion error and message this is not permitted

Randall Wessel

unread,
Mar 9, 2023, 5:07:26 AM3/9/23
to ChromeDriver Users
For the FitNesse users, I got my test working again by adding a simple profile:

|script         |map fixture                       |
|set value      |remote-allow-origins=*|for|args[0]|
|$chromeProfile=|copy map                          |

|script          |selenium driver setup             |
|start driver for|chrome|with profile|$chromeProfile|



Op donderdag 9 maart 2023 om 11:01:57 UTC+1 schreef Bojana Radonjic:

Videomaster724

unread,
Mar 9, 2023, 6:19:45 AM3/9/23
to ChromeDriver Users
this works pretty well, thanks

Sugandha K.A.D.P

unread,
Mar 9, 2023, 7:00:45 AM3/9/23
to ChromeDriver Users
Thanks Just Like That !! ,  xinchao zhang . This was working for me.
 [AsyncHttpClient-1-4] o.o.s.r.h.WebSocket$Listener: Invalid Status code=403 text=Forbidden

java.io.IOException: Invalid Status code=403 text=Forbidden

And cause the Google doesn't provide previous V110 download, may system is down there,
what a nightmare.



James Lawry 在 2023年3月8日 星期三上午9:32:13 [UTC+8] 的信中寫道:
We are getting the same error.  Started today a couple hours ago after 111 released both locally and in our gitlab runners.

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50519/devtools/browser/d39d5d78-a788-495e-b43a-5c945d974ce9
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'sdg-mac334.local', ip: '2601:681:8004:57a0:0:0:0:5bfc%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.1', java.version: '17.0.4.1'

Here are the Selenium dependencies:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-java</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-devtools-v108</artifactId>
<version>4.7.2</version>
</dependency>
On Tuesday, March 7, 2023 at 5:38:51 PM UTC-7 John Castberg wrote:
temporary fix here is to use firefox driver instead, working as expected

On Tuesday, March 7, 2023 at 4:04:42 PM UTC-8 John Castberg wrote:
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'
On Tuesday, March 7, 2023 at 2:48:05 PM UTC-8 Mark Owen wrote:
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.


Salome Bozhadze

unread,
Mar 9, 2023, 7:16:06 AM3/9/23
to ChromeDriver Users
when i using   --remote-allow-origins=*  i have this error, can sombody help? java.lang.NoSuchMethodError: 'void org.openqa.selenium.chrome.ChromeDriver.<init>(org.openqa.selenium.chrome.ChromeDriverService, org.openqa.selenium.Capabilities)'

Prakasha M

unread,
Mar 9, 2023, 7:23:21 AM3/9/23
to ChromeDriver Users
thanks xinchao zhang!

Tanya Gorovykh

unread,
Mar 9, 2023, 9:58:41 AM3/9/23
to ChromeDriver Users

we have 2 frameworks, for one the following worked, for another didn't:options.addArguments("--remote-allow-origins=*"); 
Any other solutions for that?

Patryk Skalski

unread,
Mar 9, 2023, 10:10:56 AM3/9/23
to ChromeDriver Users
Tanya Gorovykh could you please check what versions of framework(selenium etc), chromedriver, chrome are you using in your projects? For me proposed workaround is also not working and I suspect that it may be related to version of 
selenium-chrome-driver we used in project

Salome Bozhadze

unread,
Mar 9, 2023, 10:23:02 AM3/9/23
to ChromeDriver Users
what is about selenide? what is solution?

Patryk Skalski

unread,
Mar 9, 2023, 10:33:45 AM3/9/23
to ChromeDriver Users

Rafael Gonçalves

unread,
Mar 9, 2023, 10:36:19 AM3/9/23
to ChromeDriver Users
Thanks! It really works!

 [AsyncHttpClient-1-4] o.o.s.r.h.WebSocket$Listener: Invalid Status code=403 text=Forbidden

java.io.IOException: Invalid Status code=403 text=Forbidden

And cause the Google doesn't provide previous V110 download, may system is down there,
what a nightmare.



James Lawry 在 2023年3月8日 星期三上午9:32:13 [UTC+8] 的信中寫道:
We are getting the same error.  Started today a couple hours ago after 111 released both locally and in our gitlab runners.

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50519/devtools/browser/d39d5d78-a788-495e-b43a-5c945d974ce9
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'sdg-mac334.local', ip: '2601:681:8004:57a0:0:0:0:5bfc%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.1', java.version: '17.0.4.1'

Here are the Selenium dependencies:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-devtools-v108</artifactId>
<version>4.7.2</version>
</dependency>

On Tuesday, March 7, 2023 at 5:38:51 PM UTC-7 John Castberg wrote:
temporary fix here is to use firefox driver instead, working as expected

On Tuesday, March 7, 2023 at 4:04:42 PM UTC-8 John Castberg wrote:
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'
On Tuesday, March 7, 2023 at 2:48:05 PM UTC-8 Mark Owen wrote:
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.


On Tuesday, February 14, 2023 at 3:09:53 AM UTC-8 xinchao zhang wrote:
Actually, I have it figured out after enabling verbose logging of chromedriver:

[32332:259:0214/190812.204658:ERROR:devtools_http_handler.cc(766)] Rejected an incoming WebSocket connection from the http://localhost:58642 origin. Use the command line flag --remote-allow-origins=http://localhost:58642 to allow connections from this origin or --remote-allow-origins=* to allow all origins.

So I added the --remote-allow-origin=* to the ChromeOptions and I can successfully connect:

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Kiran Nalam

unread,
Mar 9, 2023, 12:32:21 PM3/9/23
to ChromeDriver Users
I have tried options suggested, but no luck yet. Can some one throw an advise please.


Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 13894

Only local connections are allowed.

Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.

ChromeDriver was started successfully.

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: exited normally.

(unknown error: DevToolsActivePort file doesn't exist)

(The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Build info: version: '4.8.1', revision: '8ebccac989'

System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '21-ea'

Driver info: org.openqa.selenium.chrome.ChromeDriver

Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--disable-notifications, --disable-gpu, --disable-extensions, --no-sandbox, --disable-dev-shm-usage, --remote-allow-origins=*], extensions: [], prefs: {profile.default_content_setting_values.notifications: 2}}}], desiredCapabilities=Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--disable-notifications, --disable-gpu, --disable-extensions, --no-sandbox, --disable-dev-shm-usage, --remote-allow-origins=*], extensions: [], prefs: {profile.default_content_setting_values.notifications: 2}}}}]


Message has been deleted

AKASH RANI

unread,
Mar 9, 2023, 2:03:42 PM3/9/23
to ChromeDriver Users
I am also facing exactly the same issue... could not find solution.

Thanks
Akash

Hulya Kaya

unread,
Mar 9, 2023, 2:08:41 PM3/9/23
to ChromeDriver Users

I am also facing exactly the same issue. Could not find solution

Aysun TOPUŞ

unread,
Mar 9, 2023, 3:13:07 PM3/9/23
to ChromeDriver Users

that works thanksss   Just Like That !!,  xinchao zhang!

8 Mart 2023 Çarşamba tarihinde saat 11:50:38 UTC+3 itibarıyla Just Like That !! şunları yazdı:

Michele Waku

unread,
Mar 9, 2023, 3:55:34 PM3/9/23
to ChromeDriver Users
This worked for me after watching this video on youtube: I hope this helps
 https://www.youtube.com/watch?v=ICP5CcxF35k

                      WebDriverManager.chromedriver().setup();
                       ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
options.addArguments("--disable notifications");
DesiredCapabilities cp = new DesiredCapabilities();
cp.setCapability(ChromeOptions.CAPABILITY, options);
options.merge(cp);


Nic Coe

unread,
Mar 9, 2023, 8:41:04 PM3/9/23
to ChromeDriver Users
Thanks for the info here.
Just want to let everyone know that  --remote-allow-origins=*  is not a permanent solution as I believe it opens up cross-site scripting cyber vulnerabilities. Please ensure the flag is removed if it's not necessary.
Alternatively, you can actually specify the origin instead of using the * wildcard, but I'm yet to figure out exactly how to make that work.

Shehanth Wanigasinghe

unread,
Mar 10, 2023, 12:27:20 AM3/10/23
to ChromeDriver Users

This works for me.

Step 01: Add below dependency to POM.xml
       <dependency>
   <groupId>org.seleniumhq.selenium</groupId>

   <artifactId>selenium-http-jdk-client</artifactId>
   <version>4.5.0</version>
</dependency>

Step 02: Add this line below to the line you declare the chromedriver path
        System.setProperty("webdriver.http.factory", "jdk-http-client");

Step 03: Add these after calling chromeDriver object (WebDriver driver = new ChromeDriver();)
                ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Make sure you have Java 11+

Anna Shaira Kristienne Javier

unread,
Mar 10, 2023, 12:50:23 AM3/10/23
to ChromeDriver Users
Hi, I'm a beginner to programming, and whatever I do, it just doesn't seem to work. If someone can take a look at my code and see where it's wrong, it would be much appreciated. 

public class DemoAutomation {

String report = "Report:";

static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM-dd HH:mm");
String now = formatter.format(ZonedDateTime.now());

WebDriverWait wait1 = new WebDriverWait(driver, Duration.ofSeconds(5));
static ChromeOptions options = new ChromeOptions().addArguments("--remote-allow-origins=*").setExperimentalOption("debuggerAddress", "localhost:9014");
static WebDriver driver = new ChromeDriver(options);

public void setUp() {

report(report);
report("Time started: " + now + "\n");

System.setProperty("webdriver.chrome.driver",
"C:\\Users\\Anna\\Downloads\\chromedriver_win32 (1)\\chromedriver.exe");

driver.manage().window().maximize();
options.addArguments("--disable-notifications");
driver.get("www.insertwebsitehere");

Any help would be much appreciated

srinivasan S

unread,
Mar 10, 2023, 1:38:55 AM3/10/23
to ChromeDriver Users

try this one...


WebDriverManager.chromedriver().browserVersion("111.0.5563.19").setup();

WebDriverManager.chromedriver().setup();

ChromeOptions options = new ChromeOptions();

options.addArguments("--remote-allow-origins=*");

DesiredCapabilities cp=new DesiredCapabilities();

cp.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(cp);

 driver = new ChromeDriver(options);

shantha laxmi kumar

unread,
Mar 10, 2023, 5:10:32 AM3/10/23
to ChromeDriver Users
I tried above code, but i am always getting this ,

ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.

  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: 'CDC2-L-134492D', ip: '192.168.0.136'

Build info: version: '4.8.1', revision: '8ebccac989'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.4.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}], desiredCapabilities=Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}}]
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:148)


Although i am using compatible versions as highlighted below,
- chrome : 111.0.5563.65 
- chrome driver : 111.0.5563.64
- Selenium : 4.8.1
- JDK - 11

I am stuck with issue since chrome version 110.. Please help me work this out !!

Amarthyanadh Thambi

unread,
Mar 10, 2023, 7:27:54 AM3/10/23
to ChromeDriver Users
I have tried with one way way and it got worked. Please find the code below.

public class Sample {

public static void main(String[] args) {

ChromeOptions options = new ChromeOptions();

options.addArguments("--remote-allow-origins=*");

//WebDriverManager.chromedriver().setup();

WebDriverManager.chromedriver().driverVersion("110.0.5481").setup();

WebDriver driver = new ChromeDriver(options);

driver.get("https://www.demoqa.com");

driver.quit();

}

}


pankaj kumar

unread,
Mar 10, 2023, 8:14:16 AM3/10/23
to ChromeDriver Users
--remote-allow-origins=*; worked for me as well !! Thank You, Saved My Day !!

Dharmendra Kumar Singh

unread,
Mar 10, 2023, 1:07:48 PM3/10/23
to ChromeDriver Users
Hi All,
I have added the code but option.addArguments is causing the problem, I have highlighted it below, shall anybody please help?

Issue.png

shaveta peerislands

unread,
Mar 10, 2023, 1:26:46 PM3/10/23
to ChromeDriver Users
if (browserName.equals(Constants.CHROME_BROWSER)) {
System.out.println("browsername is"+browserName);
WebDriverManager.chromedriver().setup();
ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");
driver = new ChromeDriver(ops);


} tried this but still getting the same error 

shaveta peerislands

unread,
Mar 10, 2023, 1:32:08 PM3/10/23
to ChromeDriver Users
it worked for me . Need to add agruments as weill as set capabilities. 
System.out.println("browsername is"+browserName);
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
DesiredCapabilities cp=new DesiredCapabilities();

cp.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(cp);

driver = new ChromeDriver(options);


}

dairon jaimes

unread,
Mar 10, 2023, 4:31:13 PM3/10/23
to ChromeDriver Users
Hi people, this code block its worf for me :

ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--incognito");
chromeOptions.addArguments("--remote-allow-origins=*");
driver = new ChromeDriver(chromeOptions);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(ChromeOptions.CAPABILITY,chromeOptions);
chromeOptions.merge(cap);
driver.manage().window().maximize();
driver.manage().deleteAllCookies();
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(20));
driver.get(baseUrl);


David Flynn

unread,
Mar 10, 2023, 5:20:42 PM3/10/23
to ChromeDriver Users
Hi all,

I managed to get this working by doing the following:

I added the following dependency to the pom.xml file:

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-http-jdk-client</artifactId>

<version>4.5.0</version>

</dependency>

And in the .java file I added the below code:

ChromeOptions options = new ChromeOptions();

options.addArguments("--remote-allow-origins=*");

System.setProperty("webdriver.http.factory", "jdk-http-client");


This has resolved the issue for me currently, hopefully it helps others too. Note, this code also seems to work when I have commented out the "--remote-allow-origins" line of code also.

Naveen AutomationLabs

unread,
Mar 10, 2023, 11:53:02 PM3/10/23
to ChromeDriver Users
Add this chrome options:

ChromeOptions co = new ChromeOptions();

co.addArguments("--remote-allow-origins=*");

WebDriver driver = new ChromeDriver(co);

driver.get("https://www.google.com");

System.out.println(driver.getTitle());


Satya Das

unread,
Mar 11, 2023, 2:48:01 AM3/11/23
to ChromeDriver Users
Which Eclipse Version and Selenium Jar version you are using? bkz same code is not working for me when i use Eclipse ( 2022-03 (4.23.0)) version with Chrome 111 version.

On Wednesday, March 8, 2023 at 2:20:38 PM UTC+5:30 Just Like That !! wrote:
I was facing this issue from today morning, but after this it worked for me 


//WebDriverManager.chromedriver().browserVersion("111.0.5563.64").setup();

WebDriverManager.chromedriver().setup();

ChromeOptions options = new ChromeOptions();

//options.addArguments("--headless");

options.addArguments("--disable-notifications");

options.addArguments("--disable-gpu");

options.addArguments("--disable-extensions");

options.addArguments("--no-sandbox");

options.addArguments("--disable-dev-shm-usage");

options.addArguments("--remote-allow-origins=*");  // this i added  this and it worked, Thanks a ton  xinchao zhang !! 

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(capabilities);

wd = new ChromeDriver(options);

wd.manage().window().maximize();

wd.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(20));

wd.manage().timeouts().implicitlyWait(Duration.ofSeconds(20));


On Wednesday, 8 March 2023 at 14:11:29 UTC+5:30 Ciddagoni Ravi wrote:
Even I got the same error using chrome V111 is released. 
but the workaround is reverting chrome-driver to the previous version 
WebDriverManager.chromedriver().driverVersion("110.0.5481").setup();
it's working for me.  pls, try it.

On Wednesday, March 8, 2023 at 11:51:28 AM UTC+5:30 Dolph Lei wrote:
I got the same error, when the V111 is released. I've applied to the chromeDriver  v 111.0.5563.41.
No matter it's executed in headless or not, and for both windows/linux, the error the same.
And I even tried the --remote-allow-origins=*, 
the error still the same.

 [AsyncHttpClient-1-4] o.o.s.r.h.WebSocket$Listener: Invalid Status code=403 text=Forbidden

java.io.IOException: Invalid Status code=403 text=Forbidden

And cause the Google doesn't provide previous V110 download, may system is down there,
what a nightmare.



James Lawry 在 2023年3月8日 星期三上午9:32:13 [UTC+8] 的信中寫道:
We are getting the same error.  Started today a couple hours ago after 111 released both locally and in our gitlab runners.

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50519/devtools/browser/d39d5d78-a788-495e-b43a-5c945d974ce9
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'sdg-mac334.local', ip: '2601:681:8004:57a0:0:0:0:5bfc%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.1', java.version: '17.0.4.1'

Here are the Selenium dependencies:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-java</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-devtools-v108</artifactId>
<version>4.7.2</version>
</dependency>
On Tuesday, March 7, 2023 at 5:38:51 PM UTC-7 John Castberg wrote:
temporary fix here is to use firefox driver instead, working as expected

On Tuesday, March 7, 2023 at 4:04:42 PM UTC-8 John Castberg wrote:
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'
On Tuesday, March 7, 2023 at 2:48:05 PM UTC-8 Mark Owen wrote:
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.


On Tuesday, February 14, 2023 at 3:09:53 AM UTC-8 xinchao zhang wrote:
Actually, I have it figured out after enabling verbose logging of chromedriver:

[32332:259:0214/190812.204658:ERROR:devtools_http_handler.cc(766)] Rejected an incoming WebSocket connection from the http://localhost:58642 origin. Use the command line flag --remote-allow-origins=http://localhost:58642 to allow connections from this origin or --remote-allow-origins=* to allow all origins.

So I added the --remote-allow-origin=* to the ChromeOptions and I can successfully connect:

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Veena K

unread,
Mar 11, 2023, 2:51:01 AM3/11/23
to ChromeDriver Users

ChromeOptions co = new ChromeOptions();

co.addArguments("--remote-allow-origins=*");

WebDriver driver = new ChromeDriver(co);

driver.get("https://www.google.com");

System.out.println(driver.getTitle());

 for me above code worked ....but is this a permanent FIX?

Dharmendra Kumar Singh

unread,
Mar 11, 2023, 3:33:34 AM3/11/23
to ChromeDriver Users
For me it's a compiler error:
Please help.

Issue_02.png

Venkata Avija

unread,
Mar 11, 2023, 6:52:40 AM3/11/23
to ChromeDriver Users
Getting below error message, Can some one please help me to resolve the issue.
 
Screen Shot 2023-03-11 at 5.49.28 AM.png

Paresh

unread,
Mar 11, 2023, 8:56:46 AM3/11/23
to ChromeDriver Users
Thanks xinchao zhang, This worked !!

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Bojana Radonjic

unread,
Mar 11, 2023, 1:33:22 PM3/11/23
to ChromeDriver Users
For me threre is this error:
Whisc driver you use? Tnx
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Mar 11, 2023 7:32:10 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 111, so returning the closest version found: 110

Satya Das

unread,
Mar 12, 2023, 9:10:59 AM3/12/23
to ChromeDriver Users
Using the above code not working for me.is there any Eclipse or selenium jar  combability needs to consider? I am using Selenium 3.5 with eclipse 2022-03.
Message has been deleted

Roshan Jha

unread,
Mar 13, 2023, 3:03:12 AM3/13/23
to ChromeDriver Users

Hey, I am running some tests that require the usage of mobile emulation module from devtools service(https://webdriver.io/docs/devtools-service/#device-emulation)
And I am running these tests only on chrome: using these 2 packages (https://webdriver.io/docs/wdio-chromedriver-service/#installationchromedriver and wdio-chromedriver-service.
And the version of the chrome browser is: Version 111.0.5563.64 (Official Build) (x86_64)

Whenever the command await browser.emulateDevice("deviceName") is executed by the testrunner using chromedriver and wdio-chromedriver an error comes up:
ERROR @wdio/utils:shim: TypeError: Failed to fetch browser webSocket URL from http://localhost:51612/json/version: fetch failed

When tried using selenium standalone service received the error from same:ERROR @wdio/utils:shim: socket hang up

And then an error comes up saying await browser.emulateDevice() is not a function comes up


How can I add remote-allow-origin flag in webdriver io file?

Faizan Mamji

unread,
Mar 13, 2023, 3:18:10 AM3/13/23
to ChromeDriver Users
Hello Everyone,

I have upgraded Java to 15 version.
Browser launching successfully for me if i am not using headless.

But when i am trying with headless it doesn't work for me.
Getting this below error.
Can anyone please help me to resolve this issue?

For reference i am adding the code as well.

public WebDriver launchWebBrowser(String browserName, String appUrl) { System.setProperty("webdriver.http.factory", "jdk-http-client"); DesiredCapabilities capss = new DesiredCapabilities(); ChromeOptions options = new ChromeOptions(); try { options.setAcceptInsecureCerts(true); options.setExperimentalOption("excludeSwitches", Arrays.asList("test-type")); options.addArguments("--headless=new"); options.addArguments("--disable-web-security"); options.addArguments("--no-sandbox"); options.addArguments("start-maximized"); options.addArguments("--disable-dev-shm-usage"); options.addArguments("--disable-gpu"); options.addArguments("--print-to-pdf"); options.addArguments("--allow-running-insecure-content"); capss.setCapability(ChromeOptions.CAPABILITY, options); capss.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true); options.merge(capss); if (browserName.equalsIgnoreCase("chrome")) { WebDriverManager.chromedriver().setup(); driverWeb = new ChromeDriver(options); } else if (browserName.equalsIgnoreCase("firefox")) { WebDriverManager.firefoxdriver().setup(); driverWeb = new FirefoxDriver(); } driverWeb.navigate().to(appUrl); driverWeb.manage().window().maximize(); System.out.println("Browser size is " + driverWeb.manage().window().getSize()); tWdriver.set(driverWeb); driverWeb.manage().timeouts().implicitlyWait(Duration.ofSeconds(Integer.parseInt(PropertyReader.getConfigValue(configFile, "implicitWait")))); } catch (Exception ex) { Assert.fail("Issue in launching browser - " + ex.getMessage()); } return driverWeb; } **Error I am Getting when running headless** Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 36269 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Mar 13, 2023 9:47:38 AM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch WARNING: Unable to find an exact match for CDP version 111, so returning the closest version found: 110 junit.framework.AssertionFailedError: Issue in launching browser - no such window: target window already closed from unknown error: web view not found (Session info: chrome=111.0.5563.64) Build info: version: '4.8.1', revision: '8ebccac989' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.16', java.version: '15.0.2' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [8f586fb87f597bc9007bdb76dfbe218b, get {url=https://test-caseworker-portal.platform.rer.dev/}] Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 111.0.5563.64, chrome: {chromedriverVersion: 111.0.5563.64 (c710e93d5b63..., userDataDir: /var/folders/v8/mrd778lx16n...}, goog:chromeOptions: {debuggerAddress: localhost:54038}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: MAC, proxy: Proxy(), se:cdp: ws://localhost:54038/devtoo..., se:cdpVersion: 111.0.5563.64, 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} Session ID: 8f586fb87f597bc9007bdb76dfbe218b Please suggest the workaround for headless.

Sergio Luis Anaya Romero

unread,
Mar 13, 2023, 11:29:45 AM3/13/23
to ChromeDriver Users
Buenos dias
Para los que usamos serenty.conf
chrome.switches="""--remote-allow-origins=*"""

shilpa goel

unread,
Mar 14, 2023, 12:52:29 AM3/14/23
to ChromeDriver Users

Adding

<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-http-jdk-client</artifactId> </dependency>

and

System.setProperty("webdriver.http.factory", "jdk-http-client");


working fine with my test cases...same problem i was facing

Jonas M

unread,
Mar 14, 2023, 2:33:55 AM3/14/23
to ChromeDriver Users
I had the same issue with same Chrome version, the line you added solved my problem, thank you so much, it was a nightmare.
Yesterday everything was working fine, and today something out of the blue making things fail, wierd. I hope someone filed a bug about this.

BR
Youness

On Wednesday, March 8, 2023 at 12:50:38 PM UTC+4 Just Like That !! wrote:
I was facing this issue from today morning, but after this it worked for me 


//WebDriverManager.chromedriver().browserVersion("111.0.5563.64").setup();

WebDriverManager.chromedriver().setup();

ChromeOptions options = new ChromeOptions();

//options.addArguments("--headless");

options.addArguments("--disable-notifications");

options.addArguments("--disable-gpu");

options.addArguments("--disable-extensions");

options.addArguments("--no-sandbox");

options.addArguments("--disable-dev-shm-usage");

options.addArguments("--remote-allow-origins=*");  // this i added  this and it worked, Thanks a ton  xinchao zhang !! 

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(capabilities);

wd = new ChromeDriver(options);

wd.manage().window().maximize();

wd.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(20));

wd.manage().timeouts().implicitlyWait(Duration.ofSeconds(20));


On Wednesday, 8 March 2023 at 14:11:29 UTC+5:30 Ciddagoni Ravi wrote:
Even I got the same error using chrome V111 is released. 
but the workaround is reverting chrome-driver to the previous version 
WebDriverManager.chromedriver().driverVersion("110.0.5481").setup();
it's working for me.  pls, try it.

On Wednesday, March 8, 2023 at 11:51:28 AM UTC+5:30 Dolph Lei wrote:
I got the same error, when the V111 is released. I've applied to the chromeDriver  v 111.0.5563.41.
No matter it's executed in headless or not, and for both windows/linux, the error the same.
And I even tried the --remote-allow-origins=*, 
the error still the same.

 [AsyncHttpClient-1-4] o.o.s.r.h.WebSocket$Listener: Invalid Status code=403 text=Forbidden

java.io.IOException: Invalid Status code=403 text=Forbidden

And cause the Google doesn't provide previous V110 download, may system is down there,
what a nightmare.



James Lawry 在 2023年3月8日 星期三上午9:32:13 [UTC+8] 的信中寫道:
We are getting the same error.  Started today a couple hours ago after 111 released both locally and in our gitlab runners.

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50519/devtools/browser/d39d5d78-a788-495e-b43a-5c945d974ce9
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'sdg-mac334.local', ip: '2601:681:8004:57a0:0:0:0:5bfc%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.1', java.version: '17.0.4.1'

Here are the Selenium dependencies:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-java</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-devtools-v108</artifactId>
<version>4.7.2</version>
</dependency>
On Tuesday, March 7, 2023 at 5:38:51 PM UTC-7 John Castberg wrote:
temporary fix here is to use firefox driver instead, working as expected

On Tuesday, March 7, 2023 at 4:04:42 PM UTC-8 John Castberg wrote:
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'
On Tuesday, March 7, 2023 at 2:48:05 PM UTC-8 Mark Owen wrote:
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.


On Tuesday, February 14, 2023 at 3:09:53 AM UTC-8 xinchao zhang wrote:
Actually, I have it figured out after enabling verbose logging of chromedriver:

[32332:259:0214/190812.204658:ERROR:devtools_http_handler.cc(766)] Rejected an incoming WebSocket connection from the http://localhost:58642 origin. Use the command line flag --remote-allow-origins=http://localhost:58642 to allow connections from this origin or --remote-allow-origins=* to allow all origins.

So I added the --remote-allow-origin=* to the ChromeOptions and I can successfully connect:

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Gayathri Arasu

unread,
Mar 14, 2023, 3:14:35 AM3/14/23
to ChromeDriver Users
It worked out for me also!!!
Thanks!

Volodymyr Oliinyk

unread,
Mar 14, 2023, 5:45:04 AM3/14/23
to ChromeDriver Users
Works for selenide:

Configuration.browserCapabilities = new ChromeOptions().addArguments("--remote-allow-origins=*");

Миша Горбунов

unread,
Mar 14, 2023, 7:52:52 AM3/14/23
to ChromeDriver Users
I don't have the ability to edit ChromeOptions - it's read-only. What can I do in this case?

вторник, 14 марта 2023 г. в 12:45:04 UTC+3, Volodymyr Oliinyk:

Gaurav Jani

unread,
Mar 14, 2023, 8:11:32 AM3/14/23
to ChromeDriver Users
Миша Горбунов,

In that case try adding this dependency
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-http-jdk-client</artifactId> </dependency>

and

System.setProperty("webdriver.http.factory", "jdk-http-client");

then it should work fine

AndroidMalaya

unread,
Mar 15, 2023, 1:57:49 AM3/15/23
to ChromeDriver Users

WebDriverManager.chromedriver().setup();

ChromeOptions options = new ChromeOptions();

options.addArguments("--remote-allow-origins=*");

options.addArguments("--disable notifications");

DesiredCapabilities cp = new DesiredCapabilities();

cp.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(cp);

WebDriver driver = new ChromeDriver(options);

// Navigate to the website

driver.get("https://cfgwtest.cgi.com:8085/CGPINT3/index.aspx");


//now it is working. thank you

keshav Kumar

unread,
Mar 15, 2023, 9:38:30 AM3/15/23
to ChromeDriver Users
Adding  --remote-allow-origins=* in the argument and  selenium-http-jdk-client dependency worked for me. Check below for more details. 

Message has been deleted

张理想

unread,
Mar 16, 2023, 9:12:40 PM3/16/23
to ChromeDriver Users
如果加了 --remote-allow-origins=*    session不作用了  

张理想

unread,
Mar 16, 2023, 9:54:34 PM3/16/23
to ChromeDriver Users
SessionScope  is  failure

在2023年2月14日星期二 UTC+8 19:09:53<xinchao zhang> 写道:
Actually, I have it figured out after enabling verbose logging of chromedriver:

[32332:259:0214/190812.204658:ERROR:devtools_http_handler.cc(766)] Rejected an incoming WebSocket connection from the http://localhost:58642 origin. Use the command line flag --remote-allow-origins=http://localhost:58642 to allow connections from this origin or --remote-allow-origins=* to allow all origins.

So I added the --remote-allow-origin=* to the ChromeOptions and I can successfully connect:

ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");

Denis Molin

unread,
Mar 17, 2023, 7:00:33 AM3/17/23
to ChromeDriver Users
Thanks , that was working now) 

среда, 8 марта 2023 г. в 20:13:02 UTC+1, Phaneesh Kashyap:
version 111.0.5563.65

Works fine!!! 
when you add dependency

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-http-jdk-client</artifactId>

<version>4.5.0</version>

</dependency>


and add 

System.setProperty("webdriver.http.factory", "jdk-http-client");


On Wednesday, March 8, 2023 at 11:57:38 PM UTC+5:30 Mohammad asghar Meo wrote:
Thank you it worked

sahil sharma

unread,
Mar 19, 2023, 9:20:07 AM3/19/23
to ChromeDriver Users

Whosoever facing issue with latest chrome exe   should try like this it must work.

 ChromeOptions option = new ChromeOptions();
         option.addArguments("--remote-allow-origins=*");
ChromeDriver driver=new ChromeDriver(option);
driver.get("https://www.google.com/");

Regards
Sahil Sharma

waqar jan

unread,
Mar 21, 2023, 10:38:48 AM3/21/23
to ChromeDriver Users
This also worked for me. Thanks

Ankit Solanki

unread,
Mar 21, 2023, 10:48:08 AM3/21/23
to ChromeDriver Users
Hi,

we just need to set the property and add the dependency and it' done.

System.setProperty("webdriver.http.factory", "jdk-http-client");<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.8.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-http-jdk-client</artifactId> <version>4.8.1</version> </dependency>

Henry trujillo anaya

unread,
Mar 23, 2023, 8:19:00 PM3/23/23
to ChromeDriver Users
Thanks too much. It is working now:

We added the code:
System.setProperty("webdriver.http.factory", "jdk-http-client");

And We added the dependency(in the POM file):
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.8.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-http-jdk-client</artifactId> <version>4.8.1</version> </dependency>  


Виктория Авраменко

unread,
Mar 27, 2023, 4:11:48 AM3/27/23
to ChromeDriver Users
I use Selenide. I fixed it when I updated all selenide versions in the build.gradle file (dependencies). Other trying didn't help me.
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'

implementation(
'com.codeborne:selenide:6.12.3',
'org.aspectj:aspectjweaver:1.9.19'
)

testCompileOnly(
"org.junit.jupiter:junit-jupiter-api:$junit5Ver",
"org.junit.jupiter:junit-jupiter-params:$junit5Ver"
)

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit5Ver")
}

пятница, 24 марта 2023 г. в 02:19:00 UTC+2, Henry trujillo anaya:

Haseeb umer

unread,
Mar 27, 2023, 7:28:45 AM3/27/23
to ChromeDriver Users
unable to run test cases for chromedriver again. i have used addArguments("--remote-allow-origins=*"); and System.setProperty("webdriver.http.factory", "jdk-http-client");
Message has been deleted

Paurnima Sankar

unread,
Mar 28, 2023, 7:08:27 AM3/28/23
to ChromeDriver Users
For selenide users, as mentioned in above comment upgrade to below selenide version worked
<selenide.version>6.12.3</selenide.version>

Дмитрий Зубенко

unread,
Mar 28, 2023, 2:49:04 PM3/28/23
to ChromeDriver Users
Well, adding suggested dependencies in pom.xml did a great work, but now there is a question: Should it be included in every project?)

вторник, 28 марта 2023 г. в 14:08:27 UTC+3, Paurnima Sankar:

Robert Turner

unread,
Mar 28, 2023, 2:53:10 PM3/28/23
to Дмитрий Зубенко, ChromeDriver Users
Include it in any project that runs the Selenium Java code to set up your Selenium sessions. If you have a library your test projects sit on that starts yoru Selenium sessions, then that would be the only project that would need a direct dependency.

Or, the simpler explanation, any project you are currently including the Selenium packages would need the same dependencies and changes...


--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chromedriver-users/226b6fa7-65e5-47e0-a644-f31c99357075n%40googlegroups.com.

suganya s

unread,
Mar 29, 2023, 4:28:32 PM3/29/23
to ChromeDriver Users
Someone please respond for this, I too couldn't work with debugger browser with chrome version 111.*

On Wednesday, March 8, 2023 at 5:06:12 PM UTC+5:30 Jitendra Reddy TS wrote:
This is not working when I'm trying to execute my script through debugger mode. 

String cmdCommand = "chrome.exe -remote-debugging-port=2708 --no-first-run --no-default-browser-check --user-data-dir=C:\\Users\\user1\\OneDrive\\Documents\\Chromedata";
String chromePath = "C:\\Program Files\\Google\\Chrome\\Application";
Runtime.getRuntime().exec("cmd /c start cmd.exe /K " + cmdCommand, null, new File(chromePath));
Thread.sleep(500);
Runtime.getRuntime().exec("taskkill /f /im cmd.exe");
WebDriverManager.chromedriver().setup();
ChromeOptions opt = new ChromeOptions();
opt.setExperimentalOption("debuggerAddress", "localhost:2708");
opt.addArguments("--disable notifications");
opt.addArguments("--remote-allow-origins=http://localhost:2708");

Any help with this?

On Wednesday, March 8, 2023 at 4:27:04 PM UTC+5:30 Milica Popovic wrote:
Thanks xinchao zhang ,  options.addArguments("--remote-allow-origins=*"); workaround also worked out for me!

On Wednesday, March 8, 2023 at 11:18:13 AM UTC+1 David Goodridge wrote:
Thanks, chromeOptions.addArguments("--remote-allow-origins=*"); does workaround the issue.

Could this be the change that introduced this behaviour? https://github.com/chromium/chromium/commit/0154caeefc74530d5cb57ce71608beb1b77bca39
PR description states "This CL should not affect non-browser clients such as Puppeteer and WebDriver" so I guess its a bug.

On Wednesday, March 8, 2023 at 11:07:22 AM UTC+1 usama sohail wrote:
@ sharanaprasad Mailar

options.addArguments("--remote-allow-origins=*");  

is working !!!  . 

Not working for me please help 


tarting ChromeDriver 111.0.5563.41 (976ef12907ef9b413c2d929c043307b415d27b9e-refs/branch-heads/5563@{#737}) on port 64403

Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Mar 08, 2023 3:05:28 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
Mar 08, 2023 3:05:28 PM org.openqa.selenium.remote.http.WebSocket$Listener onError

WARNING: Invalid Status code=403 text=Forbidden
java.io.IOException: Invalid Status code=403 text=Forbidden
at org.asynchttpclient.netty.handler.WebSocketHandler.abort(WebSocketHandler.java:92)
at org.asynchttpclient.netty.handler.WebSocketHandler.handleRead(WebSocketHandler.java:118)
at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:314)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerCo
On Wednesday, March 8, 2023 at 2:32:43 PM UTC+5 sharanaprasad Mailar wrote:
Thanks a lot @ Just Like That !!,  xinchao zhang!

options.addArguments("--remote-allow-origins=*");  

is working !!!  .

On Wednesday, 8 March 2023 at 14:54:32 UTC+5:30 Dolph Lei wrote:
Yes,
options.addArguments("--remote-allow-origins=*"); 
did the trick!!

There's a typo on my previous revision.

Thank you all !!

Sivaramakrishnan Selvakumar 在 2023年3月8日 星期三下午5:10:42 [UTC+8] 的信中寫道:
Thanks xinchao zhang!
options.addArguments("--remote-allow-origins=*"); 
it's resolved my issue.


On Wednesday, 8 March 2023 at 14:20:38 UTC+5:30 Just Like That !! wrote:
I was facing this issue from today morning, but after this it worked for me 


//WebDriverManager.chromedriver().browserVersion("111.0.5563.64").setup();

WebDriverManager.chromedriver().setup();

ChromeOptions options = new ChromeOptions();

//options.addArguments("--headless");

options.addArguments("--disable-notifications");

options.addArguments("--disable-gpu");

options.addArguments("--disable-extensions");

options.addArguments("--no-sandbox");

options.addArguments("--disable-dev-shm-usage");

options.addArguments("--remote-allow-origins=*");  // this i added  this and it worked, Thanks a ton  xinchao zhang !! 

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

options.merge(capabilities);

wd = new ChromeDriver(options);

wd.manage().window().maximize();

wd.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(20));

wd.manage().timeouts().implicitlyWait(Duration.ofSeconds(20));


On Wednesday, 8 March 2023 at 14:11:29 UTC+5:30 Ciddagoni Ravi wrote:
Even I got the same error using chrome V111 is released. 
but the workaround is reverting chrome-driver to the previous version 
WebDriverManager.chromedriver().driverVersion("110.0.5481").setup();
it's working for me.  pls, try it.

On Wednesday, March 8, 2023 at 11:51:28 AM UTC+5:30 Dolph Lei wrote:
I got the same error, when the V111 is released. I've applied to the chromeDriver  v 111.0.5563.41.
No matter it's executed in headless or not, and for both windows/linux, the error the same.
And I even tried the --remote-allow-origins=*, 
the error still the same.

 [AsyncHttpClient-1-4] o.o.s.r.h.WebSocket$Listener: Invalid Status code=403 text=Forbidden

java.io.IOException: Invalid Status code=403 text=Forbidden

And cause the Google doesn't provide previous V110 download, may system is down there,
what a nightmare.



James Lawry 在 2023年3月8日 星期三上午9:32:13 [UTC+8] 的信中寫道:
We are getting the same error.  Started today a couple hours ago after 111 released both locally and in our gitlab runners.

org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50519/devtools/browser/d39d5d78-a788-495e-b43a-5c945d974ce9
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'sdg-mac334.local', ip: '2601:681:8004:57a0:0:0:0:5bfc%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.1', java.version: '17.0.4.1'

Here are the Selenium dependencies:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.4.0</version>

</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-devtools-v108</artifactId>
<version>4.7.2</version>
</dependency>
On Tuesday, March 7, 2023 at 5:38:51 PM UTC-7 John Castberg wrote:
temporary fix here is to use firefox driver instead, working as expected

On Tuesday, March 7, 2023 at 4:04:42 PM UTC-8 John Castberg wrote:
Chromedriver: 110.0.5481.77
Selenium: 4.3.0

adding the --remote-allow-origins=* got windows to start popping up, but i still got the same exception

java.io.IOException: Invalid Status code=403 text=Forbidden

Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class net.thucydides.core.webdriver.ProvidedDriver

Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50730/devtools/browser/0050b064-7c41-4ac6-a0f3-357a5acecf68
Build info: version: '4.3.0', revision: 'a4995e2c09*'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.5'
On Tuesday, March 7, 2023 at 2:48:05 PM UTC-8 Mark Owen wrote:
I'm seeing this as well with 111.0.5563.19 when running tests on my machine on apps using Selenium 4.1.4.  It spins up browser windows but no content loads.
 This does not happen with an app using Selenium 3.14159.


Message has been deleted
Message has been deleted

Bhakti Gajjar

unread,
Mar 31, 2023, 2:59:27 AM3/31/23
to ChromeDriver Users
Hi Suganya S,

You can check my whole code block as following that how I have setup in my code to get the idea of fixing this issue :D 

Here is my fix: 

public class StaticDropDown {

public static void main(String[] args) throws InterruptedException {

// TODO Auto-generated method stub

//System.setProperty("webDriver.chrome.driver", "...\\chromedriver_win32.exe");

//driver.get(Base URL);

//dropdown with select tag - static

//WebDriverManager.chromeDriver().setup();

System.setProperty("webdriver.http.factory", "jdk-http-client");

WebDriver driver = new ChromeDriver();

//////////////////////////////////////////////////////////////////////////


ChromeOptions options = new ChromeOptions();

options.addArguments("--incognito");

options.addArguments("--remote-allow-origins=*");

driver = new ChromeDriver(options);


DesiredCapabilities cap = new DesiredCapabilities();

cap.setCapability(ChromeOptions.CAPABILITY,options);

options.merge(cap);

driver.manage().window().maximize();

driver.manage().deleteAllCookies();

driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(20));

driver.get("Base URL");

//////////////////////////////////////////////////////////////////////////


WebElement staticDropdown = driver.findElement(By.id("ctl00_mainContent_DropDownListCurrency"));

Thread.sleep(2000);

Select dropdown = new Select(staticDropdown);

dropdown.selectByIndex(3);

System.out.println(dropdown.getFirstSelectedOption().getText());

Alina Papuc

unread,
Apr 1, 2023, 1:07:55 AM4/1/23
to ChromeDriver Users
WebDriverManager.chromedriver().setup();


ChromeOptions ops = new ChromeOptions();
ops.addArguments("--remote-allow-origins=*");
ChromeDriver driver =new ChromeDriver(ops);

this worked for me. Thank you for suggestion

It is loading more messages.
0 new messages