Skip to content

Exception: "ReferenceError: refs is not defined" #5418

@bertbarabas

Description

@bertbarabas

Describe the bug
When submitting a form the exception "ReferenceError: refs is not defined" is raised.

Image

To Reproduce
Steps to reproduce the behavior:

Bring up the app in the included python file below with:
reflex run --env prod

Image

Click the Login link and enter any email and password:

Image

Press the "Log in" button

Exception will appear.

Running the same test but launching with:
reflex run
Does not produce the exception

For consistent results, I ran
reflex init
before each test but not positive this was necessary.

The core element to the test case is having two forms on different pages/routes but each with a field that has the same id string. In this test case it is id="UserEmailAddress".

Expected behavior
No exception should occur.

Screenshots
If applicable, add screenshots to help explain your problem.

Specifics (please complete the following information):

  • Python Version: 3.13.3
  • Reflex Version: 0.7.14
  • OS: Ubuntu 24.04.1
  • Browser (Optional): Brave

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions