mattsse / chromiumoxide

Chrome Devtools Protocol rust API
Apache License 2.0
712 stars 69 forks source link

Random crashes when not using headless mode #210

Open escritorio-gustavo opened 4 months ago

escritorio-gustavo commented 4 months ago

I am very regularly getting this error followed immediately by a crash:

ERROR chromiumoxide::handler: WS Connection error: Ws(Io(Os { code: 10054, kind: ConnectionReset, message: "An existing connection was forcibly closed by the remote host." }))

The error doesn't seem to happen in headless mode

My BrowserLauncherConfig

let number = rand::thread_rng().next_u64();
let config_builder = BrowserConfig::builder()
    .chrome_executable(EXECUTABLE_PATH.get().unwrap())
    .launch_timeout(std::time::Duration::from_secs(20))
    .no_sandbox()
    .request_timeout(std::time::Duration::from_secs(3_600))
    .enable_request_intercept()
    .user_data_dir(BROWSER_PATH.join(format!(r"data-dir-{number}")));