Issue With Password Manager on Sign Up?

Has anyone else encountered issues with password autocomplete tools causing errors on sign up?

This issue arose when a user tried to sign up and was using the Safari password manager.

The sign in / sign up form is the anvil.users.login_with_form command. (The full login / sign up sequence is below.)

The password autofiller completed the password fields (and I think it tries to auto-submit the form) which triggers the scary red error box and I get this message in the logs.

AttributeError: 'CustomEvent' object has no attribute 'key' 
at app/m3/_Components/TextInput/TextBox.py, line 149

This happened several times. When we retried signing up without the password manager, there were no issues. I checked the docs and can’t see any mention of this so wanted to ask if anyone else has come across this issue.

~Andrew

Log in / sign up sequence

class main_page(main_pageTemplate):
  def __init__(self, **properties):
    self.init_components(**properties)
    
    # Handle login
    max_retries = 3
    retry_count = 0
    while not anvil.users.get_user() and retry_count < max_retries:
      try:
        user = anvil.users.login_with_form(allow_cancel=True, show_signup_option=True)
        if not user:
          retry_count += 1
      except Exception as e:
        alert(f"Login error: {str(e)}")
        retry_count += 1
    
    if not anvil.users.get_user():
      alert("Unable to login. Please try again later.")
      return

duplicate of AttributeError: 'Event' object has no attribute 'key' at app/m3/_Components/TextInput/TextBox.py:149

1 Like