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

Brave Ads are not shown after restarting the browser if the catalog fails to download and a previous bundle exists #10904

Closed
tmancey opened this issue Jul 24, 2020 · 2 comments

Comments

@tmancey
Copy link
Contributor

tmancey commented Jul 24, 2020

Description

Brave Ads are not shown after restarting the browser if the catalog fails to download and a previous bundle exists

Steps to Reproduce

  1. Wait for catalog to download
  2. Quit the browser
  3. Use Charles Proxy to return 404 not found for the /v3/catalog endpoint
  4. Launch the browser
  5. Show an ad notification

Actual result:

Ad notification is not shown

Expected result:

Ad notification should be shown from the previously persisted bundle

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the nightly channel? Yesa

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A

Miscellaneous Information:

We need to persist catalog id, version and ping and use these values if they exist

@tmancey tmancey changed the title [Desktop] Ads are not shown if the catalog fails to download but a previous bundle exists Ads are not shown if the catalog fails to download but a previous bundle exists Aug 5, 2020
@tmancey tmancey added the OS/Android Fixes related to Android browser functionality label Aug 5, 2020
@tmancey tmancey removed the OS/Android Fixes related to Android browser functionality label Aug 20, 2020
@srirambv srirambv changed the title Ads are not shown if the catalog fails to download but a previous bundle exists [Desktop] Ads are not shown if the catalog fails to download but a previous bundle exists Sep 9, 2020
@tmancey tmancey changed the title [Desktop] Ads are not shown if the catalog fails to download but a previous bundle exists Brave Ads are not shown if the catalog fails to download but a previous bundle exists Oct 9, 2020
@tmancey tmancey added priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes release-notes/include labels Oct 9, 2020
@tmancey tmancey changed the title Brave Ads are not shown if the catalog fails to download but a previous bundle exists Brave Ads are not shown after restarting the browser if the catalog fails to download and a previous bundle exists Oct 9, 2020
@tmancey
Copy link
Contributor Author

tmancey commented Nov 16, 2020

Closing issue as resolved by #12558

@tmancey tmancey closed this as completed Nov 16, 2020
@tmancey tmancey added this to the 1.19.x - Nightly milestone Nov 16, 2020
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Dec 24, 2020

Verification passed on


