0
    
    
        
                    zhongfang created
                    
                    
                    
                
                - ABP Framework version: v7.2.2
 - UI type: Blazor
 - DB provider: EF Core
 - Tiered (MVC) or Identity Server Separated (Angular): no
 - Exception message and stack trace:
 
[11:57:25 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:2b080ea8-6fdc-5e40-685e-39fe0f560247,n:ChangeAdmin.Admin
[11:57:25 DBG] Not found in the cache: pn:U,pk:2b080ea8-6fdc-5e40-685e-39fe0f560247,n:ChangeAdmin.Admin
[11:57:25 DBG] Getting all granted permissions from the repository for this provider name,key: U,2b080ea8-6fdc-5e40-685e-39fe0f560247
[11:57:26 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:2b080ea8-6fdc-5e40-685e-39fe0f560247,n:SettingManagement.Emailing
[11:57:26 DBG] Not found in the cache: pn:U,pk:2b080ea8-6fdc-5e40-685e-39fe0f560247,n:SettingManagement.Emailing
[11:57:26 DBG] Getting all granted permissions from the repository for this provider name,key: U,2b080ea8-6fdc-5e40-685e-39fe0f560247
[11:57:26 WRN] 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.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation.MobileNavbar.BuildRenderTree(RenderTreeBuilder __builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
[11:57:26 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:2b080ea8-6fdc-5e40-685e-39fe0f560247,n:ChangeAdmin.Admin
[11:57:26 DBG] Not found in the cache: pn:U,pk:2b080ea8-6fdc-5e40-685e-39fe0f560247,n:ChangeAdmin.Admin
[11:57:26 DBG] Getting all granted permissions from the repository for this provider name,key: U,2b080ea8-6fdc-5e40-685e-39fe0f560247
[11:57:26 DBG] Added 0 entity changes to the current audit log
[11:57:26 DBG] Added 0 entity changes to the current audit log
[11:57:26 DBG] Added 0 entity changes to the current audit log
[11:57:26 DBG] Added 0 entity changes to the current audit log
- Steps to reproduce the issue:"
 
- Start debug in Visual Studio 2022 in a module or application which dependes on many other modules created by ABP Suite.
 - Browser will display yellow line under the status buar (just the default Blazor error view).
 - Found exception in console.
 - Refresh the page in browser, page will go well with no exception. It seems evertying is normal.
 - It means that when you first open the page, you will get above exception. When you refresh immediatelly, it will be normal.
 
6 Answer(s)
- 
    0
Hi,
Are you using Blazor or Blazor server?
 - 
    0
Yes, I am using Blazor Server. With the same code, If I use Lepton, there is no error. After I replace/change the theme from Lepton to LeptonX, I will get above error.
 - 
    0
Let'm give you more detail description.
- When I didn't logged in, the page displayed normally. 2)Then I will login with username and password. I will get above exception. Then I will refresh the page, the exception disappeared.
 
 - 
    0
ok, I will check it
 - 
    0
Hi,
We fixed it in the next version, your ticket refunded.
You can try this:
using System.Collections.Generic; using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation; using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Navigation; using Volo.Abp.DependencyInjection; namespace Qa.Blazor.Pages; [ExposeServices(typeof(MobileNavbar))] public class MyMobileNavbar : MobileNavbar { public MyMobileNavbar() { SelectedMenuItems = new List<MenuItemViewModel>(); } } - 
    0
Thank you! It work well now.