chromiumoxide icon indicating copy to clipboard operation
chromiumoxide copied to clipboard

bug: Chromiumoxide stopped working with the latest version of Chrome

Open RiddleMan opened this issue 1 year ago • 6 comments

I found out that new version of Chrome (129.0.6668.90) is breaking a contract, because I ran an example wiki-tokio (cargo run --example wiki-tokio --features=tokio-runtime) and get the following errors:

➞  cargo run --example wiki-tokio --features=tokio-runtime                                                                                                                     [git:main] ✖
   Compiling chromiumoxide v0.7.0 (/Users/Artur_Ptaszek/Projects/chromiumoxide)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.12s
     Running `target/debug/examples/wiki-tokio`
2024-10-04T13:26:41.476856Z ERROR chromiumoxide::conn: Failed to deserialize WS response data did not match any variant of untagged enum Message
2024-10-04T13:26:41.476914Z ERROR chromiumoxide::handler: WS Connection error: Serde(Error("data did not match any variant of untagged enum Message", line: 0, column: 0))
2024-10-04T13:26:41.522487Z ERROR chromiumoxide::conn: Failed to deserialize WS response data did not match any variant of untagged enum Message
2024-10-04T13:26:41.522508Z ERROR chromiumoxide::handler: WS Connection error: Serde(Error("data did not match any variant of untagged enum Message", line: 0, column: 0))
2024-10-04T13:26:41.694697Z  WARN chromiumoxide::browser: Browser was not closed manually, it will be killed automatically in the background
Error: ChromeMessage("Node is either not visible or not an HTMLElement")

It stopped working in tool I maintain https://github.com/RiddleMan/doken . It fails on CI as well as on dev machines. I blame the version of Chrome, because I had it broken on my machine using doken, but my colleague said it was fine. After he updated a Chrome, then it stopped working for him as well. However, I provided simpler code to reproduce the problem.

RiddleMan avatar Oct 04 '24 13:10 RiddleMan

I imagine they did a breaking change in the CDP, this is related to https://github.com/mattsse/chromiumoxide/pull/197. We should be able to handle breaking changes and skip over those messages.

Sytten avatar Oct 23 '24 22:10 Sytten

I'm having exactly the same issue now. The error still persists even after downgrading chrome to a few different versions.

ling0x avatar Nov 10 '24 16:11 ling0x

Its because we have not released the ignore of invalid messages most likely. See the PR.

Sytten avatar Nov 10 '24 17:11 Sytten

@Sytten any ETA of fix for this issue?

kuras120 avatar Jan 27 '25 13:01 kuras120

Its fixed on https://github.com/mattsse/chromiumoxide/pull/246, just needs to be merged by @mattsse You can use a fork @kuras120 thats what I do

Sytten avatar Jan 27 '25 14:01 Sytten

Any updates on this? I tried to run the wiki-tokyo example using:

chromiumoxide = { version = "0.7.0", features = ["tokio-runtime"], default-features = false }

and

chromium: Version 136.0.7103.92 (Official Build) (64-bit)

and get the same error:

2025-05-16T09:43:35.103947Z ERROR chromiumoxide::conn: Failed to deserialize WS response data did not match any variant of untagged enum Message
2025-05-16T09:43:35.104001Z ERROR chromiumoxide::handler: WS Connection error: Serde(Error("data did not match any variant of untagged enum Message", line: 0, column: 0))
2025-05-16T09:43:35.193476Z ERROR chromiumoxide::conn: Failed to deserialize WS response data did not match any variant of untagged enum Message
2025-05-16T09:43:35.193510Z ERROR chromiumoxide::handler: WS Connection error: Serde(Error("data did not match any variant of untagged enum Message", line: 0, column: 0))
2025-05-16T09:43:35.702019Z  WARN chromiumoxide::browser: Browser was not closed manually, it will be killed automatically in the background
Error: ChromeMessage("Node is either not visible or not an HTMLElement")

kronberger-droid avatar May 16 '25 09:05 kronberger-droid