Activities of "imranStem"

Description

We have integrated our shop application with Angular SSR (Server-Side Rendering). In this setup, certain API requests are executed on the server (Node.js) during the rendering phase, and the data is transferred to the client.

If a server-side request fails, the application falls back to client-side execution, and the data (e.g., categories) loads successfully in the browser.

Backend Configuration

The backend gateway is implemented using the ABP Framework with OpenIddict but end point is opened.

Observations SSR runs in a Node.js environment, not in the browser Browser requests automatically include authentication (cookies or tokens) SSR requests may not include the same authentication context If SSR fails, the client-side fallback works correctly and loads the data

Suspected Causes

We are not certain about the exact root cause, but possible reasons include:

Authentication not being forwarded during SSR Missing cookies or access tokens in server-side requests Differences in request context SSR requests may not include required headers (Authorization / cookies) CORS or origin-related differences Requests originating from Node.js instead of browser (Possibly) SSL / certificate-related configuration Only if backend enforces stricter validation for non-browser clients

Steps to Reproduce Configure Angular application with SSR Connect it to an ABP backend secured with OpenIddict Call a API during SSR rendering Observe failure in SSR Access the same API via browser/Postman → works successfully

Expected Behavior

SSR should be able to call secured APIs when properly authenticated or should have a recommended pattern for handling such scenarios.

Actual Behavior SSR API call fails with an exception Client-side fallback successfully retrieves and displays data

Error in node.js

UNABLE_TO_VERIFY_LEAF_SIGNATURE

npm list @abp/ng.core result

