Activities of "vipulbuoyancy"

  • ABP Framework version: v5.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello,

I added new entity from Code Generator abp suite. successfully generated my code. but I click new entity menu in angular UI. faced error in console.

core.mjs:6494 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(UserKeyModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! NullInjectorError: R3InjectorError(UserKeyModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! at NullInjector.get (core.mjs:11157:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at Object.get (core.mjs:21565:1) at lookupTokenUsingModuleInjector (core.mjs:3367:1) at getOrCreateInjectable (core.mjs:3479:1) at resolvePromise (zone.js:1213:1) at resolvePromise (zone.js:1167:1) at zone.js:1279:1 at ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:582:1)

please help for solve this error

Thanks

Hello,

I add new entity from Code Generator abp suite. successfully generated my code. but I click new entity menu in angular UI. faced error in console. core.mjs:6494 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(UserKeyModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! NullInjectorError: R3InjectorError(UserKeyModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! at NullInjector.get (core.mjs:11157:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at Object.get (core.mjs:21565:1) at lookupTokenUsingModuleInjector (core.mjs:3367:1) at getOrCreateInjectable (core.mjs:3479:1) at resolvePromise (zone.js:1213:1) at resolvePromise (zone.js:1167:1) at zone.js:1279:1 at ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:582:1)

please solve this error

Thanks

Hello

Configure<AbpClaimsServiceOptions>(options => { options.RequestedClaims.AddRange(new[]{ "SocialSecurityNumber" }); }); After adding this code working fine.

Thank you

hello

"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjcyQ0E3N0Y4NUZBQ0ZBQkUxNThGQkIzMkU3NEM4MUVCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTcwODgzMDgsImV4cCI6MTY4ODYyNDMwOCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NDQzODgiLCJhdWQiOiJVQlhfQ2xpZW50X0FuZ3VsYXIiLCJjbGllbnRfaWQiOiJVQlhfQ2xpZW50X0FuZ3VsYXJfQXBwIiwic3ViIjoiNDc5NTkyYmUtZTQzNS1kZWNiLTczZWMtMzlmZjE0OTU0YzYwIiwiYXV0aF90aW1lIjoxNjU3MDg4MzAzLCJpZHAiOiJsb2NhbCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2dpdmVubmFtZSI6ImFkbWluIiwidW5pcXVlX25hbWUiOiJhZG1pbiIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiZ2l2ZW5fbmFtZSI6ImFkbWluIiwicm9sZSI6ImFkbWluIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjoiRmFsc2UiLCJlbWFpbCI6ImFkbWluQGFicC5pbyIsImVtYWlsX3ZlcmlmaWVkIjoiRmFsc2UiLCJuYW1lIjoiYWRtaW4iLCJzaWQiOiIyNUQxMzA3MUQxNDA1REM3Q0U4RkExMEUxMTc0QjcyNyIsImlhdCI6MTY1NzA4ODMwOCwic2NvcGUiOlsib3BlbmlkIiwicHJvZmlsZSIsInJvbGUiLCJlbWFpbCIsInBob25lIiwiVUJYX0NsaWVudF9Bbmd1bGFyIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdfQ.ftoo73-sndK4SZP34J7n1Onqg9UY7ireubbr7H7Ft8uw5wcSP8dOXaakDXButlLH0V_FiCcy9SOEIRNO7Viqyp7iJnFc2lFZZ1DGhYWcJsiSUE9b6sgJmWpEOWMarISwgbODjDeX3YQZY--l8Dgg1lErsceVy2FP-ZhAD0uFzOILqFqTG670_2WzCrNIlysxdHlqG7Srdm7NWKowFHPAtNJfpP7tbCci3j75awd4M-6JM-NFa1IYohbmSpHawFRLep4BNQSCSwvqT6EnRazF7AccF2wfFf2VO2oXn2p1GauGjwSuHb6qfZg7gO_TnASXWJA-Prq_4PNNyxMKmjy65w",

Hello,

I try to re-login but I am unable to get the claim.

hello

public class SocialSecurityNumberClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency
{
    public async Task ContributeAsync(AbpClaimsPrincipalContributorContext context)
    {
        var identity = context.ClaimsPrincipal.Identities.FirstOrDefault();
        var userId = identity?.FindUserId();
        if (userId.HasValue)
        {
            //var userService = context.ServiceProvider.GetRequiredService<IUserService>(); //Your custom service
            //var socialSecurityNumber = await userService.GetSocialSecurityNumberAsync(userId.Value);
            var socialSecurityNumber = "123456789";
            if (socialSecurityNumber != null)
            {
                identity.AddClaim(new Claim("SocialSecurityNumber", socialSecurityNumber));
            }
        }
    }
}

I add an IAbpClaimsPrincipalContributor in class. Working fine this code if I use the api from swagger, but when I call the api from angular project, I am unable to get the claim.

Hi Maliming,

Thanks for your reply,

I share my code

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpUserClaimsPrincipalFactory))]
public class UBXUserClaimsPrincipalFactory : AbpUserClaimsPrincipalFactory, ITransientDependency
{
        public UBXUserClaimsPrincipalFactory(UserManager<Volo.Abp.Identity.IdentityUser> userManager,                           RoleManager<Volo.Abp.Identity.IdentityRole> roleManager, IOptions<IdentityOptions> options,                        ICurrentPrincipalAccessor currentPrincipalAccessor, IAbpClaimsPrincipalFactory                                     abpClaimsPrincipalFactory) : base(userManager, roleManager, options, currentPrincipalAccessor,                     abpClaimsPrincipalFactory)
        {
        }
        [UnitOfWork]
        public override async Task<ClaimsPrincipal> CreateAsync(Volo.Abp.Identity.IdentityUser user)
        {
        var principal = await base.CreateAsync(user).ConfigureAwait(false);
        principal.Identities
                    .First()
                    .AddClaim(new Claim("ApiKey",  "712bfe60b83028da5XpkbpC6IgW0Fkagi0rWhay1nm7Ru6FzuYx5t6i2GX3PkoN7odDyNL463t5qZvM3WmMqUA67g2syy0rY3Trmhah5JXQXXYargIH4iGu3BObWIWwC"));
            return principal;
        }
}

public override void PreConfigureServices(ServiceConfigurationContext context)
        {
            PreConfigure<IdentityBuilder>(builder =>
            {
                builder.AddClaimsPrincipalFactory<UBXUserClaimsPrincipalFactory>();
            });
        }

Hi Maliming,

Thanks for your reply,

Right now I am using below code and which is working fine if I use the api from swagger, but when I call the api from angular project, I am unable to get the claim.

var identity = _currentPrincipalAccessor.Principal.Identities.FirstOrDefault(); identity.AddClaim(new Claim("VSPCApiKey", result));

Please help me if you have gone through the similar issue.

Thanks,

  • ABP Framework version: v5.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello,

I have a requirement to save one key for the user and which I want to maintain through out the session of the user, so I don't have to call the database multiple times for each and every API request. Please help me how can I achieve this functionality with ABP.io

hello,

I try to generate after removing angular/.suite folder. Generate angular component successfully. But not display menu for new entity in angular UI. I faced get error in existing entity in angular UI :

core.mjs:6494 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(OnAppUserModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! NullInjectorError: R3InjectorError(OnAppUserModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! at NullInjector.get (core.mjs:11157:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at Object.get (core.mjs:21565:1) at lookupTokenUsingModuleInjector (core.mjs:3367:1) at getOrCreateInjectable (core.mjs:3479:1) at resolvePromise (zone.js:1213:1) at resolvePromise (zone.js:1167:1) at zone.js:1279:1 at ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:582:1)

Thanks

Showing 31 to 40 of 46 entries
Made with ❤️ on ABP v9.1.0-rc.1. Updated on January 17, 2025, 14:13