Skip to content

CreateInboundActivityHandler override in .net 8 RC2 not being called #51934

Closed
@Thomas-Explc

Description

@Thomas-Explc

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

CreateInboundActivityHandler introduced in .net 8 preview 3, as seen in the dotnet blog post linked below, does not appear to work in .net 8 release candidate 2.

https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-3/#monitor-blazor-server-circuit-activity

Within the same circuit handler the overrides for circuit open, circuit closed, connection up and connection down work as expected.

Are there any situations which would cause the CreateInboundActivityHandler to not be called when UI events fire in an interactive server component that is functioning as expected?

Expected Behavior

The CreateInboundActivityHandler is called when any user interface events within a blazor component are activated, e.g. the changing of text, the click of a button.

Steps To Reproduce

Repo: https://github.com/Thomas-Explc/CreateInboundActivityHandler_Bug_Example

Go to counter page, use the button and enter test in the input field, no UI events cause function to fire.

Logger in CreateInboundActivityHandler is not hit, no breakpoints within that function are reached.

Exceptions (if any)

None, issue is logical.

.NET Version

8.0.100-rc.2.23502.2

Anything else?

Visual Studio 2022, 17.8.0 Preview 6.0.

Activity

ghost added
area-blazorIncludes: Blazor, Razor Components
on Nov 8, 2023
MackinnonBuck

MackinnonBuck commented on Nov 8, 2023

@MackinnonBuck
Member

Confirmed this is a bug, specifically for Blazor Web Apps. It's caused by the fact that in Blazor Web, the initial circuit handlers array is empty by the time the inbound activity dispatcher gets built. However, even after the Blazor Web circuit handlers are retrieved later from DI, we don't build the inbound activity handler.

The easy fix would be to call BuildInboundActivityDispatcher after the _circuitHandlers are retrieved for Blazor Web.

removed their assignment
on Nov 20, 2023
added
bugThis issue describes a behavior which is not expected - a bug.
on Nov 22, 2023
added this to the 8.0.x milestone on Nov 22, 2023
added a commit that references this issue on Jan 16, 2024
d4b8ba6
modified the milestones: 8.0.x, 8.0.2 on Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-server

Type

No type

Projects

Status

Done

Relationships

None yet

    Development

    Participants

    @MackinnonBuck@mkArtakMSFT@Thomas-Explc

    Issue actions

      CreateInboundActivityHandler override in .net 8 RC2 not being called · Issue #51934 · dotnet/aspnetcore