Hello, We use the Notification module as nuget package in our shell project. Normally everything works fine with dependencies, but when we run the tests we are getting the specific error. Here is the some screenshots in detail:
About my application module:
[DependsOn(
typeof(PcdmsDomainModule),
typeof(PcdmsApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpAutoMapperModule),
typeof(AbpAspNetCoreSignalRModule),
typeof(AbpDddApplicationModule),
typeof(AbpEventBusRabbitMqModule),
typeof(TextTemplateManagementApplicationModule),
typeof(AbpTextTemplatingRazorModule),
typeof(NotificationApplicationModule),
typeof(DataManagementApplicationModule),
typeof(ProcessManagementApplicationModule),
typeof(AbpSettingManagementApplicationModule)
)]
public class PcdmsApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
...
}
}
**About Notification Module Application Layer**
[DependsOn(
typeof(NotificationDomainModule),
typeof(NotificationApplicationContractsModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule)
)]
public class NotificationApplicationModule : AbpModule
{
public override void OnPreApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
app.UseMiddleware();
}
...
}
When I run all tests, it gives an error like below: Siemens.PSSX.Pcdms.Areas.AreasAppServiceTests.CreateAsync Source: AreaApplicationTests.cs line 47 Duration: 1 ms
Message: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnPreApplicationInitializationModuleLifecycleContributor phase of the module Siemens.PSSX.Notification.NotificationApplicationModule, Siemens.PSSX.Notification.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: Object reference not set to an instance of an object.. See the inner exception for details. ---- System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
ModuleManager.InitializeModules(ApplicationInitializationContext context)
AbpApplicationBase.InitializeModules()
AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
AbpIntegratedTest1.ctor() PcdmsTestBase
1.ctor()
PcdmsApplicationTestBase.ctor()
AreasAppServiceTests.ctor() line 16
RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
----- Inner Stack Trace -----
UseMiddlewareExtensions.UseMiddlewareInterface(IApplicationBuilder app, Type middlewareType)
NotificationApplicationModule.OnPreApplicationInitialization(ApplicationInitializationContext context)
OnPreApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
ModuleManager.InitializeModules(ApplicationInitializationContext context)
It seems to us, UseMiddleware of OnPreApplicationInitialization part causes that. (when we comment the notification module in PcdmsApplicationModule , all passed.) Could you please inform us about how we should apply or use middleware part to our test application? Many thanks, Gizem
If you want, I can e-mail you the new project I created as zip. Screenshots are as follows.
I kindly ask for your help and suggestions. Thank you.
Hello Team, I have extended a 'DirectoryDescriptor' , 'FileDescriptor' entities and their dtos of 'FileManagement' module and added a new string type field ,called as 'TestField'. I have configured both entities and I observed that it works properly. I also mapped EFCore property to hold it as a separate column instead of extraProperties column.
However, I am unable to sort 'TestField' because it gives me the following error: [12:36:14 ERR] No property or field 'TestField' exists in type 'DirectoryDescriptor'
I have seen this issue that mentions a similar problem: https://support.abp.io/QA/Questions/4643/Column-sorts-not-working-in-dependent-module-listings---Blazor-Server
Is this issue fixed on newer versions of the ABP framework. Thank you for your time. Kind Regards, Gizem
Hello , I want to add 'export' button on all abp generated tables to export data as excel/pdf file. But we don't use source code both frontend (angular ) side and backend side. Current situation we just called library on configuration files. So should i customize backend -identity related page's code (mvc) - and add buttons & implementation ? If yes could you please give an information about it ?
For example , i need export those tables' data : (role,user,security log,audit logs etc.)
Thank you, Have a nice day.
Hi,
We are using AbpRabbitMqModule, AbpEventBusRabbitMqModule modules for eventbus messaging . We want to update AbpRabbitMqOptions HostName at runtime with user input. We are using appsettings.json to configuration. Is updating appsettings.json enough ?
I attached related part of our code .What is the best way to do that? Is there a way to reconfigure a module at runtime and reinitialize it? Thanks a lot.
Hello,
We are using ABP framework with separate identity server. When we run these projects over IIS on local machine the integration between Host and Identity Server work fine. However, when we have dockerized our Host Project, we have faced an authentication problem.(We have tried to run identity server both from docker and over IIS locally. The given error is the same)
Scenario:
-We can reach the swagger endpoint over https successfully -Swagger authenticates by using identity server(Which is served over https too) and redirects back successfully. -When we send a request over swagger, host project throw the following error.(To get this error we needed to set the ShowPII flag):
Also:
-We are sure that “host.docker.internal “ is reachable from container because we reach the DB and the broker by the same way. -Identity server's url is the same with host server's authority. -Host server's url is defined in CORS urls of identity server. -Key persistency is set to file system.
`var keysFolder = Path.Combine(_environment.ContentRootPath, "Keys");
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(keysFolder));`
-Cookie policy is set in both project's application builder.
`app.UseCookiePolicy(new CookiePolicyOptions
{
MinimumSameSitePolicy = SameSiteMode.None,
Secure = CookieSecurePolicy.Always
});`
Tried Alternatives:
-Creating certificates in different ways didn’t help. We have tried to generate .pfx certificate both by using ssl and “dotnet dev-certs”, the result is the same.
-Pfx certificate is tried to be created during the image building by the dockerfile instead of defining volume to the self-signed certificate of host machine. Both gave the same result.
-Inside the container, certificate is cleaned up and re-trusted by dotnet dev-certs https -ep /https/cert.pfx --trust -p password
-We have also tried to run these two projects with the same key and with different keys, the result didn't change.
-Configuring Kestrel options of host project's web builder for certificate instead of defining it while running the container doesn't change the error .
Thank you
Hello, I read some other tickets about email related topic. Firstly, I'm not sure *.Web layer is necessary for using sending email attributes.( should we add it ?) In here https://docs.abp.io/en/abp/latest/Emailing says " Setting Management module is already installed if you've created your solution from the ABP Startup template." We used abp startup template , so i dont define any settings in our appsettings.json(in *.IdentityServer). And as I understand from here, https://support.abp.io/QA/Questions/1338/How-to-send-email there is no need any code configuration . I can see email settings and templates in our UI page like below :
And I also read this https://docs.abp.io/en/abp/latest/Emailing#nullemailsender so , removed those debug mode lines.
When I tried forgot password , it gives this response :
Details like : SmtpException: Failure sending mail. Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, bool normalize) Volo.Abp.Emailing.EmailSenderBase.SendAsync(string to, string subject, string body, bool isBodyHtml) Volo.Abp.Account.Emailing.AccountEmailer.SendPasswordResetLinkAsync(IdentityUser user, string resetToken, string appName, string returnUrl, string returnUrlHash) Volo.Abp.Account.AccountAppService.SendPasswordResetCodeAsync(SendPasswordResetCodeDto input) Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed) Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed) Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed) Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed) Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed) Volo.Abp.Account.Public.Web.Pages.Account.ForgotPasswordModel.OnPostAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+GenericTaskHandlerMethod.Convert(object taskAsObject) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+GenericTaskHandlerMethod.Execute(object receiver, object[] arguments) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<b__1>d.MoveNext() Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<b__1>d.MoveNext() Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<b__1>d.MoveNext() Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<b__1>d.MoveNext() Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<b__1>d.MoveNext() Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<b__1>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Could you explain how can we handle this? Many thanks :)