web-arena-x / webarena

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

waiting for get_by_label("Username or email") #156

Open dgjun32 opened 2 months ago

dgjun32 commented 2 months ago

Hi,

I copied AMI in our AWS server and checked that we can visit the virtual website. However, when I tried to reset the environment for specific task, I encountered following error:

playwright._impl._api_types.TimeoutError: Timeout 10000ms exceeded.
=========================== logs ===========================
waiting for get_by_label("Username or email")
============================================================

Do you know the reason for this error and resolvation?

Thank you.

shuyanzhou commented 1 month ago

Hi, can you provide the full error history? Seems like the program tries to access an element in a specific page, but the element does not exist.

dgjun32 commented 1 month ago

Thanks for the reply. The above error was resolved by retrying the reset. However, It seems environment is slightly unstable, as error like below occurs randomly during evaluation on 812 tasks.

Traceback (most recent call last):                                                                                                                                                                                                                          [66/1904]
  File "/home/dongjun/autoprompt/browsergym/src/eval_rephrase.py", line 489, in <module>                                                                                                                                                                             
    raise e                                                                                                                                                                                                                                                          
  File "/home/dongjun/autoprompt/browsergym/src/eval_rephrase.py", line 483, in <module>                                                                                                                                                                             
    obs, info = env.reset()                                                                                                                                                                                                                                          
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/gymnasium/wrappers/order_enforcing.py", line 61, in reset                                                                                                                                 
    return self.env.reset(**kwargs)                                                                                                                                                                                                                                  
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/gymnasium/wrappers/env_checker.py", line 59, in reset                                                                                                                                     
    return self.env.reset(**kwargs)                                                                                                                                                                                                                                  
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/browsergym/core/env.py", line 255, in reset                                                                                                                                               
    goal, task_info = self.task.setup(page=self.page)                                                                                                                                                                                                                
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/browsergym/webarena/task.py", line 103, in setup                                                                                                                                          
    self.webarena_instance.ui_login(site=site, page=page)                                                                                                                                                                                                            
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/browsergym/webarena/instance.py", line 89, in ui_login                                                                                                                                    
    page.goto(f"{url}/customer/account/login/")                                                                                                                                                                                                                      
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 9221, in goto                                                                                                                                    
    self._sync(                                                                                                                                                                                                                                                      
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 104, in _sync                                                                                                                                       
    return task.result()                                                                                                                                                                                                                                             
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_page.py", line 495, in goto                                                                                                                                             
    return await self._main_frame.goto(**locals_to_params(locals()))                                                                                                                                                                                                 
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_frame.py", line 147, in goto                                                                                                                                            
    await self._channel.send("goto", locals_to_params(locals()))                                                                                                                                                                                                     
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 61, in send
    return await self._connection.wrap_api_call(
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 461, in wrap_api_call
    return await cb()
  File "/home/dongjun/anaconda3/envs/webarena/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 96, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.TimeoutError: Timeout 10000ms exceeded.
=========================== logs ===========================
navigating to "http://ec2-18-189-57-2.us-east-2.compute.amazonaws.com:7770/customer/account/login/", waiting until "load"

When I faced such error, It is sometimes resolved by just retrying the run. I am using my own amazon machine by copying the webarena AMI. Have you exprienced such instability?

shuyanzhou commented 1 month ago

Thanks for sharing more information. This is a rare error during my experiments. Usually, this error indicates that the website is down. We recommend t3a.xlarge, 1000GB EBS root volume. Smaller instances may result in website crashes.

You can try to access the website from a browser and see if you can still load the pages.

dgjun32 commented 1 month ago

Thanks, we are also using t3a.xlarge, 1000GB EBS root volume instance as recommended in the repo.

Current location of our server is South Korea and I wonder if physical distance between aws instance and our server can be a reason for this issue.

You do not have permission to access the storage of this ami