Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/trusted-server-cli/src/commands/audit/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const MAX_EVIDENCE_ENTRIES: usize = 128;
const MAX_EVIDENCE_PAYLOAD_BYTES: usize = 1024 * 1024;
/// Hard cap on browser teardown so a wedged Chrome cannot hang the audit.
const BROWSER_CLOSE_TIMEOUT: Duration = Duration::from_secs(5);
/// Hard cap on Chrome startup until it reports its debugging websocket URL.
///
/// Replaces chromiumoxide's 20s default, which a cold start on a loaded CI
/// runner or a slow operator machine can exceed.
const BROWSER_LAUNCH_TIMEOUT: Duration = Duration::from_secs(60);

/// Page-settle timing thresholds.
#[derive(Debug, Clone, Copy)]
Expand Down Expand Up @@ -151,7 +156,8 @@ pub(crate) fn build_browser_config(
) -> Result<BrowserConfig, String> {
let mut builder = BrowserConfig::builder()
.chrome_executable(options.chrome)
.user_data_dir(options.profile_dir);
.user_data_dir(options.profile_dir)
.launch_timeout(BROWSER_LAUNCH_TIMEOUT);
if !options.accept_invalid_certs {
builder = builder.respect_https_errors();
}
Expand Down
Loading