MudPopover: Log instead of throw when no provider is in the render scope#13371
Merged
danielchalmers merged 4 commits intoJun 28, 2026
Merged
Conversation
When a popover-based component (picker, select, menu, ...) initializes but no MudPopoverProvider is subscribed in its render scope, PopoverService threw an InvalidOperationException from the component's OnInitializedAsync. With per-page InteractiveServer rendering this is a common misconfiguration (providers in the static layout, components on an interactive page), and throwing mid-render batch tears down the circuit so sibling components fault with a cryptic ObjectDisposedException, hiding the real cause. Log an actionable error once and keep the holder, so the app stays usable and the popover renders if a provider is later present in the scope. Also document global vs per-page provider placement on the installation page. Fixes MudBlazor#11887
Member
Author
This was referenced Jul 9, 2026
This was referenced Jul 13, 2026
Closed
This was referenced Jul 16, 2026
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When a popover-based component (
MudDatePicker,MudDateRangePicker,MudSelect,MudMenu, ...) initializes but noMudPopoverProvideris subscribed in its render scope,PopoverService.CreatePopoverAsyncthrew anInvalidOperationExceptionfrom the component'sOnInitializedAsync.In a Blazor Web App with per-page interactivity this is a common misconfiguration: the providers sit in the static
MainLayoutwhile the components run on an interactive page, so the circuit-scopedPopoverServicehas no subscribed provider. Throwing from a lifecycle method during the render batch tears down the circuit mid-render, and the sibling components' pending renders then fault with a crypticObjectDisposedException(ArrayBuilder.GrowBuffer->RenderTreeDiffBuilder.InsertNewFrame->Renderer.ProcessRenderQueue) — which is what users actually see, hiding the real cause.This converts the fatal throw into a single, actionable error log and keeps the popover holder registered, so the app stays usable and the popover renders if a provider becomes present in the scope. The real cure for an affected app is still to place the providers in the same interactive render mode as the components; the logged message and the installation docs now spell this out.
Same root cause as #11168, #12277, #12283.
Before, the circuit crashes:
After, the app keeps running with one actionable log:
Fixes #11887