Brave | 1.19.66 Chromium: 87.0.4280.101 (Official Build) dev (64-bit)
-- | --
Revision | 9407c80213cda69c2b7abcb4fa8e3f74488f4956-refs/branch-heads/4280@{#1807}
OS | Windows 10 OS Version 2004 (Build 19041.685)

  • Verified the STR from the description

Catalog response status 404
image

  • Verified that ad notification is shown from the previous bundle (catalog)
    image
    image

Log info:

[18384:15496:1224/203241.084:VERBOSE1:ad_notification_serving.cc(98)] Ad notification delivered:
  uuid: 5380d615-f141-4cba-a25e-46f42bbcbd8b
  creativeInstanceId: ed6c467a-8643-42eb-a7cd-32e878fa3cd4
  creativeSetId: a9f0b49c-3298-4c1b-a8b5-76a71e8d7332
  campaignId: 0e70c893-b0c0-4dab-860d-7e65446f0f0f
  category: untargeted
  title: This is a test
  body: This is a test
  targetUrl: https://www.brave.com
[18384:15496:1224/203241.084:VERBOSE3:ad_notification_event_viewed.cc(24)] Viewed ad notification with uuid 5380d615-f141-4cba-a25e-46f42bbcbd8b and creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4
[18384:15496:1224/203241.085:VERBOSE1:confirmations.cc(94)] Confirming view ad for creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4
[18384:15496:1224/203241.085:VERBOSE1:redeem_unblinded_token.cc(49)] Redeem unblinded token
[18384:15496:1224/203241.085:VERBOSE1:redeem_unblinded_token.cc(63)] CreateConfirmation
[18384:15496:1224/203241.085:VERBOSE2:redeem_unblinded_token.cc(64)] POST /v1/confirmation/{confirmation_id}/{credential}
[18384:15496:1224/203241.085:VERBOSE5:redeem_unblinded_token.cc(68)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/9d812da7-5848-4ce9-a17e-851e49a32065/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiaXM1WGZRNnNGVHRObnVFdHM2SXZQSjVETnVWK0oya3FiM3QySWRKUXN3VT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiZGV2XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcImVkNmM0NjdhLTg2NDMtNDJlYi1hN2NkLTMyZTg3OGZhM2NkNFwiLFwiZXhwZXJpbWVudFwiOnt9LFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIndpbmRvd3NcIixcInR5cGVcIjpcInZpZXdcIn0iLCJzaWduYXR1cmUiOiJEdGdMRVRoZUorQk1aenJ3NXk0ZHdvL1Y5OW1WTUxTTFdXdmt6L2pVa0x5Umpjb21jTm1jM3FDQlJQdXdmUWk5SlkwMEtDZ01wYjFHaFhNWHR5dHcyQT09IiwidCI6InZOWDArUmpaZ05jQ2QxY0VQdVVzZnFGQnFKTTByVkFvVnIrc0pYRHJUUWlhUXdCZkRyajRzeHVCb0tyNVVyVnFwQmFQZGxGRkU2SHlFMGN5UFN1UHR3PT0ifQ==
  Content: {"blindedPaymentToken":"is5XfQ6sFTtNnuEts6IvPJ5DNuV+J2kqb3t2IdJQswU=","buildChannel":"dev","creativeInstanceId":"ed6c467a-8643-42eb-a7cd-32e878fa3cd4","experiment":{},"payload":{},"platform":"windows","type":"view"}
  Content Type: application/json
  Method: BraveAdsUrlRequestMethod::POST
[18384:15496:1224/203241.130:VERBOSE6:ad_notification_event_viewed.cc(33)] Successfully logged ad notification viewed event
[18384:15496:1224/203242.443:VERBOSE1:redeem_unblinded_token.cc(81)] OnCreateConfirmation
[18384:15496:1224/203242.444:VERBOSE6:redeem_unblinded_token.cc(83)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/9d812da7-5848-4ce9-a17e-851e49a32065/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiaXM1WGZRNnNGVHRObnVFdHM2SXZQSjVETnVWK0oya3FiM3QySWRKUXN3VT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiZGV2XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcImVkNmM0NjdhLTg2NDMtNDJlYi1hN2NkLTMyZTg3OGZhM2NkNFwiLFwiZXhwZXJpbWVudFwiOnt9LFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIndpbmRvd3NcIixcInR5cGVcIjpcInZpZXdcIn0iLCJzaWduYXR1cmUiOiJEdGdMRVRoZUorQk1aenJ3NXk0ZHdvL1Y5OW1WTUxTTFdXdmt6L2pVa0x5Umpjb21jTm1jM3FDQlJQdXdmUWk5SlkwMEtDZ01wYjFHaFhNWHR5dHcyQT09IiwidCI6InZOWDArUmpaZ05jQ2QxY0VQdVVzZnFGQnFKTTByVkFvVnIrc0pYRHJUUWlhUXdCZkRyajRzeHVCb0tyNVVyVnFwQmFQZGxGRkU2SHlFMGN5UFN1UHR3PT0ifQ==
  Response Status Code: 201
  Response: {"id":"9d812da7-5848-4ce9-a17e-851e49a32065","payload":{},"createdAt":"2020-12-24T15:02:43.958Z","type":"view","modifiedAt":"2020-12-24T15:02:43.958Z","creativeInstanceId":"ed6c467a-8643-42eb-a7cd-32e878fa3cd4"}
[18384:15496:1224/203242.444:VERBOSE1:redeem_unblinded_token.cc(103)] FetchPaymentToken
[18384:15496:1224/203242.444:VERBOSE2:redeem_unblinded_token.cc(104)] GET /v1/confirmation/{confirmation_id}/paymentToken
[18384:15496:1224/203242.444:VERBOSE5:redeem_unblinded_token.cc(108)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/9d812da7-5848-4ce9-a17e-851e49a32065/paymentToken
  Method: BraveAdsUrlRequestMethod::GET
[18384:15496:1224/203242.895:VERBOSE1:redeem_unblinded_token.cc(119)] OnFetchPaymentToken
[18384:15496:1224/203242.895:VERBOSE6:redeem_unblinded_token.cc(121)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/9d812da7-5848-4ce9-a17e-851e49a32065/paymentToken
  Response Status Code: 200
  Response: {"id":"9d812da7-5848-4ce9-a17e-851e49a32065","createdAt":"2020-12-24T15:02:43.958Z","type":"view","modifiedAt":"2020-12-24T15:02:43.995Z","creativeInstanceId":"ed6c467a-8643-42eb-a7cd-32e878fa3cd4","paymentToken":{"publicKey":"CrQLMWmUuYog6Q93nScS8Lo1HHSex8WM2Qxij7qhjkQ=","batchProof":"YS6sbEMXT29gkxwtwBBHG9xbSxNFE85gJtYbgYZQyg1Ex/ol1m73RfgnpDqZnpz8udaXX0+2Nh0DdlNIF3EJAg==","signedTokens":["qvQKSZJzWgZZsBLVf4Wm9YFGk/iVVEJvEA71sZL2oHE="]}}
[18384:15496:1224/203242.896:VERBOSE1:confirmations.cc(228)] Successfully redeemed unblinded token with confirmation id 9d812da7-5848-4ce9-a17e-851e49a32065, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and view
[18384:15496:1224/203242.896:VERBOSE1:confirmations.cc(249)] Added 1 unblinded payment token with an estimated redemption value of 0.025 BAT, you now have 1 unblinded payment tokens
  • Viewed 2 ads and ensured ads are triggered from the previous bundle (catalog)
    image

Verification passed on

Brave 1.19.78 Chromium: 87.0.4280.101 (Official Build) dev (64-bit)
Revision 9407c80213cda69c2b7abcb4fa8e3f74488f4956-refs/branch-heads/4280@{#1807}
OS Ubuntu 18.04 LTS
  • Verified the STR from the description

Failed to download catalog

[30273:30273:0108/111922.425774:VERBOSE1:ad_server.cc(64)] Get catalog
[30273:30273:0108/111922.425847:VERBOSE2:ad_server.cc(65)] GET /v5/catalog
[30273:30273:0108/111922.425895:VERBOSE5:ad_server.cc(71)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v5/catalog
  Method: BraveAdsUrlRequestMethod::GET
[30273:30273:0108/111923.877573:VERBOSE1:ad_server.cc(109)] Failed to parse catalog
[30273:30273:0108/111923.877643:VERBOSE1:ad_server.cc(150)] Retry fetching catalog in 0 godzin, 1 minuta i 19 sekund at 11:20

Ad was shown:

[30273:30273:0108/111953.573299:VERBOSE1:ad_notification_serving.cc(98)] Ad notification delivered:
  uuid: d193af05-ed7d-499b-a3d3-3f54b6969878
  creativeInstanceId: 30ecd70f-f56d-4745-a457-4035fcab54b6
  creativeSetId: 0a697a3b-233a-44bc-a337-e2441fb277a7
  campaignId: d4d0474c-277a-4714-b25d-7b484cdb580a
  category: untargeted
  title: Ad conversion with 307 redirect - wildcard
  body: Ad conversion with 307 redirect - wildcard
  targetUrl: http://test.greenbytes.de/tech/tc/httpredirects/t307loc.asis?id=11111
[30273:30273:0108/111953.585826:VERBOSE3:ad_notification_event_viewed.cc(24)] Viewed ad notification with uuid d193af05-ed7d-499b-a3d3-3f54b6969878 and creative instance id 30ecd70f-f56d-4745-a457-4035fcab54b6
[30273:30273:0108/111953.586219:VERBOSE1:confirmations.cc(94)] Confirming view ad for creative instance id 30ecd70f-f56d-4745-a457-4035fcab54b6

Verification PASSED on macOS 11.1 x64 using the following build:

Brave | 1.19.81 Chromium: 87.0.4280.141 (Official Build) dev (x86_64)
--- | ---
Revision | 9f05d1d9ee7483a73e9fe91ddcb8274ebcec9d7f-refs/branch-heads/4280@{#2007}
OS | macOS Version 11.1 (Build 20C69)

Verified the STR/Cases outlined via #10904 (comment). Launched Brave and downloaded the catalog. Once downloaded, re-launched and ensured the catalog failed downloading via Status: 400 as per the following:

Screen Shot 2021-01-13 at 1 01 34 AM

[61362:775:0113/010103.599453:VERBOSE1:ad_server.cc(64)] Get catalog
[61362:775:0113/010103.599479:VERBOSE2:ad_server.cc(65)] GET /v5/catalog
[61362:775:0113/010103.599505:VERBOSE5:ad_server.cc(71)] URL Request:
  URL: https://ads-serve.brave.com/v5/catalog
  Method: BraveAdsUrlRequestMethod::GET
[61362:775:0113/010103.599662:VERBOSE1:features.cc(63)] No active experiment
[61362:775:0113/010103.599697:VERBOSE6:ads_impl.cc(515)] Successfully purged expired ad events
[61362:775:0113/010103.933171:VERBOSE1:ad_server.cc(109)] Failed to parse catalog
[61362:775:0113/010103.933275:VERBOSE1:ad_server.cc(150)] Retry fetching catalog in 0 hours, 0 minutes, 22 seconds at 1:01 AM

Viewed an ad and ensured it was displayed and counted as per the following:

[61362:775:0113/010335.711625:VERBOSE1:ad_notification_serving.cc(98)] Ad notification delivered:
  uuid: 18680c82-01fd-4a81-9879-c292982d6c3c
  creativeInstanceId: f385d5c8-853d-47fc-a8f9-71e5af1dd6ca
  creativeSetId: 10e18661-afcd-44bc-8ed4-6d9771687a40
  campaignId: 8f19a586-122b-4111-ab21-c417f13a7df2
  category: technology & computing-software
  title: Coinsmart.com
  body: Crypto gets you 10% off on Twitch! Buy BTC at CoinSmart.com
  targetUrl: https://www.coinsmart.com/bravecrypto/?utm_source=brave&utm_medium=cpc&utm_campaign=brave_sept
[61362:775:0113/010335.711704:VERBOSE3:ad_notification_event_viewed.cc(24)] Viewed ad notification with uuid 18680c82-01fd-4a81-9879-c292982d6c3c and creative instance id f385d5c8-853d-47fc-a8f9-71e5af1dd6ca
[61362:775:0113/010335.711817:VERBOSE1:confirmations.cc(94)] Confirming view ad for creative instance id f385d5c8-853d-47fc-a8f9-71e5af1dd6ca
Example Example
Screen Shot 2021-01-13 at 1 08 28 AM Screen Shot 2021-01-13 at 1 08 33 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants