Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fragment "does not exist anymore" after reloading the page #11660

@maxiedaniels

Description

@maxiedaniels

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

I just started using fragments, and I'm frequently getting this error: "The fragment with id xxxxxxxxxxxxxxxx does not exist anymore - it might have been removed during a preceding full-app rerun."

I have a pretty simple fragment setup, it's just:

@st.fragment(run_every=f"{POLL_INTERVAL_SECONDS}s")
def live_tasks_table():
    display_tasks_table()

After playing around with it a bit, it seems this error starts popping up if I reload the page in my browser, or if my computer goes to sleep. It's like the fragment doesn't realize it's no longer needed (since the page reloaded and there's a new fragment).

Debug info

  • Streamlit version: 1.45.1
  • Python version: 3.11.8
  • Operating System: MacOS 14.7.1
  • Browser: Chrome 138.0.7204.15

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.fragmentRelated to `st.fragment` commandpriority:P2Medium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions