nightingale-rest-api-client icon indicating copy to clipboard operation
nightingale-rest-api-client copied to clipboard

An error occurred while sending the request. at System.Net.Http.HttpClientHandler.<SendAsync>d__113.MoveNext

Open kshyju opened this issue 3 years ago • 4 comments

I am getting an error when issuing a simple GET request. Here is the stack trace.

The same request works from ARC/Edge browser. FWIW, the endpoint returns 204 response.

image

An error occurred while sending the request. at System.Net.Http.HttpClientHandler.<SendAsync>d__113.MoveNext() + 0x361 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__62.MoveNext() + 0x316 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at Nightingale.Core.Client.NightingaleClient.<SendAsync>d__7.MoveNext() + 0x26f --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at Nightingale.Core.Services.RequestSender.<SendRequestAsync>d__5.MoveNext() + 0x156

kshyju avatar Mar 08 '21 00:03 kshyju

What's the request URL?

dpaulino avatar Apr 27 '21 02:04 dpaulino

http://localhost:5000/api/somelocalendpoint

kshyju avatar Apr 27 '21 05:04 kshyju

Have you tried this? https://github.com/jenius-apps/nightingale-rest-api-client/blob/master/docs/localhost.md

dpaulino avatar Apr 27 '21 05:04 dpaulino

I'm also getting same error. Here is my stack trace:

An error occurred while sending the request.
   at System.Net.Http.HttpClientHandler.<SendAsync>d__113.MoveNext() + 0x361
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__62.MoveNext() + 0x316
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at Nightingale.Core.Client.NightingaleClient.<SendAsync>d__7.MoveNext() + 0x26f
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at Nightingale.Core.Services.RequestSender.<SendRequestAsync>d__5.MoveNext() + 0x156

I found that this issue appearing for me, when I'm trying to make a request to disabled (not working) server.
After I start the server, I'm seeing an infinite spinner and then error above. Only application restart helps.

P.S. For sure I did required steps in https://github.com/jenius-apps/nightingale-rest-api-client/blob/master/docs/localhost.md

igor-klymenok avatar May 17 '21 12:05 igor-klymenok