Starts in:
1 DAY
19 HRS
20 MIN
48 SEC
Starts in:
1 D
19 H
20 M
48 S

Activities of "zhongfang"

Thank you! It work well now.

Let'm give you more detail description.

  1. 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.

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.

  • 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.

Good question, I will prepare a new ABP solution for you. After I create it by ABP Suite.

At first, I placed the code in PreConfigureServices. Failed as before. Then, I placed the code in ConfigureServices, Failed again.

I place the code in ConfigureServices and PreConfigureServices.

Configure<AbpLocalizationOptions>(options =>
        {
            options.DefaultResourceType = typeof(BlazorOneResource);
        });

But I still get the same error as before.

I have checked the source code of ABP Framework. Volo.Abp.FeatureManagement Volo.Abp.FeatureManagement.Blazor /Components/FeatureManagementModal.razor line 65.

I past the code as below

<SelectItem Value="@item.Value">
    @CreateStringLocalizer(item.DisplayText.ResourceName).GetString(item.DisplayText.Name)
</SelectItem>

Sometimes, CreateStringLocalizer(item.DisplayText.ResourceName) return a null object. So, GetString will throw exception.

You may think these senarios: Such as I change the file name /class name of Resource file. But a feature setting has already been stored into database many months ago...

  • ABP Framework version: v7.1.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
[11:33:59 WRN] Unhandled exception rendering component: Value cannot be null. (Parameter 'stringLocalizer')
System.ArgumentNullException: Value cannot be null. (Parameter 'stringLocalizer')
   at Microsoft.Extensions.Localization.StringLocalizerExtensions.GetString(IStringLocalizer stringLocalizer, String name)
   at Volo.Abp.FeatureManagement.Blazor.Components.FeatureManagementModal.<>c__DisplayClass43_5.<BuildRenderTree>b__21(RenderTreeBuilder __builder9)
   at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
   at Blazorise.SelectItem`1.BuildRenderTree(RenderTreeBuilder __builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
[11:33:59 ERR] Unhandled exception in circuit 'qZ_yD2E2sEZ7bY4bLqK6QptNM2WMr0hCZRrjd-heQQk'.
  • Steps to reproduce the issue:"
  • Create an application by ABP Suite.
  • Start debug Blazor.Server.Host
  • Login successfully.
  • Click administration
  • Click Settings
  • Click Feature Management
  • Click Manage Host features
  • It works well.
  • Change the database connection strong to my current running database which created by 2 year ago and working well after I upgrade to ABP 7.1.1
  • Star debug Blazor.Server.Host.... Click Manage Host features. Then I will get failed with above exception.
  • ABP Framework version: v7.1.1
  • Steps to reproduce the issue:" It exist for long-term versions.
  • Create a module template named Yee.Change.ZeriModule
  • Click 'Modules' at the top of ABP Suite
  • Click 'Create a new module'
  • Module name is Yee.Change.Zeri
  • Checked 'Add to the solution'
  • then, click 'OK' A new module with the name Yee.Change.Zeri was created, ant it will be added to the solution. it seems everything is OK. but 3 bugs exist. 3 bugs list as below:
  • ABP Suite added Yee.Change.Ziri.BlazorServer as project reference to Yee.Change.ZeriModule.Blazor. it will cause that we can't start WebAssembly Host.
  • ABP Suite did't create BlazorWebAssembly project for Yee.Change.Zeri module
  • ABP Suite dit't add project reference for Yee.Change.ZeriModule.Blazor.Server to Yee.Change.Zeri.Blazor.Server
Showing 51 to 60 of 166 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06