Activities of "Tony_Albutt"

Hi

I get IsJobExecutionEnable = false

?context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>().Value.IsJobExecutionEnabled false

The only place that options.IsJobExecutionEnabled = false ; is in the DbMigratorModule

I changed that to true, which did not remedy the problem

So to fix this, I added the following to my ApplicationModule

    Configure<AbpBackgroundJobOptions>(options =>
    {
        options.IsJobExecutionEnabled = true;
    });

Now the backgroundJobs jobs are running

Somehow the default is disabled, when upgrading to version 7 and 8

It would be best to note this, or investigate further.

Best regards Tony

Thanks

I will add a BackgroundJobWorker to the domain module.

I will let you know how it goes 👍

Regards Tony

Hi

I have enabled NuGet.org Symbol. I have disabled Disable Just My Code for debugging. I have verified Source Link support is checked.

Cool 👍 Now how do I get Volo.Abp.BackgroundJobs to run, so that I can debug?

Thanks and regards Tony

Thanks liangshiwei

I will look at the github link and se what I can do.

Thanks and regards Tony

  • ABP Framework version: upgraded from v6.0.3 to 7.4.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • **Tiered (for MVC) no
  • Exception message and full stack trace: None - no errors in the log files
  • Steps to reproduce the issue: Background jobs not been triggered after upgrading to version 7.4.2

Hi

When I upgraded form version 6.0.3 to 7.4.2, my background jobs are no longer been run None of the 20 ExecuteAsync methods are been triggered. I have 3 user modules with background Jobs. I removed the three modules to see if this may cause issues with the version 7 and 8 updates. This did not resolve any issues.

No log errors and no warnings logged.

This problem is on the development environment and the Live test server.

Has there been any changes, or encasements, for the default implementation for Background Jobs? None of my 20 background jobs are been run after the upgrade. The ExecuteAsync methods are never called.

From the database table AbpBackgroundJobs, none of the LastTryTime fields are populated,0 nor the TryCounts are updated.

JobName = RequerstToBook JobArgs = (Correct json data has been filled) TryCount =0 NextTryTime = correct data and time (earlier today) LastTryTime = NULL IsAbandoned = 0 Priority = 15

This one of my job arguments

    [BackgroundJobName("RequerstToBook")]
    public class RequestToBookArgs
    {
        public string TenantName { get; set; }
        public Guid TenantId { get; set; }
        public Guid UserId { get; set; }
        public string UserName { get; set; }
        public Guid TravelRequestId { get; set; }
        public Guid SupplierId { get; set; }
        public Guid SupplierContactId { get; set; }
        public Guid QuoteId { get; set; }
        public List<Guid> LineItems { get; set; }
        public string NoteToTMC { get; set; }
    }

and this is the background job

public class RequestToBookJob : AsyncBackgroundJob<RequestToBookArgs>, ITransientDependency
{
    private readonly IRequestForQuotesAppService _requestForQuotesAppService;
    private readonly IEmailSender _emailSender;
    private readonly ICurrentTenant _currentTenant;
    private readonly IMailBotAppService _mailBotAppService;

    public RequestToBookJob(
        IEmailSender emailSender,
        ICurrentTenant currentTenant,
        IMailBotAppService mailBotAppService,
        IRequestForQuotesAppService requestForQuotesAppService)
    {
        _emailSender = emailSender;
        _currentTenant = currentTenant;
        _mailBotAppService = mailBotAppService;
        _requestForQuotesAppService = requestForQuotesAppService;
    }

    public override async Task ExecuteAsync(RequestToBookArgs args)
    {
        var watch = new System.Diagnostics.Stopwatch();
        watch.Start();
        var Comment = await ProcessRequestToBookAsync(args);
        watch.Stop();
    }

    private async Task<string> ProcessRequestToBookAsync(RequestToBookArgs args)
    {
        var result = await _requestForQuotesAppService.GenerateRequestToBook(args);
        return result;
    }
}

I have now added a AbpBackgroundJobWorkerOptions to me ApplicationModule. this did not resolve the issue

            Configure<AbpBackgroundJobWorkerOptions>(options =>
            {
                options.DefaultTimeout = 3600; 
            });

in ApplicationNameTestBaseModule : AbpModule

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpBackgroundJobOptions>(options =>
        {
            options.IsJobExecutionEnabled = false;
        });

        context.Services.AddAlwaysAllowAuthorization();
    }

I have now updated to version 8.0.2 to see if this fixes the issue, and still no change.

I then created a ne app and added one Background job for testing. BackgroundsJods run in this app.

I compared all library referenced and don't see ant differences between the two applications. Core and new code associated to background Jobs.

How can I see if the background service is querying the database?

How can I resolve this issue?

Thanks and regards Tony

