SplitButton does not work correctly (.NET 8) #1072

Closed
opened 2026-01-29 17:48:34 +00:00 by claunia · 3 comments
Owner

Originally created by @iharbukach on GitHub (Dec 27, 2023).

After migrating to .NET 8(8.0.100), clicking the main button of a SplitButton component throws an exception.
Screenshot 2023-12-27 at 12 33 04
After pressing again, the expected event is executed.

Logs from Console:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: undefined is not an object (evaluating 'Radzen.popups.filter')
closePopup@https://blazor.radzen.com/_content/Radzen.Blazor/Radzen.Blazor.js:998:36
@https://blazor.radzen.com/_framework/blazor.web.js:1:3244
Promise@[native code]
beginInvokeJSFromDotNet@https://blazor.radzen.com/_framework/blazor.web.js:1:3212
ri@https://blazor.radzen.com/_framework/blazor.web.js:1:164899
@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:177854
@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:178688
.wasm-function[350]@[wasm code]
.wasm-function[246]@[wasm code]
.wasm-function[239]@[wasm code]
.wasm-function[273]@[wasm code]
.wasm-function[3184]@[wasm code]
.wasm-function[2505]@[wasm code]
.wasm-function[2511]@[wasm code]
.wasm-function[2535]@[wasm code]
.wasm-function[129]@[wasm code]
kr@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:35394
@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:180451
beginInvokeDotNetFromJS@https://blazor.radzen.com/_framework/blazor.web.js:1:155842
invokeDotNetMethodAsync@https://blazor.radzen.com/_framework/blazor.web.js:1:4345
invokeWhenHeapUnlocked@https://blazor.radzen.com/_framework/blazor.web.js:1:157376
@https://blazor.radzen.com/_framework/blazor.web.js:1:161491
A@https://blazor.radzen.com/_framework/blazor.web.js:1:161496
dispatchGlobalEventToAllElements@https://blazor.radzen.com/_framework/blazor.web.js:1:16506
onGlobalEvent@https://blazor.radzen.com/_framework/blazor.web.js:1:15730
Microsoft.JSInterop.JSException: undefined is not an object (evaluating 'Radzen.popups.filter')
closePopup@https://blazor.radzen.com/_content/Radzen.Blazor/Radzen.Blazor.js:998:36
@https://blazor.radzen.com/_framework/blazor.web.js:1:3244
Promise@[native code]
beginInvokeJSFromDotNet@https://blazor.radzen.com/_framework/blazor.web.js:1:3212
ri@https://blazor.radzen.com/_framework/blazor.web.js:1:164899
@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:177854
@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:178688

.wasm-function[350]@[wasm code] .wasm-function[246]@[wasm code] .wasm-function[239]@[wasm code] .wasm-function[273]@[wasm code] .wasm-function[3184]@[wasm code] .wasm-function[2505]@[wasm code] .wasm-function[2511]@[wasm code] .wasm-function[2535]@[wasm code] .wasm-function[129]@[wasm code]

