Open Closed

Abp Suite error on generating new Entities v. 5.3.0 #3328


User avatar
0
besquare created
  • ABP Framework version: v5.3.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no (Identity integrated)
  • Exception message and stack trace:

[10:34:36 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

[10:34:36 ERR] StartIndex cannot be less than zero. (Parameter 'startIndex') System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. (Parameter 'startIndex') at System.String.Substring(Int32 startIndex, Int32 length) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.ByZHdBwGMk(Boolean , String , String ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.qu6HxKnaPR(Boolean ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.vAiHC7P35n() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.ExecuteAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.CommandManager.ExecuteAllAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.CrudPageGenerator.GenerateAsync(EntityModel entity, Solution solution) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync(Guid solutionId, EntityModel entity) at lambda_method1792(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(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.

  • Steps to reproduce the issue:" Generate a new Entity. Working on OSX not working on Windows 10

11 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @besquare,

    We're checking the issue.

  • User Avatar
    0
    besquare created

    Hi @besquare,

    We're checking the issue.

    Hi @yekalkan, there's any update on this? Because on Windows 10 we're unable to generate any new Entity.

    Also i've found an issue when upgrading project modules from 5.2.0 to 5.3.0 where a reference 'Volo.Payment.EntityFrameworkCore' was wrongly added to {ProjectName}DBContext.cs into EntityFramework project. We're not using any Payment and ConfigurePayments() fail during build.

    Thanks.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi again @besquare,

    I couldn't reproduce the issue. Can you share the *DbContext.cs file with us? You can send it to support@abp.io mail address.

    Also i've found an issue when upgrading project modules from 5.2.0 to 5.3.0 where a reference 'Volo.Payment.EntityFrameworkCore' was wrongly added to {ProjectName}DBContext.cs into EntityFramework project. We're not using any Payment and ConfigurePayments() fail during build.

    Do you use Payment module in your solution? Also, how did you upgrade the solution?

  • User Avatar
    0
    besquare created

    Hi again @besquare,

    I couldn't reproduce the issue. Can you share the *DbContext.cs file with us? You can send it to support@abp.io mail address.

    Also i've found an issue when upgrading project modules from 5.2.0 to 5.3.0 where a reference 'Volo.Payment.EntityFrameworkCore' was wrongly added to {ProjectName}DBContext.cs into EntityFramework project. We're not using any Payment and ConfigurePayments() fail during build.

    Do you use Payment module in your solution? Also, how did you upgrade the solution?

    Hi @yekalkan,

    No payment module in not added in our solution but after upgrade from 5.2.0 to 5.3.0 using abi suite the module are added automatically into EntityFramework Project.

    I've commented out. Bug is reported also if i'm trying to update both from OSX or Windows.

    Issue is still not resolved. We're totally stucked into add new Entities.

    There's any workaround i can try?

    I think the tool is some quite unstable. Sometime create entity only on .NET Core but not on Angular.

    Now we've setup from scratch a Windows 10 Development machine with Visual Studio 2022 and NodeJs npm v 8.5.5 node v 16.15.0

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @besquare,

    The lines related with Payment module is not added by ABP Suite. 5.2.0 template already have them. But in 5.3.0 version these lines are removed because the template no longer depends on Payment module.

    Actually the Saas module no longer depends on the Payment module in 5.3.0 version. So after the ABP Suite updated the dependencies, Payment dependency is lost. That is the issue you are facing.

    Check the migration guide: https://docs.abp.io/en/commercial/latest/migration-guides/v5_3

  • User Avatar
    0
    besquare created

    Hi @besquare,

    The lines related with Payment module is not added by ABP Suite. 5.2.0 template already have them. But in 5.3.0 version these lines are removed because the template no longer depends on Payment module.

    Actually the Saas module no longer depends on the Payment module in 5.3.0 version. So after the ABP Suite updated the dependencies, Payment dependency is lost. That is the issue you are facing.

    Check the migration guide: https://docs.abp.io/en/commercial/latest/migration-guides/v5_3

    Ok thanks you cleared the question about migration, but what about the abp suite for Entity generator? Why is not more working?

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    @besquare

    In the previous reply i asked you to share the *DbContext.cs file with us.

    I couldn't reproduce the issue. Can you share the *DbContext.cs file with us? You can send it to support@abp.io mail address.

    I suspect it is related with file character encoding (utf-8, ascii, unicode etc.). But i can't be sure unless i check the original file.

  • User Avatar
    0
    besquare created

    @besquare

    In the previous reply i asked you to share the *DbContext.cs file with us.

    I couldn't reproduce the issue. Can you share the *DbContext.cs file with us? You can send it to support@abp.io mail address.

    I suspect it is related with file character encoding (utf-8, ascii, unicode etc.). But i can't be sure unless i check the original file.

    Hi sent email with DbContext.cs

  • User Avatar
    0
    alper created
    Support Team Director

    thank you we got your dbcontext file and respond you asap.

  • User Avatar
    0
    besquare created

    thank you we got your dbcontext file and respond you asap.

    Any update or workaround to resolve this? We're stucked on project from about a week.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    @besquare

    I created a project with the same name, then replaced the DbContext file with the one you sent. Then i generated an entity via ABP Suite and it worked as expected. No error occurred. (Windows 10)

    I can suggest these:

    • Remove the project from ABP Suite, and add again. (Windows 10)
    • Check if there is any other file that ends with *DbContext.cs postfix. If so, please send it to us.
    • Continue using ABP Suite on OSX until we find a solution to this problem.
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11