Fix 503 response not adding confirmation to queue to be retried
See original GitHub issueDescription
If you get a 503 response to OnCreateConfirmation
the confirmation is not created and therefore is not put in the queue for retries.
Steps to Reproduce
Unsure (can you Charles Proxy to rewrite the CreateConfirmation request to return status response code 503
Actual result:
See in the logs:
[4856:775:0808/110311.405988:INFO:redeem_token.cc(169)] OnCreateConfirmation
[4856:775:0808/110311.406032:INFO:redeem_token.cc(171)] URL Request Response:
[4856:775:0808/110311.406047:INFO:redeem_token.cc(172)] URL: https://ads-serve.brave.com/v1/confirmation/e1afb398-2be4-44b6-96fd-d55dd6e87ff3/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiZEJzU2QyZWpTQ1J0R09VV3UybXd3VHY4RTFDOXdqRmZiYUx6cTBzSTlBQT1cIixcImNyZWF0aXZlSW5zdGFuY2VJZFwiOlwiNTcwMTM4ZmYtMDU1OC00MWRjLTg3ZTQtNzk4M2EzZDk0MDQzXCIsXCJwYXlsb2FkXCI6e30sXCJ0eXBlXCI6XCJjbGlja1wifSIsInNpZ25hdHVyZSI6IktUSkRTeUpJQkE5SVNtSlBWTlByendMdHR3ZXEzZkF6ZGJaUENIazFLZytmZTVrOUFKSmJRMjZvdUY4eU1iMWxEMG9QZHl1TkxuYnl2YjcxNXdJWFdnPT0iLCJ0IjoiL05WYlpSOEVCMURNSnRWWHFiOTVPVGhwdHVqcFpqVnliako3Y3k1b2hXRnUvelpKVkhURzFLYm5WSTE2Z2YrWjM2Wi9mU0RGS1haV3dtOHFJcGZuU0E9PSJ9
[4856:775:0808/110311.406063:INFO:redeem_token.cc(173)] Response Status Code: 503
[4856:775:0808/110311.406077:INFO:redeem_token.cc(174)] Response:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>503 first byte timeout</title>
</head>
<body>
<h1>Error 503 first byte timeout</h1>
<p>first byte timeout</p>
<h3>Guru Mediation:</h3>
<p>Details: cache-ewr18139-EWR 1565276591 2658566784</p>
<hr>
<p>Varnish cache server</p>
</body>
</html>
[4856:775:0808/110311.406094:INFO:redeem_token.cc(175)] Headers:
[4856:775:0808/110311.406106:INFO:redeem_token.cc(177)] accept-ranges: bytes
[4856:775:0808/110311.406119:INFO:redeem_token.cc(177)] connection: close
[4856:775:0808/110311.406131:INFO:redeem_token.cc(177)] content-length: 449
[4856:775:0808/110311.406143:INFO:redeem_token.cc(177)] content-type: text/html; charset=utf-8
[4856:775:0808/110311.406155:INFO:redeem_token.cc(177)] date: Thu, 08 Aug 2019 15:03:11 GMT
[4856:775:0808/110311.406168:INFO:redeem_token.cc(177)] retry-after: 0
[4856:775:0808/110311.406180:INFO:redeem_token.cc(177)] server: Varnish
[4856:775:0808/110311.406192:INFO:redeem_token.cc(177)] via: 1.1 varnish
[4856:775:0808/110311.406204:INFO:redeem_token.cc(177)] x-cache: MISS
[4856:775:0808/110311.406216:INFO:redeem_token.cc(177)] x-cache-hits: 0
[4856:775:0808/110311.406228:INFO:redeem_token.cc(177)] x-served-by: cache-ewr18139-EWR
[4856:775:0808/110311.406241:ERROR:redeem_token.cc(181)] Failed to create confirmation
[4856:775:0808/110311.406260:WARNING:redeem_token.cc(429)] Failed to redeem e1afb398-2be4-44b6-96fd-d55dd6e87ff3 confirmation id with 570138ff-0558-41dc-87e4-7983a3d94043 creative instance id for click
Expected result:
no 503s, or if 503 does happen, put confirmation in failed queue for retries
Reproduces how often:
unsure
Brave version (brave://version info)
Brave | 0.70.48 Chromium: 76.0.3809.100 (Official Build) nightly (64-bit) |
---|---|
Revision | ed9d447d30203dc5069e540f05079e493fc1c132-refs/branch-heads/3809@{#990} |
OS | Mac OS X |
Version/Channel Information:
- Can you reproduce this issue with the current release? probably
- Can you reproduce this issue with the beta channel? probably
- Can you reproduce this issue with the dev channel? probably
- Can you reproduce this issue with the nightly channel? yes
Other Additional Information:
- Does the issue resolve itself when disabling Brave Shields?
- Does the issue resolve itself when disabling Brave Rewards?
- Is the issue reproducible on the latest version of Chrome?
Miscellaneous Information:
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
503 error: How to solve - SupportHost
Try reloading the page. Reloading the page is not really a solution. Since, however, the 503 error is often due to a temporary...
Read more >How to Fix 503 Service Unavailable Error: 7 Steps That Work
7 Steps to Find Root Cause and Resolve the 503 Error: · 1. Check Resource Usage · 2. Check for Ongoing Maintenance ·...
Read more >How to Fix the HTTP Error 503 Service Unavailable - Kinsta
The 503 error in WordPress signifies that your website can't be reached at the present moment because the server in question is unavailable....
Read more >503 Service Unavailable - Backend Server | Apigee Edge
A backend server is overloaded/busy and cannot handle any new requests. The backend server is down for a temporary period due to maintenance....
Read more >503 Service Unavailable Error Message: What It Is and How to ...
How to Fix the 503 Service Unavailable Error · Retry the URL from the address bar again by selecting Reload or Refresh, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GeetaSarvadnya This issue is not in 0.68, this issue has only been merged with nightly and dev. I have requested uplift but before this is potentially accepted we need to pass QA for nightly and dev.
Verification passed on
(Used Charles proxy to simulate 503 Response statuses)
Status_Response code
503 are recorded or queued in theConfirmation.json
fileView
,Click
,Dismiss
andLanded
are queued inConfirmation.json
fileAds notifications received
count andEstimated pending rewards
BAT updated properly ( I have viewed 2 ads and both ads data updated properly after retry)Verified passed with
Utilized Charles Proxy to emulate a 503 response to
createConfirmation
.onCreateConfirmation
was added to thefailed-confirmations
queue inconfirmations.json
to be retried.view
,click
,landed
, anddismiss
confirmation types.Verification passed on
Utilized Charles Proxy to emulate a 503 response to
createConfirmation
.onCreateConfirmation
was added to thefailed-confirmations
queue inconfirmations.json
to be retried.view
,click
,landed
, anddismiss
confirmation types.