You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! A heads-up from the shiny team, and some context since parts of this are still in flight.
In shiny's upcoming 1.14.0 we added module-scoped reactive cleanup (rstudio/shiny#4372): reactives created during a session are torn down when that session closes. Your exported test helper generate_plugin_args() (R/utils-tests.R) runs board_server inside testServer() and returns the board's live reactiveValues (rv, via make_read_only()), which callers then read after the block (e.g. test-utils-code.R, test-plugin-code.R read …$board via isolate()). Once testServer() closes the session, those reads error with "its module session has been destroyed."
Nothing is required for 1.14.0. We've temporarily disabled this cleanup inside testServer() for the release so your current tests keep passing — see rstudio/shiny#4396. We expect to re-enable it in a later release (timing still open), so we wanted to give you runway.
A few directions, depending on what fits your design:
Snapshot before returning (smallest change): return plain data instead of live handles, e.g. isolate(reactiveValuesToList(rv)) — good if callers only inspect values.
Assert inside the testServer() block, where the session is still alive.
If board state is meant to outlive any single session, create it session-independently with withReactiveDomain(NULL, …) at R/board-server.R:60 — though that opts board reactivity out of shiny's module-destroy cleanup, so only if it matches the intended lifecycle.
We haven't locked down the final shiny behavior, so if none of these feel right for blockr's architecture, that's useful signal for us — happy to talk it through.
@cpsievert many thanks for the heads-up here. I'll look into fixing. Also: many thanks for your work on having shiny handle module cleanup. We have built out infrastructure here using non-API logic to do this ourselves. This can now be removed, which is great!
Activity
nbenn commentedon Jun 4, 2026
@cpsievert many thanks for the heads-up here. I'll look into fixing. Also: many thanks for your work on having shiny handle module cleanup. We have built out infrastructure here using non-API logic to do this ourselves. This can now be removed, which is great!
Detach generate_plugin_args() output from its testServer session
Detach generate_plugin_args() output from its testServer session