Skip to content

me.navigate() in page load does not work some time #1309

@programus

Description

@programus

Describe the bug

import mesop as me


@me.page(path='/')
def main_page():
    me.text("This is the main page.")
    me.navigate('/login')


@me.page(path='/login')
def login_page():
    me.text("This is the login page.")

With the code above, while I access root path, the URL in address bar changed to /login, but the page content does not change some time.

If I put a breakpoint in the login_page(), that would not stop.

To Reproduce
Steps to reproduce the behavior:

  1. Access / using the above code.

Expected behavior
The page really redirect to /login.

Screenshots

Image

Desktop System Info

  • OS: macOS
  • Browser Chrome, Ark
  • Version
    • Chrome: 142.0.7444.60 (Official Build) (arm64)
    • Ark: Version 1.120.0 (70500) Chromium Engine Version 142.0.7444.135

Additional context
Tried both mesop main.py and gunicorn.

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