Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dgjun32 opened this issue Jul 9, 2024 · 4 comments
Open

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

dgjun32 opened this issue Jul 9, 2024 · 4 comments

Comments

@dgjun32
Copy link

dgjun32 commented Jul 9, 2024

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.

@dgjun32 dgjun32 changed the title Copying AMI for Asia Pacific (Seoul) region. waiting for get_by_label("Username or email") Jul 9, 2024
@shuyanzhou
Copy link
Contributor

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
Copy link
Author

dgjun32 commented Jul 22, 2024

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
Copy link
Contributor

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
Copy link
Author

dgjun32 commented Jul 22, 2024

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.

  • If it is, one possible solution might be copying the AMI in us-east-2 region to the Asia Pacific (Seoul) region, and intialize the instance. But when I try to copy the AMI, I encountered following error:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants