Starts in:
1 DAY
23 HRS
29 MIN
59 SEC
Starts in:
1 D
23 H
29 M
59 S
Open Closed

Volo.Abp.AbpException: Undefined permission: #2109


User avatar
1
marketbus created

The error happens while loading the MainHeader or MainSidebar components.

I have included the source code in my project for the Lepton theme. The error is gives is the same, but the permssion that it's faling on is a bit random. The stack trace below is for AbpIdentit... but another might be "Volo.Abp.AbpException: Undefined permission: Languag"

In order to reproduce:

If you have any missing Localization keys, for example if you reference @L["SecretMenu"], but it's missing from en.json, then the error would happen.

Expected behaviour: In the above case, @L["SecretMenu"] should output the string "SecretMenu", and not through an error.

Edit: This seems to happen with some other exceptions as well, with the actual exception being masked.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.0.0-beta.3
  • UI type: Blazor
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Volo.Abp.AbpException: Undefined permission: AbpIdentit at Volo.Abp.Authorization.Permissions.PermissionDefinitionManager.Get(String name) at Volo.Abp.Authorization.Permissions.PermissionChecker.IsGrantedAsync(ClaimsPrincipal claimsPrincipal, String[] names) at Volo.Abp.Authorization.Permissions.PermissionChecker.IsGrantedAsync(String[] names) at Volo.Abp.Authorization.Permissions.RequirePermissionsSimpleBatchStateChecker1.IsEnabledAsync(SimpleBatchStateCheckerContext1 context) at Volo.Abp.SimpleStateChecking.SimpleStateCheckerManager`1.IsEnabledAsync(TState[] states) at Volo.Abp.UI.Navigation.MenuManager.CheckPermissionsAsync(IServiceProvider serviceProvider, IHasMenuItems menuWithItems) at Volo.Abp.UI.Navigation.MenuManager.GetInternalAsync(String name) at Volo.Abp.UI.Navigation.MenuManager.GetAsync(String[] menuNames) at Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.Navigation.MainMenuProvider.GetMenuAsync() in D:_dev\ReferMe\modules\Volo.LeptonTheme\src\Volo.Abp.AspNetCore.Components.Web.LeptonTheme\Components\ApplicationLayout\Navigation\MainMenuProvider.cs:line 30 at Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout.Navigation.MainSiderbar.OnInitializedAsync() in D:_dev\ReferMe\modules\Volo.LeptonTheme\src\Volo.Abp.AspNetCore.Components.Web.LeptonTheme\Components\ApplicationLayout\Navigation\MainSiderbar.razor.cs:line 19 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)


15 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Can you proivde full steps to reproduce? thanks.

  • User Avatar
    2
    improwise created

    Please have a look in the bug thread for 4.4.4 (isn't anyone from Volo reading that?) for my posts about what seems to be a very similar problem, newly created project with ABP Suite don't work because of missing permissions as well.

    https://support.abp.io/QA/Questions/1543/Bugs--Issues-v44X

    Short version, Blazor (client and server) seem to be broken currently even if you create a new project with default settings in ABP Suite and just try to run it after having executed DBMigrator.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi @improwise

    Short version, Blazor (client and server) seem to be broken currently even if you create a new project with default settings in ABP Suite and just try to run it after having executed DBMigrator.

    I can't reproduce the problem.

    Can you provide a project to me? shiwei.liang@volosoft.com

  • User Avatar
    0
    improwise created

    Hi @improwise

    Short version, Blazor (client and server) seem to be broken currently even if you create a new project with default settings in ABP Suite and just try to run it after having executed DBMigrator.

    I can't reproduce the problem.

    Can you provide a project to me? shiwei.liang@volosoft.com

    Thanks for responding. There seem to be several customer having the same problem so I would imagine that it isn't something specific on my end here like local configuration etc. Please see here for more details about the problem

    https://support.abp.io/QA/Questions/2124/ABP-Suite-broken-with-Blazor-Server-and-client

    https://support.abp.io/QA/Questions/1543/Bugs--Issues-v44X

    https://support.abp.io/QA/Questions/2126/Error-VoloAbpAbpException-Undefined-permission-AbpId

    To reproduce it, we just had to create a new ABP Commercial project with ABP suite and CLI 4.4.4 and using Blazor as UI (client or server). This occurred after trying to run the .Blazor project (DBMigration run fine). This would lead to problems that gave errors about settings / permissions and also wierd error reports (like the OP in this thread). :

    I have included the source code in my project for the Lepton theme. The error is gives is the same, but the permssion that it's faling on is a bit random. The stack trace below is for AbpIdentit... but another might be "Volo.Abp.AbpException: Undefined permission: Languag"

    Notice how there a characters missing in LanguagE here, and as mentioned in the other threads, we have seen other similar problems. These started occuring when we upgraded to 4.4.4 and went away when we downgraded to 4.4.3 again (both for stable and preview).

    Plese have a look in the threads listed above to get a better understanding of the problem and hopefully find a solution. As we no longer have 4.4.4. installed, I am not sure we can generate a broken project to reproduce the problem. Thanks.

  • User Avatar
    0
    ictadmin@moore.be created

    I have the same problem also !!!!

    Is there already a solution for this problem ? this getting really annoying and time consuming.

    I always start from a new solution created from abp suite. I tried already several versions 4.4.3 , 4.4.4 , aswel visual studio 2019 and 2022

    Today i also tried version 5.0.0-RC1 (visual studio 2022)

    I run the blazor projects as well in chrome, safari, microsoft edge...

    Tried it on 3 different laptops. On 2 laptops i have local admin rights (but the pc is moderated by my customer/company), On my personal laptop , i have all rights. But doesn't seem to make any difference.

    I can always build / run complete solution. Also the initial database migration works with DBMigration

    And I always get the same error

    Important info : the same solution/project runs without any problem for my fellow developer (located in Pakistan, i'm lcoated in europe)

    I'm really stuck and i lost already a week finding a solution ....

    We moved from the asp.net zero framework to abp.commercial for the blazor support, but I'm getting the feeling that this what not a good move !!!!

    Please help

  • User Avatar
    0
    Qaiser.Mehmood@moore.be created

    Hello Guys!!!

    On my system 4.4.3 and 4.4.4 versions are working ok, but on my manager computers its not working, if you need to can share any versions or builds you people required to review.

    Thank you Qaiser Mehmood

  • User Avatar
    0
    improwise created

    I have the same problem also !!!!

    Is there already a solution for this problem ? this getting really annoying and time consuming.

    I always start from a new solution created from abp suite.
    I tried already several versions 4.4.3 , 4.4.4 , aswel visual studio 2019 and 2022

    Today i also tried version 5.0.0-RC1 (visual studio 2022)

    I run the blazor projects as well in chrome, safari, microsoft edge...

    Tried it on 3 different laptops. On 2 laptops i have local admin rights (but the pc is moderated by my customer/company), On my personal laptop , i have all rights. But doesn't seem to make any difference.

    I can always build / run complete solution. Also the initial database migration works with DBMigration

    And I always get the same error

    Important info : the same solution/project runs without any problem for my fellow developer (located in Pakistan, i'm lcoated in europe)

    I'm really stuck and i lost already a week finding a solution ....

    We moved from the asp.net zero framework to abp.commercial for the blazor support, but I'm getting the feeling that this what not a good move !!!!

    Please help

    It seems like everyone is able to reproduce this problem with the exception of ABP Support...

    The solution, or rather workaround, it to create a solution based on 4.4.3 until ABP fixes this problem. Please note that this requires using the CLI as mentioned elsewhere as ABP will always use latest packages regardless of version it seems.

    Please have your Pakestanian friend try a clean and rebuild in VS2022 and let us know if it still works for him/her. Also, can he compile the solution in VS2019?

  • User Avatar
    0
    Emanuele.Filardo created

    I no longer have problems with CLI 5.0.0-rc1, nuget and npms, but I'm on Blazor Server + EfCore Sql Server with VS 2022 17.0.1 since solution is based on .net 6.0

    My steps:

    1. uninstalled abp e cli (4.4.4 main workstation and 5.0.0-beta3 notebook),
    2. install stable (4.4.4)
    3. update to pre-release (5.0.0-rc1)
  • User Avatar
    0
    ictadmin@moore.be created

    created a solution based on 4.4.3, after removing and re-installing CLI with version 4.4.3 again.

    abp new test_6 -t app-pro -u blazor-server -csf --output-folder C:\Projects\test_6 --mobile none

    but still the same problem

    what i noticed is that CLI still uses 'using cached template: app-pro, version 4.4.4'

    can this be the reason ? how can the cached template be reset/removed ?

  • User Avatar
    0
    improwise created

    I no longer have problems with CLI 5.0.0-rc1, nuget and npms, but I'm on Blazor Server + EfCore Sql Server with VS 2022 17.0.1 since solution is based on .net 6.0

    My steps:

    1. uninstalled abp e cli (4.4.4 main workstation and 5.0.0-beta3 notebook),
    2. install stable (4.4.4)
    3. update to pre-release (5.0.0-rc1)

    Can confirm that RC1 seem to work better in this regard. Other problems though but that is to be expected on a RC version. The stable version on the other hand should not have these problems and we can't use none stable versions in a real world application. We have given up on ABP 4.4.4 for now as it seems unfixable. Let's hope there is lots of improvement in 5.0 when release...

  • User Avatar
    0
    improwise created

    created a solution based on 4.4.3, after removing and re-installing CLI with version 4.4.3 again.

    abp new test_6 -t app-pro -u blazor-server -csf --output-folder C:\Projects\test_6 --mobile none

    but still the same problem

    what i noticed is that CLI still uses 'using cached template: app-pro, version 4.4.4'

    can this be the reason ? how can the cached template be reset/removed ?

    You need to specify the -v 4.4.3 option as ABP will always use latest version of packages regardless of CLI version if not. At least that is what we had to do after having figured out ourselves how to produce working ABP Commercial solutions since 4.4.4 was released. You can then add that to ABP Suite manually and CRUD generation etc. seem to work somewhat ok.

  • User Avatar
    0
    ictadmin@moore.be created

    yes !!! its working now pff lost more then 1 week of developing due to this bug :-(

  • User Avatar
    0
    improwise created

    yes !!! its working now
    pff lost more then 1 week of developing due to this bug :-(

    Glad you got it working, we also lost a lot of time on this and had to figure out ourselves how to find a workaround. Not optimal that a commercial product has to rely on customer helping out each other to get things working. It has us considering our options going forward as we are not really happy with how things have turned out recently and we are somewhat worried where things are heading in the future based on this. Let's hope that it is because of all attention being on the 5.0 release and that release is stellar...

  • User Avatar
    0
    ictadmin@moore.be created

    @improwise muchos gratias for the help !

  • User Avatar
    0
    marketbus created

    I lost a lof of time to this as well. But it seems in 5.0.0-rc1, the problem for the most part has been resolved.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06