kr@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:35394
@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:180451
beginInvokeDotNetFromJS@https://blazor.radzen.com/_framework/blazor.web.js:1:155842
invokeDotNetMethodAsync@https://blazor.radzen.com/_framework/blazor.web.js:1:4345
invokeWhenHeapUnlocked@https://blazor.radzen.com/_framework/blazor.web.js:1:157376
@https://blazor.radzen.com/_framework/blazor.web.js:1:161491
A@https://blazor.radzen.com/_framework/blazor.web.js:1:161496
dispatchGlobalEventToAllElements@https://blazor.radzen.com/_framework/blazor.web.js:1:16506
onGlobalEvent@https://blazor.radzen.com/_framework/blazor.web.js:1:15730
at Microsoft.JSInterop.JSRuntime.d__16`1.MoveNext()
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Radzen.Blazor.RadzenSplitButton.OnClick(MouseEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Originally created by @iharbukach on GitHub (Dec 27, 2023). After migrating to .NET 8(8.0.100), clicking the main button of a SplitButton component throws an exception. <img width="585" alt="Screenshot 2023-12-27 at 12 33 04" src="https://github.com/dotnet/aspnetcore/assets/81753140/a079a80e-c39c-49c2-8c36-456e62945c45"> After pressing again, the expected event is executed. Logs from Console: > crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: undefined is not an object (evaluating 'Radzen.popups.filter') closePopup@https://blazor.radzen.com/_content/Radzen.Blazor/Radzen.Blazor.js:998:36 @https://blazor.radzen.com/_framework/blazor.web.js:1:3244 Promise@[native code] beginInvokeJSFromDotNet@https://blazor.radzen.com/_framework/blazor.web.js:1:3212 ri@https://blazor.radzen.com/_framework/blazor.web.js:1:164899 @https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:177854 @https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:178688 <?>.wasm-function[350]@[wasm code] <?>.wasm-function[246]@[wasm code] <?>.wasm-function[239]@[wasm code] <?>.wasm-function[273]@[wasm code] <?>.wasm-function[3184]@[wasm code] <?>.wasm-function[2505]@[wasm code] <?>.wasm-function[2511]@[wasm code] <?>.wasm-function[2535]@[wasm code] <?>.wasm-function[129]@[wasm code] kr@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:35394 @https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:180451 beginInvokeDotNetFromJS@https://blazor.radzen.com/_framework/blazor.web.js:1:155842 invokeDotNetMethodAsync@https://blazor.radzen.com/_framework/blazor.web.js:1:4345 invokeWhenHeapUnlocked@https://blazor.radzen.com/_framework/blazor.web.js:1:157376 @https://blazor.radzen.com/_framework/blazor.web.js:1:161491 A@https://blazor.radzen.com/_framework/blazor.web.js:1:161496 dispatchGlobalEventToAllElements@https://blazor.radzen.com/_framework/blazor.web.js:1:16506 onGlobalEvent@https://blazor.radzen.com/_framework/blazor.web.js:1:15730 Microsoft.JSInterop.JSException: undefined is not an object (evaluating 'Radzen.popups.filter') closePopup@https://blazor.radzen.com/_content/Radzen.Blazor/Radzen.Blazor.js:998:36 @https://blazor.radzen.com/_framework/blazor.web.js:1:3244 Promise@[native code] beginInvokeJSFromDotNet@https://blazor.radzen.com/_framework/blazor.web.js:1:3212 ri@https://blazor.radzen.com/_framework/blazor.web.js:1:164899 @https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:177854 @https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:178688 <?>.wasm-function[350]@[wasm code] <?>.wasm-function[246]@[wasm code] <?>.wasm-function[239]@[wasm code] <?>.wasm-function[273]@[wasm code] <?>.wasm-function[3184]@[wasm code] <?>.wasm-function[2505]@[wasm code] <?>.wasm-function[2511]@[wasm code] <?>.wasm-function[2535]@[wasm code] <?>.wasm-function[129]@[wasm code] kr@https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:35394 @https://blazor.radzen.com/_framework/dotnet.runtime.8.0.0.jrs5anwtwh.js:3:180451 beginInvokeDotNetFromJS@https://blazor.radzen.com/_framework/blazor.web.js:1:155842 invokeDotNetMethodAsync@https://blazor.radzen.com/_framework/blazor.web.js:1:4345 invokeWhenHeapUnlocked@https://blazor.radzen.com/_framework/blazor.web.js:1:157376 @https://blazor.radzen.com/_framework/blazor.web.js:1:161491 A@https://blazor.radzen.com/_framework/blazor.web.js:1:161496 dispatchGlobalEventToAllElements@https://blazor.radzen.com/_framework/blazor.web.js:1:16506 onGlobalEvent@https://blazor.radzen.com/_framework/blazor.web.js:1:15730 at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Radzen.Blazor.RadzenSplitButton.OnClick(MouseEventArgs args) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Author
Owner

@lboyarsky commented on GitHub (Dec 31, 2023):

I'm not sure if it's related to .NET 8 as such. For me, updating from version 4.22 to 4.23 is what broke it. Try downgrading to 4.22; it helped in my case.

It seems like this commit might have caused the issue: 90ffa50718 - cc @enchev.

Thank you for the great set of components, and happy new year!

@lboyarsky commented on GitHub (Dec 31, 2023): I'm not sure if it's related to .NET 8 as such. For me, updating from version 4.22 to 4.23 is what broke it. Try downgrading to 4.22; it helped in my case. It seems like this commit might have caused the issue: https://github.com/radzenhq/radzen-blazor/commit/90ffa50718185a5e0a1e348be18c6be547b90367 - cc @enchev. Thank you for the great set of components, and happy new year!
Author
Owner

@pigwing commented on GitHub (Jan 2, 2024):

#1304

@pigwing commented on GitHub (Jan 2, 2024): #1304
Author
Owner

@ogchrislem commented on GitHub (Jan 2, 2024):

Similar error on a server app, when clicking the main button it errors with undefined when trying to reference Radzen.popups.filter on line 998 of Radzen.Blazor.js. This happens if you click the main button first, if you click the menu button first so the dropdown appears, the main button will then work.

Downgrading to 4.23.3 is the workaround in place for now.

@ogchrislem commented on GitHub (Jan 2, 2024): Similar error on a server app, when clicking the main button it errors with undefined when trying to reference Radzen.popups.filter on line 998 of Radzen.Blazor.js. This happens if you click the main button first, if you click the menu button first so the dropdown appears, the main button will then work. Downgrading to 4.23.3 is the workaround in place for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1072