AndresRamos / ARSoftware.Contpaqi.Comercial.Api

API que te permite hacer interfaz con el sistema de CONTPAQi Comercial a travez de un servicio web en la nube.
https://www.arsoft.net/contpaqi-comercial-api
11 stars 2 forks source link

El sincronizador se cierra al intentarlo abrir, y el log arroja este error #91

Closed JuliusLancelot closed 9 months ago

JuliusLancelot commented 9 months ago

2024-02-03 13:22:13.311 -07:00 [FTL] Critical error occurred. System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Api.Sync.Infrastructure.ContpaqiComercialApi.ContpaqiComercialApiService.SendResponseAsync(Guid apiRequestId, ApiResponse apiResponse, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Infrastructure\ContpaqiComercialApi\ContpaqiComercialApiService.cs:line 49 at Api.Sync.Core.Application.Api.Commands.SendApiResponse.SendApiResponseCommandHandler.Handle(SendApiResponseCommand request, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Api\Commands\SendApiResponse\SendApiResponseCommand.cs:line 20 at MediatR.Wrappers.RequestHandlerWrapperImpl1.<>c__DisplayClass1_0.<<Handle>g__Handler|0>d.MoveNext() --- End of stack trace from previous location --- at Api.Sync.Core.Application.Common.Behaviours.ValidationBehaviour2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Common\Behaviours\ValidationBehaviour.cs:line 30 at Api.Sync.Core.Application.Common.Behaviours.PerformanceBehaviour2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Common\Behaviours\PerformanceBehaviour.cs:line 23 at MediatR.Pipeline.RequestPreProcessorBehavior2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken cancellationToken) at Api.Sync.Core.Application.Api.Commands.ProcessApiRequest.ProcessApiRequestCommandHandler.Handle(ProcessApiRequestCommand request, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Api\Commands\ProcessApiRequest\ProcessApiRequestCommand.cs:line 43 at MediatR.Wrappers.RequestHandlerWrapperImpl1.<>c__DisplayClass1_0.<g__Handler|0>d.MoveNext() --- End of stack trace from previous location --- at Api.Sync.Core.Application.Common.Behaviours.ValidationBehaviour2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Common\Behaviours\ValidationBehaviour.cs:line 30 at Api.Sync.Core.Application.Common.Behaviours.PerformanceBehaviour2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Common\Behaviours\PerformanceBehaviour.cs:line 23 at MediatR.Pipeline.RequestPreProcessorBehavior2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken cancellationToken) at Api.Sync.Presentation.WorkerService.Worker.DoWork(CancellationToken stoppingToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Presentation.WorkerService\Worker.cs:line 111 2024-02-03 13:22:13.328 -07:00 [INF] Application is shutting down...

AndresRamos commented 9 months ago

Cuál fue la última solicitud que enviaste? Está mandando un error al mandar la respuesta a la API. Tal vez la respuesta es muy larga o el servicio por alguna razón no puedo procesar tu respuesta.

Te sigue apareciendo este error?

JuliusLancelot commented 9 months ago

No estoy seguro de cuál sea la última solicitud, esto es lo que dice:


2024-02-06 09:19:05.803 -07:00 [INF] API Sync Request: IniciarSdkCommand 
2024-02-06 09:19:08.182 -07:00 [INF] Iniciando conexión con SignalR.
2024-02-06 09:19:08.247 -07:00 [INF] Application started. Press Ctrl+C to shut down.
2024-02-06 09:19:08.248 -07:00 [INF] Hosting environment: Production
2024-02-06 09:19:08.249 -07:00 [INF] Content root path: C:\Users\admin\Desktop\WorkerService
2024-02-06 09:19:25.344 -07:00 [INF] Procesando solicitudes pendientes.
2024-02-06 09:19:25.349 -07:00 [INF] API Sync Request: GetPendingRequestsQuery 
2024-02-06 09:19:38.687 -07:00 [INF] Get pending requests notification received: GetPendingRequestsMessage { SubscriptionKey = XXX, EmpresaRfc = XXX }
2024-02-06 09:20:02.170 -07:00 [INF] Get pending requests notification received: GetPendingRequestsMessage { SubscriptionKey = XXX, EmpresaRfc = XXX }
2024-02-06 09:20:08.796 -07:00 [FTL] Critical error occurred.
System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Api.Sync.Infrastructure.ContpaqiComercialApi.ContpaqiComercialApiService.GetPendingRequestsAsync(CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Infrastructure\ContpaqiComercialApi\ContpaqiComercialApiService.cs:line 27
   at Api.Sync.Core.Application.Api.Queries.GetPendingApiRequests.GetPendingRequestsQueryHandler.Handle(GetPendingRequestsQuery request, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Api\Queries\GetPendingApiRequests\GetPendingApiRequestsQuery.cs:line 20
   at Api.Sync.Core.Application.Common.Behaviours.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Common\Behaviours\ValidationBehaviour.cs:line 30
   at Api.Sync.Core.Application.Common.Behaviours.PerformanceBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Core.Application\Common\Behaviours\PerformanceBehaviour.cs:line 23
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)
   at Api.Sync.Presentation.WorkerService.Worker.DoWork(CancellationToken stoppingToken) in C:\Users\gerar\source\repos\ARSoftware.Contpaqi.Comercial.Api\src\Api.Sync.Presentation.WorkerService\Worker.cs:line 97
2024-02-06 09:20:08.807 -07:00 [INF] Application is shutting down...
2024-02-06 09:26:16.866 -07:00 [INF] API Sync Request: IniciarSdkCommand 
JuliusLancelot commented 9 months ago

Ya está sincronizando!