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

Fixes browser doesn't retry to get signed tokens in all cases #4106

Merged
merged 1 commit into from
Nov 30, 2019

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Nov 29, 2019

Fixes brave/brave-browser#6647
Requires: #4146

Submitter Checklist:

Test Plan:

See brave/brave-browser#6647

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@tmancey
Copy link
Collaborator Author

tmancey commented Nov 30, 2019

Unrelated CI issue with components_strings.grd

@tmancey
Copy link
Collaborator Author

tmancey commented Jan 19, 2020

@kjozwiak @LaurenWags

You'll need to run through the following when retrieving the {payment_id}:

  • launch brave and enable rewards via brave://rewards
  • once enabled, disable ads via brave://rewards
  • retrieve the {payment_id} via brave://rewards-internals or any other method
  • close the browser and remove Default/rewards_service/confirmations.json
  • launch the browser and ensure that Charles Proxy is setup correctly as mentioned below

Cases:

Launch the browser with logging to the console log and wait for OnRequestSignedTokens to fail (Search for this in the console log), then disable the rewrite and make sure that Confirmations retries and successfully requests the signed tokens.

Following the same steps as below, add a rewrite rule for /v1/confirmation/token/{payment_id}?nonce=* where {payment_id} has been replaced with your payment id and replacing match code from 201 to 200 HTTP_OK.

Setting up Charles Proxy:

  • Navigate to Tools > Rewrite
  • Click the "Add" button
  • Confirm "Enable Rewrite" is checked
  • Tap the "Add" button:

Screenshot 2020-01-19 at 12 54 29

- I would recommend editing the name to reflect the ticket number (as you can export and keep these tests for future use):

Screenshot 2020-01-19 at 12 54 29

- Tap the "Add" button:

Screenshot 2020-01-19 at 12 54 29

- Enter the following information (replacing `{payment_id}` with your payment id, and changing "Host" for other environments such as staging):

Screenshot 2020-01-19 at 12 59 50

- Tap the "OK" button - Tap the "Add" button

Screenshot 2020-01-19 at 12 54 29

- Enter the following formation:

Screenshot 2020-01-19 at 13 02 30

- Tap the "OK" button - Tap the "Apply" button:

Screenshot 2020-01-19 at 12 54 29

- Tap the "OK" button

Screenshot 2020-01-19 at 12 54 29

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

Successfully merging this pull request may close these issues.

browser doesn't retry to get signed tokens in all cases
3 participants