-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[BUG] "A task was canceled." When using the SuggestAsync method of the Search Client #45731
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
@christothes: Can you take a look? |
Hi @dersia -
How are you validating this? Is this a first chance exception under the debugger? |
Hi @dersia. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @christothes -
I just checked and it does not throw if I don't pass a cancellation token.
With the cancellation token it is reproduceable every time
This is exactly how I validated this |
Thanks @dersia - |
Hi @dersia. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @dersia, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Library name and version
Describe the bug
When using the
SuggestAsync
method of theSearchClient
withDefaultAzureCredentials
aSystem.Threading.Tasks.TaskCanceledException
is thrown.When looking at Exception-details I can see, that
IsCancellationRequested
is false for theCancellationToken
.After some search I came across this issue: #44817 and it describes the same behavior for the
KeyVaultClient
. And there is a fix for the issue: #44882 that was merged in 1.41.0 of Azure.Core.And the issue #45453 is asking for updating the reference in
Azure.Identity
to use 1.41.0 to solve the issue and version1.13.0-beta.1
ofAzure.Identity
is actually using1.41.0
ofAzure.Core
so I updated to these version. I also pinned myAzure.Core
version to1.42.0
.None of this helps, I am experiencing this issue with each of the Versions of
Azure.Core
.The more interesting thing about this is, that the
SearchAsync
method of theSearchClient
works just fine, even with version1.40.0
ofAzure.Core
, just theSuggestAsync
is throwing the Error.This is the Stacktrace:
Expected behavior
The
SearchClient.SuggestAsync()
completes without aSystem.Threading.Tasks.TaskCanceledException
Actual behavior
The
SearchClient.SuggestAsync()
throws aSystem.Threading.Tasks.TaskCanceledException
Reproduction Steps
Create a
SearchClient
usingDefaultAzureCredentials
and call theSuggestAsync
method on it.Environment
Because of
DefaultAzureCredentials
and using VS, my VS user is used to get the token.Version 17.12.0 Preview 1.0
The text was updated successfully, but these errors were encountered: