MudBlazor / TryMudBlazor

A playground for trying out and testing MudBlazor components entirely in the browser.
https://try.mudblazor.com/
GNU General Public License v2.0
75 stars 36 forks source link

Issue in private tab #115

Closed ScarletKuro closed 1 year ago

ScarletKuro commented 1 year ago

I previously reported this issue in Discord, but to ensure it is not overlooked, I am now creating a formal issue here.

Steps to reproduce:

  1. Open a private tab in Edge
  2. Navigate to https://try.mudblazor.com/snippet
  3. An exception will appear
  4. Refresh the page and the error disappears
  5. Close all instances of Edge and repeat step 1 to see the error reappear.

Exception:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Cannot read properties of null (reading 'DarkTheme')
      TypeError: Cannot read properties of null (reading 'DarkTheme')
          at Object.create (https://try.mudblazor.com/editor/main.js?v=943ea4c5-58cf-4e31-8931-f3aa76c9c0fd:116:67)
          at Object.invokeJSFromDotNet (https://try.mudblazor.com/_framework/blazor.webassembly.js:1:3219)
          at Object.Gt [as invokeJSFromDotNet] (https://try.mudblazor.com/_framework/blazor.webassembly.js:1:62602)
          at Object.Ii (https://try.mudblazor.com/_framework/dotnet.7.0.4.n8uw76titq.js:5:71922)
          at _mono_wasm_invoke_js_blazor (https://try.mudblazor.com/_framework/dotnet.7.0.4.n8uw76titq.js:14:103886)
          at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[313]:0x1d507
          at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[283]:0x1c935
          at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[221]:0xe025
          at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[220]:0xce95
          at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[8115]:0x1a21ff
Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'DarkTheme')
TypeError: Cannot read properties of null (reading 'DarkTheme')
    at Object.create (https://try.mudblazor.com/editor/main.js?v=943ea4c5-58cf-4e31-8931-f3aa76c9c0fd:116:67)
    at Object.invokeJSFromDotNet (https://try.mudblazor.com/_framework/blazor.webassembly.js:1:3219)
    at Object.Gt [as invokeJSFromDotNet] (https://try.mudblazor.com/_framework/blazor.webassembly.js:1:62602)
    at Object.Ii (https://try.mudblazor.com/_framework/dotnet.7.0.4.n8uw76titq.js:5:71922)
    at _mono_wasm_invoke_js_blazor (https://try.mudblazor.com/_framework/dotnet.7.0.4.n8uw76titq.js:14:103886)
    at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[313]:0x1d507
    at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[283]:0x1c935
    at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[221]:0xe025
    at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[220]:0xce95
    at https://try.mudblazor.com/_framework/dotnet.wasm:wasm-function[8115]:0x1a21ff
   at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeJS(String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
   at Microsoft.JSInterop.JSInProcessRuntime.Invoke[IJSVoidResult](String identifier, Int64 targetInstanceId, Object[] args)
   at Microsoft.JSInterop.JSInProcessRuntime.Invoke[IJSVoidResult](String identifier, Object[] args)
   at Microsoft.JSInterop.JSInProcessRuntimeExtensions.InvokeVoid(IJSInProcessRuntime jsRuntime, String identifier, Object[] args)
   at TryMudBlazor.Client.Components.CodeEditor.OnAfterRender(Boolean firstRender)
   at Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync()
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.NotifyRenderCompletedAsync()