Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown using HttpClient with handler #792

Closed
jskeet opened this issue Feb 20, 2017 · 2 comments
Closed

Exception thrown using HttpClient with handler #792

jskeet opened this issue Feb 20, 2017 · 2 comments
Assignees
Labels
api: cloudtrace Issues related to the Cloud Trace API.

Comments

@jskeet
Copy link
Collaborator

jskeet commented Feb 20, 2017

I have an HttpClient which is meant to propagate trace information:

var handler = TraceHeaderPropagatingHandler.Create(tracer);
httpClient = new HttpClient(handler);

Unfortunately when I call GetStringAsync I get an exception:

System.InvalidOperationException occurred
  HResult=-2146233079
  Message=The inner handler has not been assigned.
  Source=System.Net.Http
  StackTrace:
       at System.Net.Http.DelegatingHandler.SetOperationStarted()
       at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
       at Google.Cloud.Diagnostics.Common.TraceHeaderPropagatingHandler.<SendAsync>d__3.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Net.Http.HttpClient.<GetContentAsync>d__32`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at Google.NextTalk.Web.Backends.JsonBackend.<GetLanguagesAsync>d__6.MoveNext() in
@jskeet jskeet added the api: cloudtrace Issues related to the Cloud Trace API. label Feb 20, 2017
@jskeet
Copy link
Collaborator Author

jskeet commented Feb 20, 2017

Hmm... the same code in an integration test is fine. I'm very confused at this point.

@jskeet
Copy link
Collaborator Author

jskeet commented Feb 20, 2017

Aha - it was fixed in 7e0191e.
New release should sort it :)

@jskeet jskeet closed this as completed Feb 21, 2017
gcf-owl-bot bot added a commit that referenced this issue Apr 6, 2023
Note: manually updated proto file, but it yields the same result of the new disco-converter would generate.

Fixes: googleapis/google-cloud-go#7345
Source-Link: googleapis/googleapis@59828ba

Source-Link: googleapis/googleapis-gen@2649582
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9
gcf-owl-bot bot added a commit that referenced this issue Apr 6, 2023
Note: manually updated proto file, but it yields the same result of the new disco-converter would generate.

Fixes: googleapis/google-cloud-go#7345
Source-Link: googleapis/googleapis@59828ba

Source-Link: googleapis/googleapis-gen@2649582
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9
gcf-owl-bot bot added a commit that referenced this issue Apr 6, 2023
Note: manually updated proto file, but it yields the same result of the new disco-converter would generate.

Fixes: googleapis/google-cloud-go#7345
Source-Link: googleapis/googleapis@59828ba

Source-Link: googleapis/googleapis-gen@2649582
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9
jskeet pushed a commit that referenced this issue Apr 7, 2023
Note: manually updated proto file, but it yields the same result of the new disco-converter would generate.

Fixes: googleapis/google-cloud-go#7345
Source-Link: googleapis/googleapis@59828ba

Source-Link: googleapis/googleapis-gen@2649582
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the Cloud Trace API.
Projects
None yet
Development

No branches or pull requests

2 participants