ABP Framework version: v8.1.0
UI Type: MVC
Database System: MongoDB
Tiered (for MVC) or Auth Server Separated (for Angular): no
I generated a module using ABP.IO within the same solution. However, when I try to create CRUD operations, they are being added to the main project instead of the module, even though I specify the module's namespace. The main project already has a namespace with the same name as the module.
I hope you are getting me.
30 Answer(s)
-
0
Hi,
could you please share the full steps to reproduce ? thanks.
-
0
Hi,
could you please share the full steps to reproduce ? thanks.
Generate the Module: You created a new module using ABP.IO, and this module is part of the same solution as your main project.
Namespace Conflict: Your module and main project have a namespace with the same name. For example, if your module is called MyModule, you already have MyModule as a namespace in your main project.
Creating CRUD Operations: When you try to add CRUD functionality (like an entity or service) to your module, the code files are being generated in the main project, not in your module project, even though you specify the MyModule namespace.
Expected Result: You want the CRUD code to be generated inside your module project, not the main project.
Actual Result: Despite specifying the namespace to match the module, the CRUD code goes into the main project.
-
0
-
0
-
0
Hi,
Sorry I don't understand.
could you please share a test project with me? i will check it. shiwei.liang@volosoft.com
-
0
No i cant, can we share screen and finalize it? with windows quick assist etc?
-
0
Hi,
you can use a new project to reproduce the problem.
-
0
ok i will do that later right now i am facing issue on production server below is the log- i dont know why its happening there is no any expired certifciate etc -- can you please guide on this?
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) 2024-11-14 06:59:37.911 +00:00 [ERR] An exception was thrown attempting to execute the error handler. System.InvalidOperationException: When using X.509 encryption credentials, at least one of the registered certificates must be valid. To use key rollover, register both the new certificate and the old one in the credentials collection. at OpenIddict.Server.OpenIddictServerConfiguration.PostConfigure(String name, OpenIddictServerOptions options) at Microsoft.Extensions.Options.OptionsFactory
1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c.<Get>b__10_0(String name, IOptionsFactory1 factory) at Microsoft.Extensions.Options.OptionsCache
1.<>c__DisplayClass3_11.<GetOrAdd>b__2() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy
1.CreateValue() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd[TArg](String name, Func
3 createOptions, TArg factoryArgument) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.get_CurrentValue() at OpenIddict.Validation.ServerIntegration.OpenIddictValidationServerIntegrationConfiguration.Configure(OpenIddictValidationOptions options) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c.<Get>b__10_0(String name, IOptionsFactory1 factory) at Microsoft.Extensions.Options.OptionsCache
1.<>c__DisplayClass3_11.<GetOrAdd>b__2() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy1.CreateValue() at Microsoft.Extensions.Options.OptionsCache
1.GetOrAdd[TArg](String name, Func3 createOptions, TArg factoryArgument) at Microsoft.Extensions.Options.OptionsMonitor
1.Get(String name) at OpenIddict.Validation.OpenIddictValidationFactory.CreateTransactionAsync() at OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler.HandleRequestAsync() at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at MyDhobi.Web.MyDhobiWebModule.<>c.<<OnApplicationInitialization>b__17_0>d.MoveNext() in C:\Users\Suraj\OneDrive\Desktop\MyLaundry\Code\abp\Backoffice\Ver3o\mydhobi\src\MyDhobi.Web\MyDhobiWebModule.cs:line 560 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.HandleException(HttpContext context, ExceptionDispatchInfo edi) 2024-11-14 06:59:37.912 +00:00 [ERR] Connection ID "14555633996466750307", Request ID "40000365-0000-ca00-b63f-84710c7967bb": An unhandled exception was thrown by the application. System.InvalidOperationException: When using X.509 encryption credentials, at least one of the registered certificates must be valid. To use key rollover, register both the new certificate and the old one in the credentials collection. at OpenIddict.Server.OpenIddictServerConfiguration.PostConfigure(String name, OpenIddictServerOptions options) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c.<Get>b__10_0(String name, IOptionsFactory1 factory) at Microsoft.Extensions.Options.OptionsCache
1.<>c__DisplayClass3_11.<GetOrAdd>b__2() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy
1.CreateValue() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd[TArg](String name, Func
3 createOptions, TArg factoryArgument) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.get_CurrentValue() at OpenIddict.Validation.ServerIntegration.OpenIddictValidationServerIntegrationConfiguration.Configure(OpenIddictValidationOptions options) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c.<Get>b__10_0(String name, IOptionsFactory1 factory) at Microsoft.Extensions.Options.OptionsCache
1.<>c__DisplayClass3_11.<GetOrAdd>b__2() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy1.CreateValue() at Microsoft.Extensions.Options.OptionsCache
1.GetOrAdd[TArg](String name, Func3 createOptions, TArg factoryArgument) at Microsoft.Extensions.Options.OptionsMonitor
1.Get(String name) at OpenIddict.Validation.OpenIddictValidationFactory.CreateTransactionAsync() at OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler.HandleRequestAsync() at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at MyDhobi.Web.MyDhobiWebModule.<>c.<<OnApplicationInitialization>b__17_0>d.MoveNext() in C:\Users\Suraj\OneDrive\Desktop\MyLaundry\Code\abp\Backoffice\Ver3o\mydhobi\src\MyDhobi.Web\MyDhobiWebModule.cs:line 560 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.HandleException(HttpContext context, ExceptionDispatchInfo edi) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync() 2024-11-14 06:59:37.913 +00:00 [INF] Request finished HTTP/1.1 GET http://bk4mr.mylaundryapp.ae/health-status - 500 null null 2.9565ms 2024-11-14 06:59:37.913 +00:00 [INF] Received HTTP response headers after 3.6982ms - 500 2024-11-14 06:59:37.913 +00:00 [INF] End processing HTTP request after 3.8513ms - 500 2024-11-14 06:59:37.913 +00:00 [INF] Notification is sent on same window time. 2024-11-14 06:59:37.913 +00:00 [DBG] HealthReportCollector - health report execution history saved. 2024-11-14 06:59:37.913 +00:00 [DBG] HealthReport history already exists and is in the same state, updating the values. 2024-11-14 06:59:37.913 +00:00 [DBG] HealthReportCollector has completed. 2024-11-14 06:59:37.914 +00:00 [DBG] HealthCheck collector HostedService executed successfully. -
0
Hi,
You can try to generate a new credential https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/openiddict-deployment#signing-and-encryption-certificate
Generating a Signing Certificate
In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an
openiddict.pfx
file in your application.This certificate is already generated by ABP CLI, so most of the time you don't need to generate it yourself. However, if you need to generate a certificate, you can use the following command:
dotnet dev-certs https -v -ep openiddict.pfx -p ace85f4f-9e64-48a5-8d8e-9e630f44c944
ace85f4f-9e64-48a5-8d8e-9e630f44c944
is the password of the certificate, you can change it to any password you want.It is recommended to use two RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.
For more information, please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios
-
0
-
0
-
0
-
0
"Cannot read properties of null (reading 'replace')" error
This is a bug from the previous version. you can upgrade your project to 8.3.3 and remove
yarn.lock
then run theabp install-libs
to restore packages. -
0
"Cannot read properties of null (reading 'replace')" error
This is a bug from the previous version. you can upgrade your project to 8.3.3 and remove
yarn.lock
then run theabp install-libs
to restore packages.yes i upgraded to 8.3.3 not 8.1.4 still same error after trying your steps
-
0
could you please share the NG project
package.json
content -
0
{ "name": "MyDhobi", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "build:prod": "ng build --configuration production", "watch": "ng build --watch --configuration development", "test": "ng test", "lint": "ng lint" }, "private": true, "dependencies": { "@abp/ng.components": "~9.0.0", "@abp/ng.core": "~9.0.0", "@abp/ng.oauth": "~9.0.0", "@abp/ng.setting-management": "~9.0.0", "@abp/ng.theme.shared": "~9.0.0", "@angular/animations": "~17.1.0", "@angular/cdk": "17.1.1", "@angular/common": "~17.1.0", "@angular/compiler": "~17.1.0", "@angular/core": "~17.1.0", "@angular/forms": "~17.1.0", "@angular/localize": "~17.1.0", "@angular/material": "17.1.1", "@angular/platform-browser": "~17.1.0", "@angular/platform-browser-dynamic": "~17.1.0", "@angular/router": "~17.1.0", "@volo/abp.commercial.ng.ui": "~9.0.0", "@volo/abp.ng.account": "~9.0.0", "@volo/abp.ng.audit-logging": "~9.0.0", "@volo/abp.ng.chat": "~9.0.0", "@volo/abp.ng.file-management": "~9.0.0", "@volo/abp.ng.gdpr": "~9.0.0", "@volo/abp.ng.identity": "~9.0.0", "@volo/abp.ng.language-management": "~9.0.0", "@volo/abp.ng.openiddictpro": "~9.0.0", "@volo/abp.ng.saas": "~9.0.0", "@volo/abp.ng.text-template-management": "~9.0.0", "@volosoft/abp.ng.theme.lepton-x": "~4.0.0", "chart.js": "^4.4.5", "ng2-charts": "^6.0.1", "ngx-quill": "16.x", "parchment": "^3.0.0", "quill": "1.3.7", "quill-delta": "^5.1.0", "rxjs": "~7.8.0", "tslib": "^2.0.0", "zone.js": "~0.14.0" }, "devDependencies": { "@abp/ng.schematics": "~9.0.0", "@angular-devkit/build-angular": "~17.1.0", "@angular-eslint/builder": "~17.1.0", "@angular-eslint/eslint-plugin": "~17.1.0", "@angular-eslint/eslint-plugin-template": "~17.1.0", "@angular-eslint/schematics": "~17.1.0", "@angular-eslint/template-parser": "~17.1.0", "@angular/cli": "~17.1.0", "@angular/compiler-cli": "~17.1.0", "@angular/language-service": "~17.1.0", "@types/jasmine": "~3.6.0", "@types/node": "^12.0.0", "@typescript-eslint/eslint-plugin": "6.9.1", "@typescript-eslint/parser": "6.9.1", "eslint": "^8.0.0", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.0.0", "ng-packagr": "~17.1.0", "typescript": "~5.3.0" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }
{ "version": "1.0.0", "name": "my-app", "private": true, "dependencies": { "@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~4.0.0", "@syncfusion/ej2": "26.1.40", "@volo/account": "~9.0.0", "@volo/audit-logging": "~9.0.0", "@volo/chat": "~9.0.0", "@volo/identity": "~9.0.0", "@volo/language-management": "~9.0.0", "@volo/saas": "~9.0.0" } }
-
0
-
0
-
0
-
0
-
0
i was able to restore abp but whenever i update abp packages from abp suites it adds earlier package file so i created new and copied package file from there after abp install-libs i am still facing this
Cannot read properties of null (reading 'replace')
here is my latest package file
{ "name": "MyDhobi", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "build:prod": "ng build --configuration production", "watch": "ng build --watch --configuration development", "test": "ng test", "lint": "ng lint" }, "private": true, "dependencies": { "@abp/ng.components": "~8.3.3", "@abp/ng.core": "~8.3.3", "@abp/ng.oauth": "~8.3.3", "@abp/ng.setting-management": "~8.3.3", "@abp/ng.theme.shared": "~8.3.3", "@volo/abp.commercial.ng.ui": "~8.3.3", "@volo/abp.ng.account": "~8.3.3", "@volo/abp.ng.audit-logging": "~8.3.3", "@volo/abp.ng.gdpr": "~8.3.3", "@volo/abp.ng.chat": "~8.3.3", "@volo/abp.ng.identity": "~8.3.3", "@volo/abp.ng.openiddictpro": "~8.3.3", "@volo/abp.ng.language-management": "~8.3.3", "@volo/abp.ng.file-management": "~8.3.3", "@volo/abp.ng.saas": "~8.3.3", "@volo/abp.ng.text-template-management": "~8.3.3", "@volosoft/abp.ng.theme.lepton-x": "~3.3.3", "@angular/animations": "~18.1.0", "@angular/common": "~18.1.0", "@angular/compiler": "~18.1.0", "@angular/core": "~18.1.0", "@angular/forms": "~18.1.0", "@angular/localize": "~18.1.0", "@angular/platform-browser-dynamic": "~18.1.0", "@angular/platform-browser": "~18.1.0", "@angular/router": "~18.1.0", "rxjs": "~7.8.0", "tslib": "^2.0.0", "zone.js": "~0.14.0", "@angular/cdk": "18.1.1", "@angular/material": "18.1.1", "chart.js": "^4.4.5", "ng2-charts": "^6.0.1", "ngx-quill": "16.x", "parchment": "^3.0.0", "quill": "1.3.7", "quill-delta": "^5.1.0" }, "devDependencies": { "@abp/ng.schematics": "~8.3.3", "@angular-devkit/build-angular": "~18.1.0", "@angular-eslint/builder": "~18.1.0", "@angular-eslint/eslint-plugin": "~18.1.0", "@angular-eslint/eslint-plugin-template": "~18.1.0", "@angular-eslint/schematics": "~18.1.0", "@angular-eslint/template-parser": "~18.1.0", "@angular/cli": "~18.1.0", "@angular/compiler-cli": "~18.1.0", "@angular/language-service": "~18.1.0", "@types/jasmine": "~3.6.0", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", "eslint": "^8.0.0", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.0.0", "ng-packagr": "~17.1.0", "typescript": "~5.3.0" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }
and when i call this from browser
/api/abp/api-definition
it works but from swagger it throws maximum call stack reached error,also when i open the project in abp suite its throwing this error
2024-11-20 17:47:28.298 +04:00 [WRN] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "Cannot find the directory ", "details": null, "data": {}, "validationErrors": null }
2024-11-20 17:47:28.299 +04:00 [WRN] Cannot find the directory Volo.Abp.UserFriendlyException: Cannot find the directory at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SuiteAssemblyService.xxf0s0QRuX(String ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SuiteAssemblyService.h0RBz97KWi(Solution , String& ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SuiteAssemblyService.JlWB57JDtV(Solution , String& ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SuiteAssemblyService.AssemblyExists(Solution solution) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SolutionService.IsSolutionBuiltAsync(Guid solutionId) at Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync(Guid solutionId) at lambda_method1970(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
I would greatly appreciate a quicker response.
-
0
I’m hoping for a response soon, as I need assistance.
-
0
also when i open the project in abp suite its throwing this error
Is your CLI and Suite 8.3.3 version too? You can try remove project from suite and re-add it.
-
0
-
0