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

ads staging flag uses brave.com domain #24574

Closed
btlechowski opened this issue Aug 10, 2022 · 2 comments · Fixed by brave/brave-core#14583
Closed

ads staging flag uses brave.com domain #24574

btlechowski opened this issue Aug 10, 2022 · 2 comments · Fixed by brave/brave-core#14583

Comments

@btlechowski
Copy link

btlechowski commented Aug 10, 2022

ads staging flag uses brave.com instead of bravesoftware.com. Ads staging env is broken.
Regression introduced in 1.44.x. Not reproducible in 1.43.x

Steps to Reproduce

  1. Clean profile 1.44.x
  2. Run Brave with --rewards=staging=true
  3. Enable rewards and ads
  4. Check logs for ads requests

Actual result:

ads requests are made to brave.com

[8883:8883:0810/220413.748211:VERBOSE1:refill_unblinded_tokens.cc(106)] Refill unblinded tokens
[8883:8883:0810/220413.753855:VERBOSE1:refill_unblinded_tokens.cc(116)] RequestSignedTokens
[8883:8883:0810/220413.775005:VERBOSE2:refill_unblinded_tokens.cc(117)] POST /v2/confirmation/token/{payment_id}
[8883:8883:0810/220413.899969:VERBOSE6:refill_unblinded_tokens.cc(127)] URL Request:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/a43900d5-21e4-4cb2-afea-044fd4e29715
[8883:8883:0810/220414.362303:VERBOSE1:refill_unblinded_tokens.cc(137)] OnRequestSignedTokens
[8883:8883:0810/220414.362445:VERBOSE6:refill_unblinded_tokens.cc(139)] URL Response:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/a43900d5-21e4-4cb2-afea-044fd4e29715
  Response Status Code: 500
  Response: {}
[8883:8883:0810/220414.362564:VERBOSE1:refill_unblinded_tokens.cc(147)] Failed to request signed tokens
[8883:8883:0810/220414.362634:VERBOSE1:refill_unblinded_tokens.cc(362)] Failed to refill unblinded tokens

Expected result:

