Activities of "kfrancis@clinicalsupportsystems.com"

I have made a sample, though this isn't using hangfire: https://github.com/kfrancis/abp-hangfire-sample and that seems to work. If you seed and login under default/admin then go to the books listing, you can see one book (one is tenanted, one is not). Click on the book row to fill in the id, then click "run". You can see in the HttpApi.Host logs that the job is running and it's pulling the name of the book to use in the log entry.

  • The report job is enqueued from the BooksAppService
  • DI seems to be working normally
  • Data filtering seems to be working normally (using CurrentTenant.Change)
  • I've added SignalR to facilitate abp.notify on the clients when the background job completes (to the specific user)

Here's what that looks like:

If you can, would you be able to take a look and see what changes need to be made to make this use Hangfire?

I do see the SeperateBackgroundJob sample, but it's not quite the same use case. In most cases, I would think people would be running hangfire with the Web project and be able to queue jobs from any other code.

Hi,

We're in desperate need of a working abp sample using hangfire with SQL, where jobs can be enqueued from Web and Application (from AppService). Would this be possible?

We've having a heck of a time trying to get this working, because the documentation isn't straightforward enough and doesn't really include this scenario (enqueue job from app service) but it's vital for a job that generates reports which can be done from multiple clients (web, maui, etc).

  • ABP Framework version: v7.0.3 (trying to update)
  • UI Type: MVC
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Issues we've run into:

  • Unidentified background job for the job args type (type here)
  • The job type is not registered to DI Volo.Abp.AbpException: The job type is not registered to DI: CabMD.GeneratedReports.GenerateReportJob at Volo.Abp.BackgroundJobs.BackgroundJobExecuter.ExecuteAsync(JobExecutionContext context) at Volo.Abp.BackgroundJobs.Hangfire.HangfireJobExecutionAdapter`1.ExecuteAsync(String queue, TArgs args) at InvokeStub_TaskAwaiter.GetResult(Object, Object, IntPtr*) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

What would be nice to see exactly:

  • What modules should be included in what. For example, when should AbpBackgroundJobsHangfireModule be used vs AbpBackgroundJobsAbstractionsModule, when does it matter?
  • What projects need to reference what?
  • Where should the code for background jobs be in the default tiered example?
  • Where does IsJobExecutionEnabled need to set? In what module(s)?
  • Where should JobStorage.Current be set?
  • The documentation suggests using UseAbpHangfireDashboard but AFAIK, that's not available - though maybe that's because of where I'm using it? Seeing this in a working example would be nice.

In my example, the job is simply defined:

public class GenerateReportJob: AsyncBackgroundJob<GenerateReportJobArgs>, ITransientDependency
{}

[Serializable]
public class GenerateReportJobArgs
{
    public GeneratedReportType_Id GeneratedReportType_Id { get; set; }
    public GeneratedReport_Id Id { get; internal set; }
    public string StringParam { get; set; }
    public ReportTaskType TaskTypeId { get; set; } // will be enum, likely report and score_card
    public User_Id UserId { get; set; }
    public int TenantId { get; set; }
}

Shared now with shiwei.liang@volosoft.com

I imagine there would need to be one of these per each (light, dark, dim)?

Question

We're having a hard time upgrading from v7.0.3 to v7.4.0 and from the looks of it, it's related to this dynamic proxy. We really want to keep using the dynamic proxy for the time being, as it's just one less step - but even generating the static proxy I continue to get errors.

  • ABP Framework version: v7.4.0
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
Volo.Abp.AbpException: Could not found remote action for method: System.Threading.Tasks.Task`1[CabMD.BillingAgents.BillingAgent_Id] GetCurrentBillingAgentAsync(System.Threading.CancellationToken) on the URL: https://localhost:44326/
   at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetActionApiDescriptionModel(IAbpMethodInvocation invocation)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at CabMD.Web.Pages.IndexModel.OnGet() in D:\Projects\CabMD15\aspnet-core\src\CabMD.Web\Pages\Index.cshtml.cs:line 72
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.NonGenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at CabMD.UsefulExtensions.<>c.<<UseNoSniffHeaders>b__0_0>d.MoveNext() in D:\Projects\CabMD15\aspnet-core\src\CabMD.HttpApi\CabMDHttpApiModule.cs:line 72
--- End of stack trace from previous location ---
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 103
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Everything has been working great generally. Upgrading v7.0.3 to v7.4.0 hasn't been going well though I feel like we're getting close. For example, I had to reconcile a number of package issues on the AuthServer just to get it to actually run (no errors, nothing being logged, but definitely not working).

I've sent the invite, sorry - I thought it was an invite link, but I had to invite that email directly - if that won't work just let me know (reply to email) and I'll send a direct invite.

To provide context for the task at hand, we are working on a project that utilizes the LeptonX theme and incorporates Telerik's Kendo UI components. While LeptonX offers a great UI experience, the Telerik Kendo components are not visually aligned with this theme out-of-the-box. To bridge this gap, we are looking to use Telerik's ThemeBuilder application. ThemeBuilder is designed to customize the visual appearance of Telerik and Kendo UI web components. It features an intuitive UI, allowing us to manipulate colors, border-radius, typography, and other appearance-related properties. The end goal is to generate a theme as an npm package containing ready-to-use Sass and CSS that integrates seamlessly with the LeptonX theme.

The challenge we're facing is twofold:

  • The customization in ThemeBuilder needs to be precisely done so that the resulting Kendo UI elements blend seamlessly into the LeptonX environment.
  • After generating the customized theme package, it has to be integrated into our existing project architecture that utilizes abp.io. This includes resolving any conflicts and ensuring that the custom theme does not break or interfere with existing styles or functionalities.

Our aim is to ensure that the Kendo UI components, once styled through ThemeBuilder, work cohesively within the LeptonX theme without causing any visual or functional discrepancies. We require expert assistance from abp.io staff for guidance on how best to integrate the npm package generated by ThemeBuilder into our abp.io-based application, including any nuances or best practices that we should be aware of. This integration will likely involve configuration changes in abp.io as well as adjustments to our build process to accommodate the new Sass and CSS files.

Your expertise in abp.io will be crucial for the successful completion of this task, particularly in ensuring a smooth integration that is maintainable and updateable in the long term.

We're utilizing LeptonX (which we love) and we're integrating Telerik Kendo but we're having a hard time aligning the styling of Kendo to LeptonX. We're wondering if it's possible if we share the "theme" (from https://themebuilderapp.telerik.com/) that we're customizing and have someone from your team assist.

If that's possible, we can send an invite link to an email address of someone on your team.

Answer

Trying to create the sample issue here: https://github.com/kfrancis/net8-maui-autofac-repro

MauiApp1 is just a simple maui app, that was net7.0 with autofac (not abp) and was working. Then upgraded to net8 preview 6 and it still works.

MauiApp2 is the same, but I suspect the issue comes into play with abp autofac so I'm trying to prepare a simple example of that.

Question

I know that net8 is still in preview, but I thought I'd ask in case someone in the MAUI subteam might have dealt with this yet:

  • Have net7.0 MAUI abp app
  • Try upgrading to net8 preview (currently 6)
  • Run

Expected: App should run Actual: Crash related to DI

Autofac.Core.DependencyResolutionException
  Message=An exception was thrown while activating λ:Microsoft.Maui.IMauiHandlersFactory.
  Source=Autofac
  StackTrace:
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0()
   at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func`1 creator)
   at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable`1 qualifyingId, Func`1 creator)
   at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.ScopeSelectionMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request)
   at Autofac.Core.Container.ResolveComponent(ResolveRequest request)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType)
   at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetService(Type serviceType)
   at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 68
   at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 68
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[IMauiHandlersFactory](IServiceProvider provider)
   at Microsoft.Maui.MauiContext.&lt;.ctor&gt;b__6_0() in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 27
   at System.Lazy`1[[Microsoft.Maui.IMauiHandlersFactory, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1[[Microsoft.Maui.IMauiHandlersFactory, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1[[Microsoft.Maui.IMauiHandlersFactory, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].CreateValue()
   at System.Lazy`1[[Microsoft.Maui.IMauiHandlersFactory, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].get_Value()
   at Microsoft.Maui.MauiContext.get_Handlers() in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 35
   at Microsoft.Maui.Platform.ElementExtensions.SetHandler(Context nativeElement, IElement element, IMauiContext context) in D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:line 149
   at Microsoft.Maui.Platform.ElementExtensions.SetApplicationHandler(Application platformApplication, IApplication application, IMauiContext context) in D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:line 163
   at Microsoft.Maui.MauiApplication.OnCreate() in D:\a\_work\1\s\src\Core\src\Platform\Android\MauiApplication.cs:line 39
   at Android.App.Application.n_OnCreate(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.App.Application.cs:line 1086
   at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22

Just in case others find this thread, the issue for us was that we still had some packages from before our Lepton to LeptonX migration - Volo.Abp.LeptonTheme.*. Once we removed those six packages, it started working normally.

Showing 11 to 20 of 56 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11