nxp@0.0.32 E:\projects\NxP-Design\NxP\apps\design-system
+-- @abp/ng.account@10.2.0
| `-- @abp/ng.account.core@10.2.0
|   `-- @abp/ng.core@10.2.0 deduped
+-- @abp/ng.components@10.2.0
| `-- @abp/ng.core@10.2.0 deduped
+-- @abp/ng.core@10.2.0
+-- @abp/ng.oauth@10.2.0
| `-- @abp/ng.core@10.2.0 deduped
+-- @abp/ng.theme.shared@10.2.0
| `-- @abp/ng.core@10.2.0 deduped
`-- @volo/abp.ng.account.core@10.2.0
  `-- @abp/ng.core@10.2.0 deduped

Packages

"@abp/ng.account": "10.2.0",
    "@abp/ng.components": "10.2.0",
    "@abp/ng.core": "10.2.0",
    "@abp/ng.oauth": "10.2.0",
    "@abp/ng.setting-management": "10.2.0",
    "@abp/ng.theme.shared": "10.2.0",
    "@angular/animations": "21.0.0",
    "@angular/common": "21.0.0",
    "@angular/compiler": "21.0.0",
    "@angular/core": "21.0.0",
    "@angular/aria": "~21.1.0",
    "@angular/forms": "21.0.0",
    "@angular/localize": "21.0.0",
    "@angular/platform-browser": "21.0.0",
    "@angular/platform-browser-dynamic": "21.0.0",
    "@angular/router": "21.0.0",
    "@volo/abp.commercial.ng.ui": "10.2.0",
    "@volo/abp.ng.account.core": "10.2.0",
    "@volo/abp.ng.audit-logging": "10.2.0",
    "@volo/abp.ng.chat": "10.2.0",
    "@volo/abp.ng.gdpr": "10.2.0",
    "@volo/abp.ng.identity": "10.2.0",
    "@volo/abp.ng.language-management": "10.2.0",
    "@volo/abp.ng.openiddictpro": "10.2.0",
    "@volo/abp.ng.saas": "10.2.0",
    "@volo/abp.ng.text-template-management": "10.2.0",
    "@volosoft/abp.ng.theme.lepton-x": "~5.2.0",

I changed the app module as below.

imports: [
    BrowserModule,
    BrowserAnimationsModule,

    CoreModule.forRoot({
      environment,
      registerLocaleFn: registerLocale(),
    }),

    AbpOAuthModule.forRoot(),
    ThemeSharedModule.forRoot({
      httpErrorConfig: {
        errorScreen: {
          component: HttpErrorComponent,
          forWhichErrors: [401, 403, 404, 500],
          hideCloseIcon: true,
        },
      },
    }),

    AccountAdminConfigModule.forRoot(),
    AccountPublicConfigModule.forRoot(),
    AccountConfigModule.forRoot(),
    IdentityConfigModule.forRoot(),
    LanguageManagementConfigModule.forRoot(),
    SaasConfigModule.forRoot(),
    AuditLoggingConfigModule.forRoot(),
    OpeniddictproConfigModule.forRoot(),
    TextTemplateManagementConfigModule.forRoot(),
    SettingManagementConfigModule.forRoot(),
    FeatureManagementModule.forRoot(),
    ThemeLeptonXModule.forRoot(),
    SideMenuLayoutModule.forRoot(),
    CommercialUiConfigModule.forRoot(),
    ChatConfigModule.forRoot(),
    .... other modules

After this changes, I am getting following error now.

ERROR RuntimeError: NG0201
    at R3Injector.get (_untracked-chunk.mjs:1204:17)
    at R3Injector.get (_untracked-chunk.mjs:1192:27)
    at R3Injector.retrieve (_untracked-chunk.mjs:1102:19)
    at injectInjectorOnly (_untracked-chunk.mjs:625:35)
    at ɵɵinject (_untracked-chunk.mjs:637:40)
    at inject2 (_untracked-chunk.mjs:646:10)
    at new _OAuthConfigurationHandler (abp-ng.oauth.mjs:147:20)
    at Object.OAuthConfigurationHandler_Factory [as factory] (abp-ng.oauth.mjs:157:14)
    at R3Injector.hydrate (_untracked-chunk.mjs:1301:33)
    at R3Injector.get (_untracked-chunk.mjs:1187:23)

Line code: this.options = inject(CORE_OPTIONS);

We recently upgraded our Angular application from Angular 17 to Angular 20, and we are encountering a runtime dependency injection error related to ABP Angular packages.

The error occurs during application startup and seems to be related to RestService from abp-ng.core.

Error Details RuntimeError: NG0201 at R3Injector.get (root_effect_scheduler.mjs:2081:27) at R3Injector.get (root_effect_scheduler.mjs:2052:33) at R3Injector.retrieve (root_effect_scheduler.mjs:1936:25) at injectInjectorOnly (root_effect_scheduler.mjs:1049:39) at ɵɵinject (root_effect_scheduler.mjs:1061:42) at inject2 (root_effect_scheduler.mjs:1149:12) at new _RestService (abp-ng.core.mjs:2213:20)

Current Setup Angular Version: 20 Using custom AbpModule to group all ABP-related modules Using NgModule-based architecture (not standalone)

AppModule Configuration
@NgModule({
  imports: [
    AbpModule,
    BrowserModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    HttpClientModule,
    // other modules...
  ],
  providers: [
    ....,
    {
      provide: AuthService,
      useClass: NxPAuthServiceService,
    }
  ],
})
export class AppModule {}
@NgModule({ 
    imports: [ 
                CoreModule.forRoot({ environment, registerLocaleFn: registerLocale(), }), 
                AbpOAuthModule.forRoot(), 
                ThemeSharedModule.forRoot(), 
                // multiple ABP config modules... 
            ], 
    exports: [ 
                CoreModule, 
                AbpOAuthModule, 
                ThemeSharedModule, // same modules exported... 
             ] 
    }) 
export class AbpModule {}

Actual Behavior Application fails at startup with NG0201 (No provider found) related to RestService.

Is there a recommended way to structure AbpModule in newer Angular versions? Do we need to migrate to standalone APIs (bootstrapApplication) for compatibility?

Any guidance or recommended migration steps would be greatly appreciated.

Thanks Imrankhan

Hello, I am using ABP 8.1.5 version so I can't use integration service.

I’m facing a permission/authorization issue while calling an AppService of one microservice from another in an ABP-based microservice architecture.

Scenario MS1Service contains ProductsAppService Permission required: MS1Service.Products

MS2Service calls ProductsAppService of MS1Service using client credentials flow

I created an Application Client with the following details:

ClientId: DAS Client Type: Confidential Grant Type: Client Credentials Allowed Scope: MS1Service Granted Permission: MS1Service.Products

**MS2Service **appsettings.json

"RemoteServices": {
  "MS1Service": {
    "BaseUrl": "https://localhost:44388/",
    "UseCurrentAccessToken": "false"
  }
},
"IdentityClients": {
  "Default": {
    "GrantType": "client_credentials",
    "ClientId": "DAS",
    "ClientSecret": "1q2w3e*",
    "Authority": "https://localhost:44322",
    "Scope": "MS1Service"
  }
}

When **MS2Service **calls the AppService of MS1Service, I receive the following authorization error:

[INF] Authorization failed. These requirements were not met:
PermissionRequirement: MS1Service.Products

[WRN] ---------- RemoteServiceErrorInfo ----------
{
  "code": "Volo.Authorization:010001",
  "message": "Authorization failed! Given policy has not granted."
}

Is granting permission to the Application Client (DAS) sufficient for client-to-service calls? Is any additional configuration required in UseCurrentAccessToken or AbpAuthorizationOptions.

I’m trying to understand the correct and recommended way to authorize service-to-service AppService calls in ABP using client credentials.

Any pointers, examples, or documentation references would be greatly appreciated.

Thanks in advance!

imran@spacestem.com

I sent it by wetransfer.

I sent email

I am getting following error now.

System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Church.Api.Services.IShipmentAppService Lifetime: Transient ImplementationType: Church.Api.Services.ShipmentAppService': Unable to resolve service for type 'AutoMapper.IMapper' while attempting to activate 'Church.Api.Services.ShipmentAppService'.)

I have added dependency of auto mapper.

[DependsOn(typeof(NxPBlobStoringAwsModule), typeof(AbpAutoMapperModule))]
public class ChurchAipModule : AbpModule
{

I have one .net core web api project which is not abp solution but I want to use the blob storing module with this project. I have created one module in the project as below.

[DependsOn(typeof(NxPBlobStoringAwsModule))]
 public class NxPAipModule : AbpModule
 {
     public override void PreConfigureServices(ServiceConfigurationContext context)
     {
         //context.Services.AddAutoMapperObjectMapper<>();
         base.PreConfigureServices(context);

         Configure<AbpBlobStoringOptions>(options =>
         {
             options.Containers.Configure<DocumentBlobContainer>(container =>
             {
                 container.UseAws(Aws =>
                 {
                     Aws.Region = "eu-west-2";
                     Aws.CreateContainerIfNotExists = true;
                     Aws.UseClientSideEncryption = false;
                     Aws.AccessKeyId = "";
                     Aws.SecretAccessKey= "";
                     Aws.ContainerName = "nxp-staging-1";
                 });
             });
         });
     }
 }

and create the intance of NxPApiModule in program.cs file as below.

using (var application = AbpApplicationFactory.Create<ChurchAipModule>(options =>
 {
     options.UseAutofac();
 }))

This is my NxPBlobStoringAwsModule

[DependsOn(typeof(AbpBlobStoringModule),
 typeof(AbpCachingModule),
     typeof(AbpAutofacModule))]
 public class NxPBlobStoringAwsModule : AbpModule
 {
 }

When I run the project, I am getting below exception on application build.

  • Exception message and full stack trace: System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Volo.Abp.BlobStoring.IBlobContainer Lifetime: Transient ImplementationType: Volo.Abp.BlobStoring.BlobContainer1[Church.Api.DocumentBlobContainer]': Unable to resolve service for type 'Volo.Abp.BlobStoring.IBlobContainerFactory' while attempting to activate 'Volo.Abp.BlobStoring.BlobContainer1[Church.Api.DocumentBlobContainer]'.) (Error while validating the service descriptor 'ServiceType: Church.Api.Services.IShipmentAppService Lifetime: Transient ImplementationType: Church.Api.Services.ShipmentAppService':
  • Steps to reproduce the issue:
Showing 1 to 10 of 131 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.