Symptom
With record_har_path set, the task finishes and the caller's check prints ✗ HAR file was not created.
Evidence what you'll see
- The report builds
Browser(headless=False, window_size={'width': 1000, 'height': 700}, record_har_path=str(har_file), record_har_mode="full", keep_alive=False)on browser-use0.7.6. - The log shows
go_to_urltohttps://example.comandTask completed successfully. The pathhar_test_output/agent_test_session.haris missing afterward. - The report says this may come from the shift away from Playwright. A comment says it seems not implemented in the new browser-use, that
0.6.0still wrote the file, and another comment reports the same gap on0.77/0.76.
Why it happens
record_har_path was still accepted on the browser profile, but nothing subscribed to network events or wrote the file when the session ended. Pull request #3543 adds HarRecordingWatchdog. It attaches only when browser_profile.record_har_path is set, listens for BrowserConnectedEvent and BrowserStopEvent, records HTTPS requests, and writes a HAR 1.2 file when the browser stops.
Affected versions
browser-use 0.7.6 on macOS and Linux, as the report states. A comment reports the same missing file on 0.77/0.76 and says 0.6.0 still wrote one.
Fix steps
0 of 3 done
Your check marks stay in this browser only.
How to check it worked
- The log contains
📊 Starting HAR recording toand, after the browser stops,📊 HAR file saved:. The path exists. HAR 1.2 has a top-levellogobject, which is the structure the report checked for.
If it still fails
- Only HTTPS requests are recorded. The watchdog returns immediately when the URL is not HTTPS, with the note that only HTTPS requests are recorded for now. An
http://page can still leaveentriesempty. The report's page washttps://example.com. - The file is written on
BrowserStopEvent. The linked pull request does not describe a flush while the browser is still open. If startup fails, the log saysFailed to enable HAR recording:. - A comment says
The video and trace configurations aren't working either. Version 0.77/0.76. Pull request #3543 does not mention video or trace recording.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it