torhovland / blazor-realworld-example-app

Starter kit for new RealWorld framework implementations
https://realworld.io
132 stars 26 forks source link

Article component is throwing `System.NullReferenceException` after sign out #9

Open iAmBipinPaul opened 6 years ago

iAmBipinPaul commented 6 years ago

Step to reproduce

  1. Change all the parameter to have [Parameter] attribute and remove public modifier so that we can run the apps using blazor 0.3.0
  2. Run the app.
  3. Sign in
  4. Open any article
  5. Now sing out
  6. Again open any article , should get the following error.

(After Ctrl+F5 it works perfectly)

No authentication token found in storage.
interop.js:9:5
Authentication token has been stored.
interop.js:3:5
WASM: Mono: GC_MINOR: (Nursery full) time 5.00ms, stw 5.00ms promoted 170K major size: 1536K in use: 830K los size: 1024K in use: 332K
MonoPlatform.ts:191:25
Authentication token has been deleted.
interop.js:15:5
WASM: [System.NullReferenceException] Object reference not set to an instance of an object.
MonoPlatform.ts:192:28
WASM:   at BlazorRealworld.Pages.Article.BuildRenderTree (Microsoft.AspNetCore.Blazor.RenderTree.RenderTreeBuilder builder) <0x1fb2fd8 + 0x0037a> in <638a57224e784283a7f4e575d6bf48e5>:0 
MonoPlatform.ts:192:28
WASM:   at Microsoft.AspNetCore.Blazor.Rendering.ComponentState.RenderIntoBatch (Microsoft.AspNetCore.Blazor.Rendering.RenderBatchBuilder batchBuilder, Microsoft.AspNetCore.Blazor.RenderFragment renderFragment) <0x1a96e50 + 0x0006c> in <0d9c96ffc9704aa9b088cbbe138126c6>:0 
MonoPlatform.ts:192:28
WASM:   at Microsoft.AspNetCore.Blazor.Rendering.Renderer.RenderInExistingBatch (Microsoft.AspNetCore.Blazor.Rendering.RenderQueueEntry renderQueueEntry) <0x1a969f8 + 0x00040> in <0d9c96ffc9704aa9b088cbbe138126c6>:0 
MonoPlatform.ts:192:28
WASM:   at Microsoft.AspNetCore.Blazor.Rendering.Renderer.ProcessRenderQueue () <0x1a960f8 + 0x00048> in <0d9c96ffc9704aa9b088cbbe138126c6>:0 
MonoPlatform.ts:192:28
WASM:   at Microsoft.AspNetCore.Blazor.Rendering.Renderer.AddToRenderQueue (System.Int32 componentId, Microsoft.AspNetCore.Blazor.RenderFragment renderFragment) <0x1a95040 + 0x00068> in <0d9c96ffc9704aa9b088cbbe138126c6>:0 
MonoPlatform.ts:192:28
WASM:   at Microsoft.AspNetCore.Blazor.Components.RenderHandle.Render (Microsoft.AspNetCore.Blazor.RenderFragment renderFragment) <0x1a94ce0 + 0x00036> in <0d9c96ffc9704aa9b088cbbe138126c6>:0 
MonoPlatform.ts:192:28
WASM:   at Microsoft.AspNetCore.Blazor.Components.BlazorComponent.StateHasChanged () <0x1a94be8 + 0x00048> in <0d9c96ffc9704aa9b088cbbe138126c6>:0 
MonoPlatform.ts:192:28
WASM:   at BlazorRealworld.Pages.Article+<OnInitAsync>d__6.MoveNext () <0x1f87450 + 0x0010a> in <638a57224e784283a7f4e575d6bf48e5>:0 
MonoPlatform.ts:192:28

image