browser-use
browser-use copied to clipboard
Bug: storage_state is only partially loaded
Browser Use Version
0.9.4
Bug Description, Steps to Reproduce, Screenshots
In browser-use 0.9.4, when passing a path to a storage_state file to the browser with cookies and origins-based localStorage, only the cookies are correctly loaded (I assume due to setting cookies and localStorage using different CDP methods Using the same code and file works as expected in 0.9.3.
Failing Python Code
browser = Browser(
headless=headless,
user_data_dir=user_data_dir,
allowed_domains=allowed_domains,
chromium_sandbox=False,
headers=final_headers,
storage_state=storage_file,
)
# Initial action is navigate to a mock webserver we set up that checks for localStorage content, and there is None
LLM Model
o3
Operating System & Browser Versions
Chrome 141.0.7390.123 on macOS Tahoe 26.0.1
Full DEBUG Log Output
Looks like it's solved in 0.9.5