Brave-browser: [Desktop] onCreateConfirmation and onFetchPaymentToken fail for countries that send ?? for countryCode - follow up to 9823

Created on 13 Jul 2020  路  3Comments  路  Source: brave/brave-browser

Description


Found while testing #9823

Countries which send ?? as the countryCode (to preserve anonymity) have onCreateConfirmation and onFetchPaymentToken fail in the logs.

Steps to Reproduce


pre-req - be running Charles Proxy to see countryCode in the confirmation

  1. Be set up as a country to send ?? (https://bravesoftware.slack.com/archives/C43LW5U2H/p1594446418409700?thread_ts=1594391866.398500&cid=C43LW5U2H)
  2. Trigger an ad
  3. See the failures for onCreateConfirmation and onFetchPaymentToken fail in the logs

Actual result:

[10756:775:0713/073918.969064:VERBOSE1:redeem_token.cc(152)] OnCreateConfirmation
[10756:775:0713/073918.969161:VERBOSE6:redeem_token.cc(154)] URL Response:
  URL: https://ads-serve.brave.com/v1/confirmation/e592cb3f-22b5-4bcf-aff2-0b87c000f4e4/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiRnRpODdTZjhvR2NIaWNKNFRkMlk4WGtBaGVpbm1PbytKektxMllWKzJBZz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwicmVsZWFzZVwiLFwiY291bnRyeUNvZGVcIjpcIj8/XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjgxOGZkZTNlLTQ0YTgtNGY4YS1iNjk1LWU1MDI5MDg0OTcyOVwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIm1hY29zXCIsXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoidmdYa1J3b1FqeHpJUWYxNkt0QUZESzUvNHZmV3EzU1J5S2VlUkY0b2lSR0dXQm5taUd3bzRFdnJIMGFDMkhDQThlakRyTEswbHBtNUlSUG5CcTI2cWc9PSIsInQiOiJCWEhSVUZ2dDY0STk2NnJEWjgyU01lcUMyZWF2b2FnOFJwVzVjOTBnZkkrK2VxTzdsb1ExRWxyeEwrSWxEL2NwWlVWKzBXUjQydkJBM3JVKzZQbW1OQT09In0=
  Response Status Code: 404
  Body: {"statusCode":404,"error":"Not Found","message":"Cannot POST /v1/confirmation/e592cb3f-22b5-4bcf-aff2-0b87c000f4e4/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiRnRpODdTZjhvR2NIaWNKNFRkMlk4WGtBaGVpbm1PbytKektxMllWKzJBZz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwicmVsZWFzZVwiLFwiY291bnRyeUNvZGVcIjpcIj8/XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjgxOGZkZTNlLTQ0YTgtNGY4YS1iNjk1LWU1MDI5MDg0OTcyOVwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIm1hY29zXCIsXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoidmdYa1J3b1FqeHpJUWYxNkt0QUZESzUvNHZmV3EzU1J5S2VlUkY0b2lSR0dXQm5taUd3bzRFdnJIMGFDMkhDQThlakRyTEswbHBtNUlSUG5CcTI2cWc9PSIsInQiOiJCWEhSVUZ2dDY0STk2NnJEWjgyU01lcUMyZWF2b2FnOFJwVzVjOTBnZkkrK2VxTzdsb1ExRWxyeEwrSWxEL2NwWlVWKzBXUjQydkJBM3JVKzZQbW1OQT09In0="}
[10756:775:0713/073919.098922:VERBOSE1:redeem_token.cc(191)] OnFetchPaymentToken
[10756:775:0713/073919.098996:VERBOSE6:redeem_token.cc(193)] URL Response:
  URL: https://ads-serve.brave.com/v1/confirmation/e592cb3f-22b5-4bcf-aff2-0b87c000f4e4/paymentToken
  Response Status Code: 404
  Body: {"error":"Confirmation does not exist","statusCode":404}

Expected result:

No failures for these

Reproduces how often:


easily

Brave version (brave://version info)


1.11.94

Version/Channel Information:

  • Can you reproduce this issue with the current release? n/a for 1.10.x, yes for 1.11.x
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the dev channel?
  • Can you reproduce this issue with the nightly channel?

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:


cc @tmancey @jsecretan @rebron @bsclifton @brave/legacy_qa

ODesktop QA Pass-Linux QA Pass-Win64 QA Pass-macOS QYes featurads release-noteexclude

Most helpful comment

Per discussion with @jsecretan @tmancey @amirsaber @kjozwiak moving out of 1.11.x milestone and removing release/blocking label. Putting issue into 1.13.x milestone as that's where https://github.com/brave/brave-core/pull/6064 landed.

All 3 comments

Per discussion with @jsecretan @tmancey @amirsaber @kjozwiak moving out of 1.11.x milestone and removing release/blocking label. Putting issue into 1.13.x milestone as that's where https://github.com/brave/brave-core/pull/6064 landed.

Marking as QA/Blocked as this will need a Release channel build to test since countryCode is only sent on Release channel.

Verification passed on

Brave | 1.13.80 Chromium: 85.0.4183.83聽(Official Build)聽(64-bit)
-- | --
Revision | 94abc2237ae0c9a4cb5f035431c8adfb94324633-refs/branch-heads/4183@{#1658}
OS | Windows聽10 OS Version 1903 (Build 18362.1016)

  • Verified the STR from the description
  • Verified no failures in OnCreateConfirmation logs
[4236:13208:0826/143641.828:VERBOSE1:redeem_unblinded_token.cc(153)] OnCreateConfirmation
[4236:13208:0826/143641.828:VERBOSE6:redeem_unblinded_token.cc(155)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/87f0a7a7-503b-4843-ac70-d8f2dc04d0b5/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiQkgrN2czb0JML2tWMHVsMG4rWFB6NmtlVTRCVUdGcEVxV3NDRGIyakJXcz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwicmVsZWFzZVwiLFwiY291bnRyeUNvZGVcIjpcIklOXCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjZhNjZlMzkxLTlhMWQtNDM0OS04YTA0LTY0NzUxZWRmNjkyYlwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIndpbmRvd3NcIixcInR5cGVcIjpcImNsaWNrXCJ9Iiwic2lnbmF0dXJlIjoibkU1RUlYOTVQWERmNHc2UEI3OVdDMVFDN0k5a0tKOFlmdWRLTnZWRWFaUzdwQ3JPZk5TTHRMRUlJTjI1N1R1UHJjSHZKM0VIenArTytnK2JCWFFOYWc9PSIsInQiOiJvSnVtR0szRFl0c09tcVFQQ2NkZmgvd0Z5dmhwcmswWWEvYUduUmNGaWxaRS9VZmh4Vm5BaEhaYzY0R2F0MjFYTlZSdFdCclExeWFIUzB2OGNMN1E0UT09In0=
  Response Status Code: 201
  Body: {"id":"87f0a7a7-503b-4843-ac70-d8f2dc04d0b5","payload":{},"createdAt":"2020-08-26T09:06:42.316Z","type":"click","modifiedAt":"2020-08-26T09:06:42.316Z","creativeInstanceId":"6a66e391-9a1d-4349-8a04-64751edf692b"}
  Headers:
    accept-ranges: bytes
    access-control-allow-origin: *
    content-length: 212
    content-type: application/json; charset=utf-8
    date: Wed, 26 Aug 2020 09:06:42 GMT
    status: 201
  • Verified no failures in OnFetchPaymentToken logs
[4236:13208:0826/143642.222:VERBOSE1:redeem_unblinded_token.cc(192)] OnFetchPaymentToken
[4236:13208:0826/143642.222:VERBOSE6:redeem_unblinded_token.cc(194)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/87f0a7a7-503b-4843-ac70-d8f2dc04d0b5/paymentToken
  Response Status Code: 200
  Body: {"id":"87f0a7a7-503b-4843-ac70-d8f2dc04d0b5","createdAt":"2020-08-26T09:06:42.316Z","type":"click","modifiedAt":"2020-08-26T09:06:42.337Z","creativeInstanceId":"6a66e391-9a1d-4349-8a04-64751edf692b","paymentToken":{"publicKey":"lLO5tErGoTK0askrALab6pKGAnBHqELSyw/evqZRwH8=","batchProof":"0DjxS3zTpGInj6D2+WFLsZZUNOGV/lwYTtj6cddMSg9FjEAJTDNg51Iuap13RcNz4SzoFGNedc+ILCeWP/BuCg==","signedTokens":["lKcOo+S/DzTuMwG3ws6rS2t0YlOIGmTNlhnrgmsukiY="]}}
  Headers:
    accept-ranges: bytes
    access-control-allow-origin: *
    content-length: 443
    content-type: application/json; charset=utf-8
    date: Wed, 26 Aug 2020 09:06:42 GMT
    status: 200
  • Verified Countrycode is displayed as expected in the charles responses
    image

  • Verified BuildChannel, countryCode, platform are displayed correctly in logs

Content: {"blindedPaymentToken":"2KqyD0K5Ubn5VLWZtt8dklZ7YzTja2JgXEu8u70BqCM=","buildChannel":"release","countryCode":"IN","creativeInstanceId":"6a66e391-9a1d-4349-8a04-64751edf692b","payload":{},"platform":"windows","type":"view"}

Country code: used one of the country code from https://bravesoftware.slack.com/archives/C43LW5U2H/p1594446418409700?thread_ts=1594391866.398500&cid=C43LW5U2H

image

  • Confirmed no failure in logs for OnCreateConfirmation in logs
[5512:14172:0826/182922.086:VERBOSE1:redeem_unblinded_token.cc(153)] OnCreateConfirmation
[5512:14172:0826/182922.086:VERBOSE6:redeem_unblinded_token.cc(155)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/b2494313-1ef2-4502-b3af-049bdc5d7438/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwianErY0lCY0t5bGszU2ZZTjdtMlh5WldTT0t4TWxBUGJvcngyc1g3SzFFbz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwicmVsZWFzZVwiLFwiY291bnRyeUNvZGVcIjpcIj8_XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjZhNjZlMzkxLTlhMWQtNDM0OS04YTA0LTY0NzUxZWRmNjkyYlwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIndpbmRvd3NcIixcInR5cGVcIjpcInZpZXdcIn0iLCJzaWduYXR1cmUiOiJheWdHdktMb0lxWlFNcCtka2NLdExSeERPcCthVlB3MjhYM3dvc2l0dk8vQ0U4bTRuU0N4eVlvTjBuVVJlMzlmNlpRTXFac0JuRGRoZWJhb1pENHlRUT09IiwidCI6Im0vV25TZ3hvbEpZa0ZZM0FjQ09nVHZCR2NjRElEUVlmRDRqSytEUmJaWVRPMThZUEF5dzlTVHhXWlVSMnVvUHFLaWxoZUZZUmNQOGlqSDcyWE1ibWdRPT0ifQ==
  Response Status Code: 201
  Body: {"id":"b2494313-1ef2-4502-b3af-049bdc5d7438","payload":{},"createdAt":"2020-08-26T12:59:22.686Z","type":"view","modifiedAt":"2020-08-26T12:59:22.686Z","creativeInstanceId":"6a66e391-9a1d-4349-8a04-64751edf692b"}
  Headers:
    accept-ranges: bytes
    access-control-allow-origin: *
    content-length: 211
    content-type: application/json; charset=utf-8
    date: Wed, 26 Aug 2020 12:59:22 GMT
    status: 201
  • Confirmed no failures for OnFetchPaymentToken in logs
[5512:14172:0826/182922.452:VERBOSE1:redeem_unblinded_token.cc(192)] OnFetchPaymentToken
[5512:14172:0826/182922.452:VERBOSE6:redeem_unblinded_token.cc(194)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/b2494313-1ef2-4502-b3af-049bdc5d7438/paymentToken
  Response Status Code: 200
  Body: {"id":"b2494313-1ef2-4502-b3af-049bdc5d7438","createdAt":"2020-08-26T12:59:22.686Z","type":"view","modifiedAt":"2020-08-26T12:59:22.714Z","creativeInstanceId":"6a66e391-9a1d-4349-8a04-64751edf692b","paymentToken":{"publicKey":"JiwFR2EU/Adf1lgox+xqOVPuc6a/rxdy/LguFG5eaXg=","batchProof":"Ogl6xCmJNeaT+G1u8M53FMqG2+VGsFeMRjrVVrdohA2Wv4hakgnOit/0vvpTPUGrjzHFPWvGsTE85cl+QHFpCA==","signedTokens":["shREszIRtInRd/SIMV0Qxi3VrsIYN82mNsrVbI8mxVc="]}}
  Headers:
    accept-ranges: bytes
    access-control-allow-origin: *
    content-length: 442
    content-type: application/json; charset=utf-8
    date: Wed, 26 Aug 2020 12:59:23 GMT
    status: 200

Verified passed with

Brave | 1.13.80 Chromium: 85.0.4183.83聽(Official Build)聽(64-bit)
-- | --
Revision | 94abc2237ae0c9a4cb5f035431c8adfb94324633-refs/branch-heads/4183@{#1658}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified STR from description

  • Confirmed onCreateConfirmation does not 404:

[7636:775:0826/083946.345882:VERBOSE1:redeem_unblinded_token.cc(153)] OnCreateConfirmation
[7636:775:0826/083946.345952:VERBOSE6:redeem_unblinded_token.cc(155)] URL Response:
  URL: https://ads-serve.brave.com/v1/confirmation/ef0a2d28-08ec-4e1c-ab9b-fc3309314e60/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwia2lOdjgzZFl3NnFrUElWdnZmZnNqL3RncHBmSlhzNC9LeVF0ZFVpSDNYcz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwicmVsZWFzZVwiLFwiY291bnRyeUNvZGVcIjpcIj8_XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjMyODdhZjRhLWI4MWYtNDQxMy1iNzUzLWVjOGM2YmJlNWM5Y1wiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIm1hY29zXCIsXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoidHRRM2tndzRKMC9iUFMrNzl2NXo1NVpEbVpPaEl0RDRiQUtJSjFUZjU2d2ZpTTJpWHk5N1ZjRWlTVXNGUlJYRlJndzkrdXR6YjJxZHdTTFM3cks2Tnc9PSIsInQiOiJqbjRIV3JQbjU0dEowK2Y3eldMSXdhTmZDemJkNG5BRnBTZ2FzVWNycGtGZWZ2Z3ltdWFMVDlSOVFVZUNtZytOSkJ0L2xLV2V6V05MbGw0UTFzV0hIQT09In0=
  Response Status Code: 201
  • Confirmed onFetchPaymentToken does not 404:
[7636:775:0826/083946.441669:VERBOSE1:redeem_unblinded_token.cc(192)] OnFetchPaymentToken
[7636:775:0826/083946.441763:VERBOSE6:redeem_unblinded_token.cc(194)] URL Response:
  URL: https://ads-serve.brave.com/v1/confirmation/ef0a2d28-08ec-4e1c-ab9b-fc3309314e60/paymentToken
  Response Status Code: 200
  • Confirmed ?? was being sent for Antarctica (using Charles Proxy):
    Screen Shot 2020-08-26 at 08 40 29

  • Spot checked to confirm no issues with onCreateConfirmation and onFetchPaymentToken when country code is sent for US (using Charles Proxy)

  • Spot to confirm no issues with onCreateConfirmation and onFetchPaymentToken when no country code is sent for Aruba (using Charles Proxy)


Verification passed on

Brave | 1.13.80 Chromium: 85.0.4183.83聽(Official Build)聽(64-bit)
-- | --
Revision | 94abc2237ae0c9a4cb5f035431c8adfb94324633-refs/branch-heads/4183@{#1658}
OS | Ubuntu 18.04 LTS

  • Verified STR from description

  • Confirmed onCreateConfirmation does not 404:

[32402:32402:0827/043958.340400:VERBOSE1:redeem_unblinded_token.cc(153)] OnCreateConfirmation
[32402:32402:0827/043958.340439:VERBOSE6:redeem_unblinded_token.cc(155)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/2cb057b6-04e1-479f-a902-7953aabb29aa/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiY25oVHJHU1ZpRGhwbm9OOHNKbGRHY0QwUy9ialZ5bGwreXQvKzJtQU5XZz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwicmVsZWFzZVwiLFwiY291bnRyeUNvZGVcIjpcIj8_XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcImQ5ZGMwMDI4LThmODYtNGM5Mi1iMjVkLTk4MWJjMWJkYjkwM1wiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcImxpbnV4XCIsXCJ0eXBlXCI6XCJkaXNtaXNzXCJ9Iiwic2lnbmF0dXJlIjoiVGEzejNqaDZBb1YxOG5pWlgzSVBmbG05ZnRyMkRubUNTNE01WG5DQStXWGhtVXBoU3hOVUlYK2FlM3QxS2FKMlBuaXZrNGVXeGYrOVlnTnVPWVdnSEE9PSIsInQiOiJxdUVraGpCWEllKzVZUnJ2T1U0N1NrenRFUUZ1bjJIbVljQXZmeHc3R1RmYUFLOEF3ak5CQnNsbnBqODdyZWxFWHF3QUF6VmhVMy81Y3l3ZVJtN3A1QT09In0=
  Response Status Code: 201
  • Confirmed onFetchPaymentToken does not 404:
[32402:32402:0827/043958.690881:VERBOSE1:redeem_unblinded_token.cc(192)] OnFetchPaymentToken
[32402:32402:0827/043958.696128:VERBOSE6:redeem_unblinded_token.cc(194)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/2cb057b6-04e1-479f-a902-7953aabb29aa/paymentToken
  Response Status Code: 200

  • Confirmed ?? was being sent for Cook Islands (using Charles Proxy):
    image
Was this page helpful?
0 / 5 - 0 ratings