Scheduler when published throws an error

Hi Team,
I'm playing around the Scheduler component and during development in visual studio it works perfectly but the moment I published the app it doesn't load and throws these errors:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Operator '&&' incompatible with operand types 'Boolean' and 'Boolean'
Operator '&&' incompatible with operand types 'Boolean' and 'Boolean' (at index 10)

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: No element is currently associated with component 31
Error: No element is currently associated with component 31

Is this a server-side Blazor app or WebAssembly? Can you post the full stack trace?

The test app is WebAssembly hosted in ASP.NET Core
I don't have access to my test app at the moment but I'll post the stack trace when I get a chance.

See the stack trace below. Also I'm not doing anything fancy I'm using the sample code provided in the documentation.

I'm using .net core v3.1.301

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: No element is currently associated with component 37
p</e.prototype.updateComponent@https://localhost:5001/_framework/blazor.webassembly.js:1:12412
t.renderBatch@https://localhost:5001/_framework/blazor.webassembly.js:1:1704
v/</</window.Blazor._internal.renderBatch@https://localhost:5001/_framework/blazor.webassembly.js:1:34848
_mono_wasm_invoke_js_unmarshalled@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:172099
mono_wasm_invoke_js_unmarshalled@:wasm-function[53]:0x0
wasm_invoke_iiiiii@:wasm-function[3160]:0x9b33d
icall_trampoline_dispatch@:wasm-function[5777]:0xfe711
mono_wasm_interp_to_native_trampoline@:wasm-function[4607]:0xca81d
ves_pinvoke_method@:wasm-function[3209]:0x9cd40
interp_exec_method@:wasm-function[1120]:0x2598d
interp_runtime_invoke@:wasm-function[5655]:0xf7391
mono_jit_runtime_invoke@:wasm-function[5109]:0xddb3d
do_runtime_invoke@:wasm-function[1410]:0x3ba85
mono_runtime_try_invoke@:wasm-function[418]:0xcfdb
mono_runtime_invoke@:wasm-function[1610]:0x44b39
mono_wasm_invoke_method@:wasm-function[4605]:0xca6a7
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:195738
call_method@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:160823
bind_static_method/<@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:163094
endInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:41425
beginInvokeJSFromDotNet/<@https://localhost:5001/_framework/blazor.webassembly.js:1:9928

Microsoft.JSInterop.JSException: No element is currently associated with component 37
p</e.prototype.updateComponent@https://localhost:5001/_framework/blazor.webassembly.js:1:12412
t.renderBatch@https://localhost:5001/_framework/blazor.webassembly.js:1:1704
v/</</window.Blazor._internal.renderBatch@https://localhost:5001/_framework/blazor.webassembly.js:1:34848
_mono_wasm_invoke_js_unmarshalled@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:172099
mono_wasm_invoke_js_unmarshalled@:wasm-function[53]:0x0
wasm_invoke_iiiiii@:wasm-function[3160]:0x9b33d
icall_trampoline_dispatch@:wasm-function[5777]:0xfe711
mono_wasm_interp_to_native_trampoline@:wasm-function[4607]:0xca81d
ves_pinvoke_method@:wasm-function[3209]:0x9cd40
interp_exec_method@:wasm-function[1120]:0x2598d
interp_runtime_invoke@:wasm-function[5655]:0xf7391
mono_jit_runtime_invoke@:wasm-function[5109]:0xddb3d
do_runtime_invoke@:wasm-function[1410]:0x3ba85
mono_runtime_try_invoke@:wasm-function[418]:0xcfdb
mono_runtime_invoke@:wasm-function[1610]:0x44b39
mono_wasm_invoke_method@:wasm-function[4605]:0xca6a7
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:195738
call_method@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:160823
bind_static_method/<@https://localhost:5001/_framework/wasm/dotnet.3.2.0.js:1:163094
endInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:41425
beginInvokeJSFromDotNet/<@https://localhost:5001/_framework/blazor.webassembly.js:1:9928

at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[T0,T1,T2,TResult] (System.String identifier, T0 arg0, T1 arg1, T2 arg2) <0x25a6190 + 0x00046> in :0
at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[T0,T1,TResult] (System.String identifier, T0 arg0, T1 arg1) <0x25a60b0 + 0x00014> in :0
at Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer.UpdateDisplayAsync (Microsoft.AspNetCore.Components.RenderTree.RenderBatch& batch) <0x25a5fb8 + 0x0001e> in :0
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue () <0x229cab0 + 0x000e8> in :0

Hi @rsantos,

We reproduced the problem. It seems the Blazor linker strips something required by the Scheduler during production builds. We will investigate what the stripped method is and exclude it.

We released Radzen.Blazor 2.10.10 which should address this issue.

1 Like