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

[BUG] Azure core retry policy #1176

Closed
jiminwen-msft opened this issue Aug 18, 2022 · 1 comment · Fixed by #1180
Closed

[BUG] Azure core retry policy #1176

jiminwen-msft opened this issue Aug 18, 2022 · 1 comment · Fixed by #1180
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.

Comments

@jiminwen-msft
Copy link
Member

Describe the bug
Parent task with context: Task 2934101: [Android] requesting send message with no network, return no status code - Boards (visualstudio.com). I think the retry-policy library provided by azure-core needs to add checking for null response. Our clients are seeing NPE when the network is closed/poor. The reason is that there is no response in this situation, but retry-policy class still tries to get status code: azure-sdk-for-android/RetryPolicy.java at bd9aeea4b47c945943ca918c63a2d49015f66057 · Azure/azure-sdk-for-android (github.com).

Exception or Stack Trace
com.azure.android.core.http.policy.RetryPolicy.calculateRetryDelay(RetryPolicy.java:169)
com.azure.android.core.http.policy.RetryPolicy.retryIfRequired(RetryPolicy.java:129)
com.azure.android.core.http.policy.RetryPolicy.access$000(RetryPolicy.java:23)
com.azure.android.core.http.policy.RetryPolicy$1.onError(RetryPolicy.java:92)
com.azure.android.core.http.HttpPipelinePolicyChainImpl.completedError(HttpPipelinePolicyChainImpl.java:202)
com.azure.android.core.http.PolicyCompleter.completedError(PolicyCompleter.java:53)
com.azure.android.core.http.policy.CookiePolicy$1.onError(CookiePolicy.java:81)
com.azure.android.core.http.policy.CookiePolicy$1.onError(CookiePolicy.java:81)
com.azure.android.core.http.HttpPipelinePolicyChainImpl.completedError(HttpPipelinePolicyChainImpl.java:202)
com.azure.android.core.http.HttpPipelinePolicyChainImpl.completedError(HttpPipelinePolicyChainImpl.java:208)
com.azure.android.core.http.PolicyCompleter.completedError(PolicyCompleter.java:53)
com.azure.android.core.http.policy.HttpLoggingPolicy$1.onError(HttpLoggingPolicy.java:202)
...(Skipping a few lines)
...
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
java.lang.Thread.run(Thread.java:1012)

To Reproduce
Steps to reproduce the behavior:
Using chat SDK sample APP:

  1. Close the network
  2. Run chat sample APP
  3. Send new message using the APP

Code Snippet

Expected behavior
NPE being thrown

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: Android
  • IDE : Android Studio
  • Version of the Library used: azureCoreVersion = "1.0.0-beta.10"

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [Y ] Bug Description Added
  • [Y ] Repro Steps Added
  • [Y] Setup information Added
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 18, 2022
@vcolin7 vcolin7 self-assigned this Aug 25, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 25, 2022
@vcolin7 vcolin7 added the Client This issue points to a problem in the data-plane of the library. label Aug 25, 2022
@vcolin7
Copy link
Member

vcolin7 commented Aug 25, 2022

Hi @jiminwen-msft, I'm looking into this and should have a fix soon.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants