JuliusBrussee/caveman · error

start browser: %w

Error message

start browser: %w

What it means

chromedp.Run failed while bringing up the CDP browser context in NewCDPDriver — the browser process started but the initial DevTools session could not be established. The temporary profile directory and allocator are cleaned up before this error is returned.

Source

Thrown at browse/cdp.go:88

		if !opts.Headless {
			execOpts = append(execOpts, chromedp.Flag("headless", false))
		}
		allocCtx, allocCancel = chromedp.NewExecAllocator(parent, execOpts...)
	}
	var ctx context.Context
	var cancel context.CancelFunc
	if opts.TargetID != "" {
		ctx, cancel = chromedp.NewContext(allocCtx, chromedp.WithTargetID(cdptarget.ID(opts.TargetID)))
	} else {
		ctx, cancel = chromedp.NewContext(allocCtx)
	}
	if err := chromedp.Run(ctx); err != nil {
		cancel()
		allocCancel()
		if tmpProfile != "" {
			_ = os.RemoveAll(tmpProfile)
		}
		return nil, fmt.Errorf("start browser: %w", err)
	}
	return &CDPDriver{allocCtx: allocCtx, allocCancel: allocCancel, ctx: ctx, cancel: cancel, tmpProfile: tmpProfile}, nil
}

func (d *CDPDriver) Close() error {
	if d.cancel != nil {
		d.cancel()
	}
	if d.allocCancel != nil {
		d.allocCancel()
	}
	if d.tmpProfile != "" {
		return os.RemoveAll(d.tmpProfile)
	}
	return nil
}

func (d *CDPDriver) TargetID() string {

View on GitHub (pinned to 766dce6b13)

Solutions

  1. Check that the Chrome/Chromium binary is installed and executable and its version is compatible
  2. Inspect the wrapped chromedp error for exit-status or timeout detail
  3. Retry once after confirming no stale chrome processes or locked profile dirs remain
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at browse/cdp.go:88 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18). Data as JSON: /api/errors/061a5a630393b13e. Report an issue: GitHub.