Hi

I have edited all .suite\entity files, and replacing all EnumValues : null values and replaced with numeric values.

To fix the problem In ABP Suite web UI, where the entity dropdown list was not loading, I had to then remove the project from ABP Suite, shut it down, reload and then re-add as an existing project.

I can now open the project within ABP Suite.

Could you please reverse the Question asked deduction, and credit my count as this was an ABP Suite problem :)

All the best

Regards Tony

Hi

Last night I have found the problem.

I moved all files from the folder .suite/entities. I can then open the application using ABP Suite. I have 99 entities. I started moving the files back 10 at a time. I eventually found one that caused the error.

I then removed all others and left the first entity file causing the error. That entity has 10 properties. Removing them all allowed ABP Suite to open the project.

Then adding the entities back one by one, I found that a property with Type 'enum' was causing the problem.

I created a new project using version 7.4.2 Created an enum within the new project. I then added an entity with a enum property

I compared the two and found the problem

When I created the entities using ABP Suite between version 3 and 6, this is what the entity property EnumValues are

"EnumValues": { "Delivery": null, "Physical": null, "Postal": null },

When I change them and change the null to valid values as below, it works

"EnumValues": { "Delivery": 0, "Physical": 1, "Postal": 2 },

So, all I have to do is open all 99 entities, and lookup the valid Entity Values and update all the files, it should work. You may want to change the ABP Suite code to allow for null as an enum entity value

There are still more issues. I will update once identified. In ABP Suite web UI, the entity dropdown list is still not loading

Thanks and regards Tony

To fix this error, I had to Roll back all Volo. packaged to 7.4.2


[11:29:54 INF] Starting web host. [11:30:15 FTL] Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule, Volo.Abp.Identity.EntityFrameworkCore, Version=7.4.2.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.TypeLoadException: Method 'GetRolesAsync' in type 'Volo.Abp.Identity.EntityFrameworkCore.EfCoreOrganizationUnitRepository' from assembly 'Volo.Abp.Identity.EntityFrameworkCore, Version=7.4.2.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. at Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule.<>c.<ConfigureServices>b__0_0(IAbpDbContextRegistrationOptionsBuilder options) at Microsoft.Extensions.DependencyInjection.AbpEfCoreServiceCollectionExtensions.AddAbpDbContext[TDbContext](IServiceCollection services, Action1 optionsBuilder) at Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule.ConfigureServices(ServiceConfigurationContext context) at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action1 optionsAction) at ITX.Web.Program.Main(String[] args) in F:\ITX_New\src\ITX.Web\Program.cs:line 37

  • ABP Framework version: v6.0.3 to 7.4.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have updated my project from version 6.0.3 to 7.4.2 I used the "Update all ABP packages" option using ABP Suite

Once I got the application to compile and made the recommended migration changes, and add-migrations, I can now compile and run the application Two problems that I need to resolve, before I can see what else is broken.

  1. After the update, I can no longer use the ABP Suite to open the project to add new entities. The UI error is "An internal error occurred during your request!" From the Terminal window, this is the error response `PS C:\Users\antho> abp suite ABP CLI 7.4.2 Starting Suite v7.4.2 ... Opening http://localhost:3000 Press Ctrl+C to shut down. [09:52:54 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

[09:52:54 ERR] Error converting value {null} to type 'System.Int32'. Path 'Properties[1].EnumValues.Delivery', line 61, position 24. Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Int32'. Path 'Properties[1].EnumValues.Delivery', line 61, position 24. ---> System.InvalidCastException: Null object cannot be converted to a value type. at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) --- End of inner exception stack trace --- at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType) at Volo.Abp.Suite.Services.PersistanceService.VU1gjyYmMA(String ) at System.Linq.Enumerable.SelectIPartitionIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at Volo.Abp.Suite.Services.PersistanceService.GetEntitiesAsync(Guid solutionId) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync(Guid solutionId) at lambda_method1814(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.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

  1. The Data Tables do not render correctly.

Note: I have the LeptonX as a module in the project. When I remove it, and reference Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX" Version="2.4.-" then the DataTable works again. I will have to move all my code changes, until ABP suite works again

What can I do to get my application and ABP Suite working again.

Thanks and regards Tony

This is another one that is missing - from log files.

"message": "Cannot read the template Volo.Abp.Commercial.SuiteTemplates.Templates.Frontend.Mvc.Page.Partials.index.js.FilteringFields_Excel.txt"

"message": "Cannot read the template Volo.Abp.Commercial.SuiteTemplates.Templates.Server.AppService.Partials.AppService_ExcelMethodInterface.txt"

Showing 1 to 10 of 52 entries
Made with ❤️ on ABP v9.0.0-preview Updated on July 18, 2024, 06:07