web-arena-x / webarena

Code repo for "WebArena: A Realistic Web Environment for Building Autonomous Agents"
https://webarena.dev
Apache License 2.0
647 stars 94 forks source link

FileNotFoundError: [Errno 2] No such file or directory: './.auth/reddit_state.json' #60

Closed Yangyi-Chen closed 8 months ago

Yangyi-Chen commented 8 months ago

Hi, Thanks for the great work!

When I run the minimal_example.py, I encounter the error: FileNotFoundError: [Errno 2] No such file or directory: './.auth/reddit_state.json', and the traceback is: Traceback (most recent call last): File "/data/yangyic3/webarena/test.py", line 13, in <module> obs, info = env.reset(options={"config_file": config_file}) File "<@beartype(browser_env.envs.ScriptBrowserEnv.reset) at 0x7f97d066e8c0>", line 51, in reset File "/data/yangyic3/webarena/browser_env/envs.py", line 203, in reset self.setup(config_file=config_file) File "<@beartype(browser_env.envs.ScriptBrowserEnv.setup) at 0x7f97d066e5f0>", line 36, in setup File "/data/yangyic3/webarena/browser_env/envs.py", line 142, in setup self.context = self.browser.new_context( File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 13989, in new_context self._sync( File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 104, in _sync return task.result() File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_browser.py", line 124, in new_context await prepare_browser_context_params(params) File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_browser.py", line 234, in prepare_browser_context_params (await async_readfile(storageState)).decode() File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_helper.py", line 352, in async_readfile return await loop.run_in_executor(None, inner) File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/home/yangyic3/yangyic3/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_helper.py", line 348, in inner with open(file, "rb") as fh: FileNotFoundError: [Errno 2] No such file or directory: './.auth/reddit_state.json'

Could you help me look into this problem? Thanks!

yongchao98 commented 3 months ago

Hello, I also run into this problem. I wonder if you have solved it. Thank you

shuyanzhou commented 3 months ago

@yongchao98 you possibly miss the 4th step here

  1. Obtain the auto-login cookies for all websites
    
    mkdir -p ./.auth
    python browser_env/auto_login.py