Activities of "nlachmuthDev"

  • ABP Framework version: v9.0.4, LeptonX 4.0.5
  • UI Type: Blazor Server
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:

Error: Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'querySelector') TypeError: Cannot read properties of null (reading 'querySelector') at new t (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:38651) at Function.create (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:38718) at t.initCaret (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:44470) at new t (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:41658) at Function.create (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:41705) at e.createSettingGroupWithMenu (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:91570) at e [as constructor] (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:72119) at new e (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:74385) at Function.create (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:74497) at t.createSettingGroups (https://localhost:44363/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/top-menu/js/lepton-x.bundle.min.js:2:77280) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.TopMenuLayout.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

  • Steps to reproduce the issue:
  1. Create new solution with blazor server
  2. Remove every language except one (like en)
  3. Remove all styles in the service configuration of the AppNameBlazorModule except one. Like this
(Configure<LeptonXThemeOptions>(options =>
{
    options.Styles.Clear();

    options.Styles.Add("light",
        new LeptonXThemeStyle(
        LocalizableString.Create<CareHomeResource>("Theme:Light"),
        "bi bi-sun-fill"));
    options.DefaultStyle = "light";
});
  1. Start application and get the exception.

From what i can see in the execption stack trace this must be an javascript issue of the lepton-x.bundle.min.js file when configuring the settings group. since the group for language or appearance wont be rented when not multiple languages or styles are added there is some null exception somewhere inn the js script where it expects these groups to be there.

For me the solution would be that the js does not fail and skips the non existent groups.

Note: Posted a similar error about the public site here: https://abp.io/qa/questions/8330/3a171a60-86d5-73d3-97fd-81e0f530b81a

Please fix this soon.

Hi there,

found another bug, when using the public site with top menu:

Uncaught TypeError: Cannot read properties of undefined (reading 'querySelector') at e.updateSelected (lepton-x.bundle.min.js?_v=638695393640000000:2:73734) at e.updateAllSelected (lepton-x.bundle.min.js?_v=638695393640000000:2:91910) at e.withPersistedValue (lepton-x.bundle.min.js?_v=638695393640000000:2:91260) at Function.create (lepton-x.bundle.min.js?_v=638695393640000000:2:75931) at t.createSettingGroups (lepton-x.bundle.min.js?_v=638695393640000000:2:77120) at lepton-x.bundle.min.js?_v=638695393640000000:2:76821 at NodeList.forEach (<anonymous>) at lepton-x.bundle.min.js?_v=638695393640000000:2:77884 at lepton-x.bundle.min.js?_v=638695393640000000:2:52556 at Map.forEach (<anonymous>)

I guess this error is more related to Lepton X 4.0.3 but since thats the version used for abp 9.0.2 i report it here.

This error results in Language-Switch not being added to the general settings and also the selected language is missing next to the settings gear.

I already debugged the js code a bit and it seems that the error occurs because the js script tries to load stuff for the containerWidth settings group. But since its an error inside the leptonx bundle i think its more productive that you guys check this further out and fix it.

Hi there,

we are getting a warning about AngleSharp version being outside of dependency constraint:

Seems to come from the cms pro module:

After reviewing the cms pro kit code i found out it directly refrences AngleSharp Version 1.1.2. BUT the also referenced HtmlSanitizer v8.1.870 requires AngleSharp Version 0.17.1.

Would be great if you could take a look and fix that for upcoming releases.

Hello,

i would sugggest you to update to abp 8.0. There has been a lot of improvements how to work with NoTracking using the abp repositories.

Checkout the blog post for 8.0: https://blog.abp.io/abp/announcing-abp-8-0-release-candidate IReadonlyRepository now defaultly use EfCores NoTracking feature.

Kind regards Nico

Answer

Hi,

these tables belong to some optional modules. You can remove the modules for your applications and after that these tables wont be created.

Let me list the modules these tables belong to:

  1. Multi-Tenancy/SaaS Module: SaasTenants SaasTenantConnectionStrings SaasEditions

  2. Payment Module: PayPlans PayPaymentRequests PayPaymentRequestProducts PayGatewayPlans

  3. Grpd Module: GdprInfo GdprRequests

  4. Chat Module: ChatConversations ChatMessages ChatUserMessages ChatUsers

If you dont need these modules remove the dependencies from your projects and remove any references to them.

Answer

Hi Bunty,

to achieve your goal to assign applications or scopes to users or roles you would need to implement a couple of custom components:

  1. An entity to store the assignments of users/roles to applications/scopes
  2. A domain manager to managing this entity
  3. A customer application service for crud operations for these assignments
  4. Custom ui for assigning users/roles to applications

With these points you just have the assignments. This wont affect any authentication flows or the applications shown on the Index-Page of the auth server.

To hide the applications, a user is not assigned to, on the Index-Page you would need to change the Index.cshtml logic to use your custom assignments and filter out applications not permitted to the user. The user would still be able to access the applications if he has the URLs.

If you really want to customize the signin flow for your applications you could override the SignInManager in the AuthServer Project and check if the user has access to the requested application by looking for an assignment to the application with your custom entity. Here is an example how to customize: https://github.com/abpframework/abp/blob/a1f521d5bf02ee54f2ee285cfdf54bd70b94d9e8/docs/en/Community-Articles/2020-04-19-Customize-the-SignIn-Manager/POST.md#L9 But as gterdem already stated: Authentication flows are standards and shouldn't be altered.

Hope this helps you.

Kind Regards Nico

There is no setting to disable the email confirmation during user registration.

If you want to disable the sending of the email confirmation you would need to override the AccountAppService and overide the RegisterAsync-Method like this:

public override async Task<IdentityUserDto> RegisterAsync(RegisterDto input)
{
    await CheckSelfRegistrationAsync();

    if (await UseCaptchaOnRegistration())
    {
        var reCaptchaValidator = await RecaptchaValidatorFactory.CreateAsync();
        await reCaptchaValidator.ValidateAsync(input.CaptchaResponse);
    }

    await IdentityOptions.SetAsync();

    var user = new IdentityUser(GuidGenerator.Create(), input.UserName, input.EmailAddress, CurrentTenant.Id);

    input.MapExtraPropertiesTo(user);

    (await UserManager.CreateAsync(user, input.Password)).CheckErrors();
    (await UserManager.AddDefaultRolesAsync(user)).CheckErrors();
    
    //disable sending email confirmation mail for registrations
    //if (!user.EmailConfirmed)
    //{
    //    await SendEmailConfirmationTokenAsync(user, input.AppName, input.ReturnUrl, input.ReturnUrlHash);
    //}

    return ObjectMapper.Map<IdentityUser, IdentityUserDto>(user);
}

The customer made the following changes that resulted into the app starting now in azure:

  • the first was the change to include the call to the AddEncryptionCertificate
  • the second was I had failed to change the URLs for the SelfURL and Authority settings in the appsettings.production.json file.

Ok send me an invitation of to a zoom/teams/google meet call when you have time. Here is my e-mail: nico@chrobyte.de

Please send the invitation +- 30 mins before start, so there is some puffer for me. Thanks :)

The logs you provided show that the system cannot send mails. Please verify that the smtp settings are configured correctly.

Showing 1 to 10 of 60 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13