Starts in:
2 DAYS
6 HRS
14 MIN
10 SEC
Starts in:
2 D
6 H
14 M
10 S
Open Closed

ABP Suite and MVC Data Table not working after upgrading from version 6.0.3 to 7.4.2 #6293


User avatar
0
Tony_Albutt created
  • 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.<InvokeActionMethodAsync>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


6 Answer(s)
  • User Avatar
    0
    Tony_Albutt created

    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

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Can you share a test project? I will check it.

    my email is shiwei.liang@volosoft.com

  • User Avatar
    0
    Tony_Albutt created

    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

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Great to head it. : )

  • User Avatar
    0
    Tony_Albutt created

    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

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Sure

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06