Skip to content

JSException in WebAssemblyRenderer #21874

Closed
@hultqvist

Description

@hultqvist

Is your feature request related to a problem? Please describe.

When I'm closing a dialog thus unloading components I'm receiving the error.

@if(Open){
    <MyComponent></MyComponent>
}

This cause the bottom error bar to show up and the error below is shown on the console.

The underlying cause for this error to trigger could very likely be from some code of mine.
Problem is that the error message doesn't let me know where to look.

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Unknown edit type: 0
      Error: Unknown edit type: 0
          at e.applyEdits (https://localhost:44347/_framework/blazor.webassembly.js:1:15076)
          at e.updateComponent (https://localhost:44347/_framework/blazor.webassembly.js:1:12948)
          at Object.t.renderBatch (https://localhost:44347/_framework/blazor.webassembly.js:1:1704)
          at Object.window.Blazor._internal.renderBatch (https://localhost:44347/_framework/blazor.webassembly.js:1:34848)
          at _mono_wasm_invoke_js_unmarshalled (https://localhost:44347/_framework/wasm/dotnet.3.2.0-rc1.20222.2.js:1:172151)
          at wasm_invoke_iiiiii (wasm-function[3160]:0x9d403)
          at icall_trampoline_dispatch (wasm-function[5776]:0x1007ce)
          at mono_wasm_interp_to_native_trampoline (wasm-function[4606]:0xcc8da)
          at ves_pinvoke_method (wasm-function[3209]:0x9ee05)
          at interp_exec_method (wasm-function[1120]:0x25b31)
Microsoft.JSInterop.JSException: Unknown edit type: 0
Error: Unknown edit type: 0
    at e.applyEdits (https://localhost:44347/_framework/blazor.webassembly.js:1:15076)
    at e.updateComponent (https://localhost:44347/_framework/blazor.webassembly.js:1:12948)
    at Object.t.renderBatch (https://localhost:44347/_framework/blazor.webassembly.js:1:1704)
    at Object.window.Blazor._internal.renderBatch (https://localhost:44347/_framework/blazor.webassembly.js:1:34848)
    at _mono_wasm_invoke_js_unmarshalled (https://localhost:44347/_framework/wasm/dotnet.3.2.0-rc1.20222.2.js:1:172151)
    at wasm_invoke_iiiiii (wasm-function[3160]:0x9d403)
    at icall_trampoline_dispatch (wasm-function[5776]:0x1007ce)
    at mono_wasm_interp_to_native_trampoline (wasm-function[4606]:0xcc8da)
    at ves_pinvoke_method (wasm-function[3209]:0x9ee05)
    at interp_exec_method (wasm-function[1120]:0x25b31)
  at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[T0,T1,T2,TResult] (System.String identifier, T0 arg0, T1 arg1, T2 arg2) <0x3025730 + 0x00046> in <filename unknown>:0 
  at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[T0,T1,TResult] (System.String identifier, T0 arg0, T1 arg1) <0x3025650 + 0x00014> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer.UpdateDisplayAsync (Microsoft.AspNetCore.Components.RenderTree.RenderBatch& batch) <0x3025558 + 0x0001e> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue () <0x2d7c110 + 0x000f2> in <filename unknown>:0 

Describe the solution you'd like

I would like the error message to contain information about what part of the whole document RenderTree was being processed when the error occurred.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions