Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Doesn't work with chrome v111 #87

Open
ZhezherP opened this issue Mar 14, 2023 · 3 comments
Open

Doesn't work with chrome v111 #87

ZhezherP opened this issue Mar 14, 2023 · 3 comments

Comments

@ZhezherP
Copy link

chromeService.createDevToolsService(tab, chromeDevToolsServiceConfiguration);
craches with
Caused by: javax.websocket.DeploymentException: Handshake error. at org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:679) at org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:717) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:871) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:516) at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:378) at com.github.kklisura.cdt.services.impl.WebSocketServiceImpl.connect(WebSocketServiceImpl.java:98) ... 34 common frames omitted Caused by: org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 403. at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:320) at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(GrizzlyClientFilter.java:346) at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(GrizzlyClientFilter.java:315) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) ... 1 common frames omitted

@platonai
Copy link

platonai commented Mar 14, 2023

We have the same issue: platonai/exotic-amazon#16 .

We have developed a project to scrape web data at scale completely and accurately with high performance, distributed RPA, and the browser layer is dependent on Kklisura's wonderful chrome-devtools-java-client.

Our users reported the incompatible issue. We diagnosed the problem, and find out that chrome-111's browser_protocol.json and js_protocol.json have changed a lot.

Latest browser_protocol.json version updated:
Date: 2023-03-14 04:28:31 +0000
Latest js_protocol.json version updated:
Date: 2023-02-09 04:28:18 +0000

We eagerly look forward to the timely update of this project. Thank you!

@platonai
Copy link

platonai commented Mar 17, 2023

Fixed my problem with @karlvr 's solution:

  1. change http method to be PUT to create/activate/close a tab
  2. add chrome launch parameter: --remote-allow-origins=*

@ZhezherP
Copy link
Author

1. change http method to be PUT to create/activate/close a tab

Didn't understand where to change method to PUT. Library is using websocket.

2. add chrome launch parameter: --remote-allow-origins=*

--remote-allow-origins=* flag fixed the problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants