Open Closed

Can't add service to microservice template from CLI #6959


User avatar
0
ugurturan created

Hi, I have created a microservice template and got it working as shown in documents. Now I am trying to create a service with this command in CLI "abp new AracService -t microservice-service-pro" and having an error. I have logged out and logged in as a basic solution try. Waiting your support. Thanks.

  • ABP Framework version: v8.0.5

  • UI Type: MVC

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no

  • Exception message and full stack trace: Error occured while downloading source-code from https://abp.io/api/download/template/ : StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers: { Date: Fri, 29 Mar 2024 10:49:01 GMT Transfer-Encoding: chunked Connection: keep-alive Cache-Control: no-cache,no-store Pragma: no-cache Set-Cookie: .AspNetCore.Antiforgery.-6OvtTX3HwI=CfDJ8G-tnCm3u9lKrhYtPHu2TLpp7c8mXG3OKcnfLs2uI7jsHX_0CkBOGXGVwmTqidH-TnI4ctRycKy2jswnqUQAihxW6Am5x7Qj0qVg7cU6Yg0AxnjrQIEjUkFFEcmBp133Ud9z60U_s7TF00L1z6-Xs54; path=/; samesite=strict; httponly Set-Cookie: XSRF-TOKEN=CfDJ8G-tnCm3u9lKrhYtPHu2TLoUek7AiiPxaawwu4Erb7Hn9d8qlFOe2zHOcrpUGcvxSAyfUnQYzCi8VJn8jl4riVO0USHwbHxIgqCuFCH0_AC9B8u2m7wc2fKB2bG7aCfGaC08IMYEZ1aoT5_0dtZjsKI; expires=Sat, 29 Mar 2025 10:49:01 GMT; path=/; secure; samesite=none Vary: Accept-Encoding Strict-Transport-Security: max-age=15724800; includeSubDomains X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN x-correlation-id: caad7cc656814862bc73e1e57888077e CF-Cache-Status: DYNAMIC Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=%2FUUPWawhEYXyUQwafXQkUGr67joWOJYE00%2FD%2Bta9XHRhUZ6IKYJ%2BkdgZW2yY2SIAULumLuPAAVl57uPYmpgnjrPG9%2FqfwkGXO%2FQG1eAt1Mdk2StekKRzvQ%3D%3D"}],"group":"cf-nel","max_age":604800} NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} Server: cloudflare CF-RAY: 86bf4a7a2d7d98a9-OTP Content-Type: text/html; charset=utf-8 Expires: -1 } '<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 0. '<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 0. System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 0. ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 1 | BytePositionInLine: 0. at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo1 jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at Volo.Abp.Json.SystemTextJson.AbpSystemTextJsonSerializer.Deserialize[T](String jsonString, Boolean camelCase) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Json.SystemTextJson\Volo\Abp\Json\SystemTextJson\AbpSystemTextJsonSerializer.cs:line 25 at Volo.Abp.Cli.ProjectBuilding.RemoteServiceExceptionHandler.GetAbpRemoteServiceErrorAsync(HttpResponseMessage responseMessage) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\RemoteServiceExceptionHandler.cs:line 52 at Volo.Abp.Cli.ProjectBuilding.RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(HttpResponseMessage responseMessage) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\RemoteServiceExceptionHandler.cs:line 38 at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.DownloadSourceCodeContentAsync(SourceCodeDownloadInputDto input) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 258 at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.GetAsync(String name, String type, String version, String templateSource, Boolean includePreReleases, Boolean skipCache) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 123 at Volo.Abp.Cli.ProjectBuilding.TemplateProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\TemplateProjectBuilder.cs:line 66 at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\NewCommand.cs:line 97 at Volo.Abp.Cli.CliService.RunInternalAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 169 at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 77

  • Steps to reproduce the issue:

  • Create a microservice template from abp-suite
  • use "abp new AracService -t microservice-service-pro" command at CLI as written in document.

3 Answer(s)
  • User Avatar
    0
    ugurturan created

    I had the same error when I tried to create a new Application Template from ABP Suite.

    Error occured while downloading source-code from https://abp.io/api/download/template/ : StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers: { Date: Fri, 29 Mar 2024 11:25:10 GMT Transfer-Encoding: chunked Connection: keep-alive Cache-Control: no-cache,no-store Pragma: no-cache Set-Cookie: .AspNetCore.Antiforgery.-6OvtTX3HwI=CfDJ8G-tnCm3u9lKrhYtPHu2TLqKn4JaiA__khLOShynDD4xEUGqBPHCQGLaEpScr0GDIljvAPhfxXTn--1EapBq67ge51O_LtK026U28aEE-3G_b21vXkY5QSPTyrfOpF0gscmf8e9j8c4OfvYvjUiW1Bk; path=/; samesite=strict; httponly Set-Cookie: XSRF-TOKEN=CfDJ8G-tnCm3u9lKrhYtPHu2TLoK3RFJe80sbnlDO3dOv2xgF3GP-ihyIiUQRvD11NNvyjG9JbymNNeWzmBM4wlBweg8pEMh_q4PYmEIlcJTl0wkb6CGDCSi_HjWdBzPoRiuIofvpsMHyEDMcxVKMcxAlok; expires=Sat, 29 Mar 2025 11:25:10 GMT; path=/; secure; samesite=none Vary: Accept-Encoding Strict-Transport-Security: max-age=15724800; includeSubDomains X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN x-correlation-id: 0ed08b75f9d143f3a371a2188ba1c489 CF-Cache-Status: DYNAMIC Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=d08GkGvwrqy44fmmM9MI6Ls%2F0yFyoJXLcj1gjxETWrDOysKh9yeQ7OBE6XuLPXuv2PGI3Fz%2FLL8maDCyMM%2BunZCDYGwwp%2BN7eW1kMMCTDuhfH7nteDgwWA%3D%3D"}],"group":"cf-nel","max_age":604800} NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} Server: cloudflare CF-RAY: 86bf7f6e2ef3b9ea-OTP Content-Type: text/html; charset=utf-8 Expires: -1 } '<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 0. [14:25:10 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It was an ABP.io problem and fixed now, could you try again?

  • User Avatar
    0
    ugurturan created

    It is working now. Thanks.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35