Ends in:
7 DAYS
16 HRS
17 MIN
33 SEC
Ends in:
7 D
16 H
17 M
33 S
Open Closed

Version Issues (Missing Templates) with ABP Suite after upgrading, after release of 6.0.0 #3813


User avatar
0
jeflux created

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

There are several reported issues of "Cannot read the template..." errors. I've read them, especially this solution: https://support.abp.io/QA/Questions/671

Missing Templates after Upgrade Issue We upgraded our microservice solution from 5.1 to 5.3.4 weeks ago. My colleague then created a new project fusing the Microservice Template and integrated it into our solution.

The following week, I attempted to create a new entity within an existing microservice project (which had recently been upgraded) and received various "Cannot read the template..." errors. I followed every proposed solution I could find such as deleting/reinstalling CLI/Suite, cleaning solutions. I even checked every possible file to confirm it was the correct version.

Within ABP Suite if you click on Templates at the top, you can see them. I was missing templates that my coworker had. We both had same CLI/Suite versions working off same git repos. He pulled the project I was working on and could add an entity without any Template errors.

What finally worked was this: I created a new Microservice Template project, built it, and then added an entity to that project. (This was a throw-away project.) This process appeared to introduce the new/changed 5.3.4 templates into ABP Suite. After that, I could generate code using ABP Suite for my microservice project that had been upgraded from 5.1. to 5.3.4. I did not see this process documented in my research, and I assume this was a workaround for a defect.

My other colleague needed to do work on the existing project and she had the exact same issue. I walked her through process of creating a dummy project as a means to get the right templates loaded. It worked, and she has successfully been working on the project that had been upgraded to 5.3.4 just this week.

Missing Templates after 6.0.0 Release Today, I attempted to work on the microservice project that my colleague created with 5.3.4 (referenced in above example). When I tried to add a new entity, I received a "Cannot read the template..." error. This seemed odd to me because it should've been using the same Templates as the project I successfully worked on last week as all our projects are 5.3.4.

I then attempted to create a new dummy project (as described above) in the hopes it would introduce the correct templates. However, ABP Suite created a 6.0.0 project even though I have 5.3.4 CLI/Suite installed. I appear to be unable to generate a new 5.3.4 project now.

So then I go to my other project that I had been working on last week and it is now also throwing template errors when I attempt to add an entity. I've re-tried the various solutions of reinstalling tools, removing build artifacts, etc. I cannot get the correct Templates to load again. As a result, all code generation tasks on existing projects will not complete successfully.

Additional information:

I asked my colleagues to check ABP Suite generation on their dev machines and both reported same issue (both on CLI/Suite v5.3.4).

One colleague found a workaround similar to what I described. Rough steps:

  1. Generate new microservice module solution - It generates 6.0.0 solution and entity creation will fail due to version mismatch.
  2. Modify appsettings.json file to change it to 5.3.4.
  3. Not sure exactly here, but here's what I did: code generation still didn't work. I stopped ABP Suite and restarted, though it reloaded project as 6.0.0, so I changed appsettings.json again to 5.3.4
  4. Generate new entity on new solution.
  5. Code generation immediately started working on existing 5.3.4 solutions

If we need to add another microservice module, I'm not sure what issues we'll run into by it generating 6.0.0 and us manually changing to 5.3.4 to be compatible with our existing platform until we upgrade everything to latest version (which we only do when we want to access new features).


4 Answer(s)
  • User Avatar
    0
    Tony_Albutt created

    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"

  • User Avatar
    0
    manuel42 created

    Same for me. We have tried to create a Angular application template v5.3.4 today for a new project and we got this error message: We have tried it with both (abp suite and the abp cli).

    [13:34:47 INF] Using cached template: app-pro, version: 6.0.0 [13:34:48 ERR] Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectBuilding.Templates.RemoveUnnecessaryPortsStep.RemoveUnnecessaryDbMigratorClients(ProjectBuildContext context) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Templates\RemoveUnnecessaryPortsStep.cs:line 56 at Volo.Abp.Cli.ProjectBuilding.Templates.RemoveUnnecessaryPortsStep.Execute(ProjectBuildContext context) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Templates\RemoveUnnecessaryPortsStep.cs:line 15 at Volo.Abp.Cli.ProjectBuilding.Building.ProjectBuildPipeline.Execute() in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Building\ProjectBuildPipeline.cs:line 19 at Volo.Abp.Cli.ProjectBuilding.TemplateProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\TemplateProjectBuilder.cs:line 120 at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\NewCommand.cs:line 74 at Volo.Abp.Cli.CliService.RunInternalAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 161 at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 69

  • User Avatar
    0
    paul.harriman created

    I am experiencing the same issue. I want to create a new angular, ef core solution for version 5.3.3. I uninstalled abp suite and abp cli to make sure I started out clean, then re-installed. I get the same issue.

    My real goal is to try and install LeptonX Lite. I tried doing it to an existing solution and I get error messages it requires angular 14.2. I do not believe 5.3.3 supports angular 14. I do not want to update my current solution to abp 6, at this time

    abp suite remove Open %USERPROFILE%.dotnet\tools directory, delete abp.exe. Then open .store folder and delete volo.abp.cli folder.

    dotnet tool install Volo.Abp.Cli -g --version 5.3.3 abp suite install --version 5.3.3

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

    [08:17:52 ERR] Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectBuilding.Templates.RemoveUnnecessaryPortsStep.RemoveUnnecessaryDbMigratorClients(ProjectBuildContext context) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Templates\RemoveUnnecessaryPortsStep.cs:line 56 at Volo.Abp.Cli.ProjectBuilding.Templates.RemoveUnnecessaryPortsStep.Execute(ProjectBuildContext context) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Templates\RemoveUnnecessaryPortsStep.cs:line 15 at Volo.Abp.Cli.ProjectBuilding.Building.ProjectBuildPipeline.Execute() in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Building\ProjectBuildPipeline.cs:line 19 at Volo.Abp.Cli.ProjectBuilding.TemplateProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\TemplateProjectBuilder.cs:line 120 at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\NewCommand.cs:line 73 at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SolutionService.CreateSolutionAsync(CreateSolutionModel input) at lambda_method1705(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.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.

    trying with just the cli, shows almost the same, except it mentions trying to use cached template for 6.0.0. This solution is for 5.3.3 abp new AbpLeptonX -t app -u angular --mobile none --database-provider ef -csf

    [08:57:40 INF] ABP CLI (https://abp.io) [08:57:40 INF] Version 5.3.3 (Stable) [08:57:41 WRN] ABP CLI has a newer stable version 6.0.0, please update to get the latest features and fixes. [08:57:41 WRN] [08:57:41 WRN] Update Command: [08:57:41 WRN] dotnet tool update -g Volo.Abp.Cli [08:57:41 WRN] [08:57:41 INF] Creating your project... [08:57:41 INF] Project name: AbpLeptonX [08:57:41 INF] Template: app [08:57:41 INF] Database provider: EntityFrameworkCore [08:57:41 INF] UI Framework: Angular [08:57:41 INF] Output folder: C:\Dev\AbpLeptonX [08:57:43 INF] Using cached template: app, version: 6.0.0 [08:57:44 ERR] Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectBuilding.Templates.RemoveUnnecessaryPortsStep.RemoveUnnecessaryDbMigratorClients(ProjectBuildContext context) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Templates\RemoveUnnecessaryPortsStep.cs:line 56 at Volo.Abp.Cli.ProjectBuilding.Templates.RemoveUnnecessaryPortsStep.Execute(ProjectBuildContext context) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Templates\RemoveUnnecessaryPortsStep.cs:line 15 at Volo.Abp.Cli.ProjectBuilding.Building.ProjectBuildPipeline.Execute() in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\Building\ProjectBuildPipeline.cs:line 19 at Volo.Abp.Cli.ProjectBuilding.TemplateProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\TemplateProjectBuilder.cs:line 120 at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\NewCommand.cs:line 73 at Volo.Abp.Cli.CliService.RunInternalAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 161 at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 69

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi,

    You need to upgrade your CLI & Suite if you are going to create a v6.0.0 project. Or use --version parameter to create a v.5.3.X project.

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