Skip to content

fix: skip frozen inputs when bookmarking state - #4435

Open
taekop wants to merge 1 commit into
rstudio:mainfrom
taekop:shiny-4026
Open

taekop wants to merge 1 commit into
rstudio:mainfrom
taekop:shiny-4026

Conversation

@taekop

@taekop taekop commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #4026.

serializeReactiveValues() (used by session$doBookmark()) called impl$get(name) for every reactive value, including ones frozen via freezeReactiveValue(). Reading a frozen value raises a silent shiny.silent.error via reactiveStop(), which propagated out of the serialization loop and aborted bookmarking with "Error bookmarking state".

Since a frozen value is explicitly pending an update (and is expected to be thawed on the next flush), it doesn't have a meaningful value to persist at the moment bookmarking runs. This fix skips frozen keys before they're read, so they're omitted from the bookmarked state rather than causing an error.

Added tests in tests/testthat/test-serializers.R covering that a frozen input is excluded without erroring, and that non-frozen inputs still serialize as before.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Bookmarking a frozen input throws an error

1 participant