Open sturlath opened 3 weeks ago
@EngincanV @maliming no feedback on this? Unfortunatly I can´t create a demo code using the pro version to share with you...
I have figured out that this only happens when I F5 the page but if I navigate to it by menu this doesn´t happen. 🤷♂️
I have been trying to figure this out but I can see anything else than the MainHeader.cs needs to add some IsDisposed/nullreference-check logic..
Correct me if I´m wrong here...
Unhandled exception rendering component: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.MainHeader.MainHeader.RxudEaLQCq() at Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.MainHeader.MainHeader.OnAfterRenderAsync(Boolean firstRender) 2024-09-01 07:04:42.827 +00:00 [ERR] Unhandled exception in circuit '3c4nwfCF6tmsOj4Wr61u28HuZzFtHhFtTy3hRSsakAA'. System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.MainHeader.MainHeader.RxudEaLQCq() at Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.MainHeader.MainHeader.OnAfterRenderAsync(Boolean firstRender) --- End of inner exception stack trace ---
Anything I can try out or change/override/etc?
You'd better share a project that can reproduce the problem. This way we can find the cause as quickly as possible
You'd better share a project that can reproduce the problem. This way we can find the cause as quickly as possible 🤷♂️no idea how I can do that without having access to the pro version.. but I guess somebody else will hit this when they update to newest Blazorise using Lepton on Blazor Server... I will consider downgrading...
Is there an existing issue for this?
Description
Coming back to a open tab and refreshing I´m getting that error and no amount of F5 fixes the issue. The only thing possible is to clear all application data (totally not something a normal user is expected to do)
The issue seems to be in code handling of "Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.MainHeader.MainHeader.Dispose()"
Full log. As you can see the user seem to be no longer with valid credentials.
Then probably because of that error few other errors follow
Reproduction Steps
N/A but you should at least look at the code that is throwing the NullReferenceException and prevent that!
Expected behavior
If the user no longer has valid credentials he/she should be routed to a login page or the a refresh token mechanishm should kick in.
Actual behavior
The page becomes useless!
Regression?
First time I´m seeing this after updating to 8.2.x
Known Workarounds
Nuke the application data in the browser.. not viable
Version
8.2.2
User Interface
Blazor Server
Database Provider
EF Core (Default)
Tiered or separate authentication server
Tiered
Operation System
Windows (Default)
Other information
I sure hope you harden this code part in 8.2.3!