Open Closed

Error when creating entity on module using abp - suite #6392


User avatar
0
mathias created
  • ABP Framework version: v8.0.0
  • UI Type: MVC
  • Database System: EF Core (PostgreSQL) /
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: [18:29:28 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

[18:29:28 ERR] Value cannot be null. (Parameter 'path1') System.ArgumentNullException: Value cannot be null. (Parameter 'path1') at System.ArgumentNullException.Throw(String paramName) at System.IO.Path.Combine(String path1, String path2, String path3) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.Vk4oNionvi(String , String , Boolean ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.DtJofJ6F8m(String , Boolean , Nullable1 ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.jdSoICrLHE() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.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, EntityModel masterEntity) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync(Guid solutionId, EntityModel entity) at lambda_method1922(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.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.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

  • Steps to reproduce the issue:

Add a mvc solution using abp suite. Then add a module to the solution. After adding a module through abo suite add a new entity with and select backend

Click on save and generate it fails

This does not happen on main aplications only on modules


7 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, I could successfully generate CRUD pages for the module-pro template as can be seen below:

    We are not providing, database-provider selection for the module-pro template but as far as I see, you have specified that you are using PostgreSQL as the database provider:

    Probably you have switched the database provider manually in the solution and now trying to generate CRUD pages, right? Can you confirm? If so, ABP Suite can not know your database provider and might not generate code according to that, and unfortunately, there is nothing we can do, because the solution is modified.

  • User Avatar
    0
    mathias created

    Hi,

    Ai Created a default aplication that is mvc and postgres entity framework. Then in suite selected my mvc aplication and click on modules

    After the module creation went to my new module through suite and try to create an entity. When selected generated backen it shows the error above.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi,

    Ai Created a default aplication that is mvc and postgres entity framework. Then in suite selected my mvc aplication and click on modules

    After the module creation went to my new module through suite and try to create an entity. When selected generated backen it shows the error above.

    Thanks for the explanation. I'll test this and write you back asap.

  • User Avatar
    0
    mathias created

    Hi, any updates on this?

  • User Avatar
    0
    eric.uhe@validationinstitute.com created

    Chiming in because this is a showstopper if you want to use the Suite workflow that adds a module directly to your project. Stopped working immediately upon upgrade of project, cli, and suite to 8.0.0 from 7.4.x.

    Details:

    • In Suite: Create Blazor Server | EF SQL Server | LeptonX (SQL Server is local Docker image; Redis is local service.)

      • All UI with EF behave identically.
    • Build and run; login. Joy, it works.

    • Create entities in new project in Suite; make sure db is updated. Joy, it works.

    • In Suite: In the new project, click on Modules | Create New Module

      • Add to Solution/don't Add to Solution has no effect.
    • Verify 9 expected applications; build. Joy it works: module created.

    • In Suite, Add Existing Project; load the newly created module project.

    • In Suite, in module project, Create Entity of any kind; include Create Backend. No joy, it doesn't work: System.ArgumentNullException: Value cannot be null. (Parameter 'path1') at System.ArgumentNullException.Throw(String paramName) at System.IO.Path.Combine(String path1, String path2, String path3) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Helpers.IoHelper.CombineNamespacePaths(String rootDirectory, String entityNamespace, String fileName) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.Vk4oNionvi(String , String , Boolean ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.DtJofJ6F8m(String , Boolean , Nullable1 ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.jdSoICrLHE() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.RepositoryCommand.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, EntityModel masterEntity) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync(Guid solutionId, EntityModel entity) at lambda_method2058(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.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.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

    • It does, however, create

      • Domain: Entity/Extended; Repository interface and implementation
      • Domain.Shared: Consts
      • EntityFrameworkCore: Repository/Extended
    • Uncheck Create Backend: Completes but, obviously, without back end.

    • Verified that project entries in Suite appsettings.json are complete and correct.

  • User Avatar
    0
    emilio.emulet created

    any solution for this problem? cant create class with backend in module

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, sorry for the late response. I have identified the problem and fixed it. It will be included in v8.0.2, I'll let you know when it's released.

    Btw, your ticket is refunded. Best Regards.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11