ads requests are made to bravesoftware.com

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.44.35 Chromium: 104.0.5112.81 (Official Build) nightly (64-bit)
Revision 5b7b76419d50f583022568b6764b630f6ddc9208-refs/branch-heads/5112@{#1309}
OS Ubuntu 18.04 LTS

cc @jsecretan @tmancey @rebron @brave/qa-team

@LaurenWags
Copy link
Member

Reproduced on macOS using:

Brave | 1.44.34 Chromium: 104.0.5112.81 (Official Build) nightly (x86_64)
-- | --
Revision | 5b7b76419d50f583022568b6764b630f6ddc9208-refs/branch-heads/5112@{#1309}
OS | macOS Version 12.5 (Build 21G72)

Launched with: /Applications/Brave\ Browser\ Nightly.app/Contents/MacOS/Brave\ Browser\ Nightly --args --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=9,"*/brave_rewards/*"=9,"*/bat-native-ads/*"=9,"*/bat-native-confirmations/*"=9,"*/brave_ads/*"=9,"*/brave_user_model/*"=9 --rewards=staging=true,debug=true

But am seeing calls to brave.com:

[33233:259:0810/163132.728294:VERBOSE1:refill_unblinded_tokens.cc(116)] RequestSignedTokens
[33233:259:0810/163132.728366:VERBOSE2:refill_unblinded_tokens.cc(117)] POST /v2/confirmation/token/{payment_id}
[33233:259:0810/163132.736362:VERBOSE6:refill_unblinded_tokens.cc(127)] URL Request:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/5d5eeb56-4e3b-4597-8d19-17a044a20ea0
.................
[33233:259:0810/163132.852207:VERBOSE1:refill_unblinded_tokens.cc(137)] OnRequestSignedTokens
[33233:259:0810/163132.852347:VERBOSE6:refill_unblinded_tokens.cc(139)] URL Response:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/5d5eeb56-4e3b-4597-8d19-17a044a20ea0
  Response Status Code: 500
  Response: {}

@btlechowski
Copy link
Author

Verification passed on

Brave 1.44.75 Chromium: 105.0.5195.102 (Official Build) beta (64-bit)
Revision 4c16f5ffcc2da70ee2600d5db77bed423ac03a5a-refs/branch-heads/5195_55@{#4}
OS Ubuntu 18.04 LTS

Verified test plan from the description

staging

issuers

[20072:20072:0908/035047.459848:VERBOSE2:issuers.cc(54)] GET /v1/issuers/
[20072:20072:0908/035047.499355:VERBOSE6:issuers.cc(58)] URL Request:
  URL: https://static.ads.bravesoftware.com/v1/issuers/

catalog

[20072:20072:0908/035047.666740:VERBOSE1:catalog.cc(71)] Catalog
[20072:20072:0908/035047.667020:VERBOSE2:catalog.cc(72)] GET /v9/catalog
[20072:20072:0908/035047.667583:VERBOSE6:catalog.cc(78)] URL Request:
  URL: https://static.ads.bravesoftware.com/v9/catalog

subdivision

[20072:20072:0908/035048.270323:VERBOSE1:subdivision_targeting.cc(202)] OnFetchSubdivisionTargeting
[20072:20072:0908/035048.280202:VERBOSE6:subdivision_targeting.cc(204)] URL Response:
  URL: https://geo.ads.bravesoftware.com/v1/getstate

refill

[20072:20072:0908/035148.315891:VERBOSE1:refill_unblinded_tokens.cc(106)] Refill unblinded tokens
[20072:20072:0908/035148.316033:VERBOSE1:refill_unblinded_tokens.cc(116)] RequestSignedTokens
[20072:20072:0908/035148.316126:VERBOSE2:refill_unblinded_tokens.cc(117)] POST /v2/confirmation/token/{paymentId}
[20072:20072:0908/035148.359928:VERBOSE6:refill_unblinded_tokens.cc(127)] URL Request:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/token/1a13608e-8e16-4d6d-b3a6-7149998a833b

signed tokens

[20072:20072:0908/035149.730532:VERBOSE1:refill_unblinded_tokens.cc(175)] GetSignedTokens
[20072:20072:0908/035149.730783:VERBOSE2:refill_unblinded_tokens.cc(176)] GET /v2/confirmation/token/{paymentId}?nonce={nonce}
[20072:20072:0908/035149.730980:VERBOSE6:refill_unblinded_tokens.cc(180)] URL Request:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/token/1a13608e-8e16-4d6d-b3a6-7149998a833b?nonce=c18ef1bf-e524-401a-b6a8-540509015e60

redeem

[20072:20072:0908/035511.163517:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[20072:20072:0908/035511.179231:VERBOSE1:redeem_unblinded_token.cc(71)] CreateConfirmation
[20072:20072:0908/035511.181591:VERBOSE2:redeem_unblinded_token.cc(72)] POST /v2/confirmation/{transactionId}/{credential}
[20072:20072:0908/035511.182749:VERBOSE6:redeem_unblinded_token.cc(76)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/

create confirmation

[20072:20072:0908/035512.285131:VERBOSE1:redeem_unblinded_token.cc(88)] OnCreateConfirmation
[20072:20072:0908/035512.285793:VERBOSE6:redeem_unblinded_token.cc(90)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/

fetch payment token

[20072:20072:0908/035512.285958:VERBOSE1:redeem_unblinded_token.cc(117)] FetchPaymentToken
[20072:20072:0908/035512.286046:VERBOSE2:redeem_unblinded_token.cc(118)] GET /v2/confirmation/{transactionId}/paymentToken
[20072:20072:0908/035512.286139:VERBOSE6:redeem_unblinded_token.cc(122)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/847a0bf8-6bc5-49f0-9bb0-47eb8e341a59/paymentToken

redeem unblinded payment tokents

[21025:21025:0910/040324.989662:VERBOSE1:redeem_unblinded_payment_tokens.cc(114)] OnRedeemUnblindedPaymentTokens
[21025:21025:0910/040324.989835:VERBOSE6:redeem_unblinded_payment_tokens.cc(116)] URL Response:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/payment/1a13608e-8e16-4d6d-b3a6-7149998a833b

production

issuers

[21536:21536:0908/123125.841729:VERBOSE1:issuers.cc(53)] FetchIssuers
[21536:21536:0908/123125.844882:VERBOSE2:issuers.cc(54)] GET /v1/issuers/
[21536:21536:0908/123125.845368:VERBOSE6:issuers.cc(58)] URL Request:
  URL: https://static.ads.brave.com/v1/issuers/
  Method: kGet

subdivision

[21536:21536:0908/123125.898460:VERBOSE1:subdivision_targeting.cc(188)] FetchSubdivisionTargeting
[21536:21536:0908/123125.901733:VERBOSE2:subdivision_targeting.cc(189)] GET /v1/getstate
[21536:21536:0908/123125.911919:VERBOSE6:subdivision_targeting.cc(193)] URL Request:
  URL: https://geo.ads.brave.com/v1/getstate
  Method: kGet

catalog

[21536:21536:0908/123125.919264:VERBOSE1:catalog.cc(71)] Catalog
[21536:21536:0908/123125.919607:VERBOSE2:catalog.cc(72)] GET /v9/catalog
[21536:21536:0908/123125.920008:VERBOSE6:catalog.cc(78)] URL Request:
  URL: https://static.ads.brave.com/v9/catalog
  Method: kGet

refill

[21536:21536:0908/123127.275316:VERBOSE1:refill_unblinded_tokens.cc(106)] Refill unblinded tokens
[21536:21536:0908/123127.293752:VERBOSE1:refill_unblinded_tokens.cc(116)] RequestSignedTokens
[21536:21536:0908/123127.303390:VERBOSE2:refill_unblinded_tokens.cc(117)] POST /v2/confirmation/token/{paymentId}
[21536:21536:0908/123127.362931:VERBOSE6:refill_unblinded_tokens.cc(127)] URL Request:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/29981a61-29ef-4adb-86fd-dc5dbad65187

signed tokens

[21536:21536:0908/123128.430664:VERBOSE1:refill_unblinded_tokens.cc(138)] OnRequestSignedTokens
[21536:21536:0908/123128.436025:VERBOSE6:refill_unblinded_tokens.cc(140)] URL Response:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/29981a61-29ef-4adb-86fd-dc5dbad65187
[21536:21536:0908/123230.707607:VERBOSE1:refill_unblinded_tokens.cc(175)] GetSignedTokens
[21536:21536:0908/123230.707756:VERBOSE2:refill_unblinded_tokens.cc(176)] GET /v2/confirmation/token/{paymentId}?nonce={nonce}
[21536:21536:0908/123230.707869:VERBOSE6:refill_unblinded_tokens.cc(180)] URL Request:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/29981a61-29ef-4adb-86fd-dc5dbad65187?nonce=406500c0-ac36-4ee5-a98f-833b91e0343a

redeem unblinded token

[22687:22687:0908/124549.839682:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[22687:22687:0908/124549.853297:VERBOSE1:redeem_unblinded_token.cc(71)] CreateConfirmation
[22687:22687:0908/124549.854278:VERBOSE2:redeem_unblinded_token.cc(72)] POST /v2/confirmation/{confirmation_id}/{credential}
[22687:22687:0908/124549.855055:VERBOSE6:redeem_unblinded_token.cc(76)] URL Request:
  URL: https://anonymous.ads.brave.com/v2/confirmation/

create confirmation

[22687:22687:0908/124550.110178:VERBOSE1:redeem_unblinded_token.cc(87)] OnCreateConfirmation
[22687:22687:0908/124550.110361:VERBOSE6:redeem_unblinded_token.cc(89)] URL Response:
  URL: https://anonymous.ads.brave.com/v2/confirmation/

FetchPaymentToken

[22687:22687:0908/124550.110587:VERBOSE1:redeem_unblinded_token.cc(116)] FetchPaymentToken
[22687:22687:0908/124550.110698:VERBOSE2:redeem_unblinded_token.cc(117)] GET /v2/confirmation/{confirmation_id}/paymentToken
[22687:22687:0908/124550.110810:VERBOSE6:redeem_unblinded_token.cc(121)] URL Request:
  URL: https://anonymous.ads.brave.com/v2/confirmation/3048837a-1444-4df8-9f5b-ad367fc2d6f0/paymentToken

RedeemUnblindedPaymentTokens

[23394:23394:0909/125009.109958:VERBOSE1:redeem_unblinded_payment_tokens.cc(73)] RedeemUnblindedPaymentTokens
[23394:23394:0909/125009.110206:VERBOSE2:redeem_unblinded_payment_tokens.cc(84)] PUT /v2/confirmation/payment/{payment_id}
[23394:23394:0909/125009.110393:VERBOSE6:redeem_unblinded_payment_tokens.cc(99)] URL Request:
  URL: https://mywallet.ads.brave.com/v2/confirmation

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