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

[Desktop] AC SKU doesn't continue retrying if you restart the browser #10243

Closed
LaurenWags opened this issue Jun 12, 2020 · 3 comments
Closed

Comments

@LaurenWags
Copy link
Member

Description

Found by @srirambv

If you are in the middle of AC SKU retries and you close/relaunch the browser, AC doesn't pick up retrying. As a result, your auto contribute never completes.

Steps to Reproduce

  1. Clean profile, launched with --enable-logging=stderr --vmodule=*rewards*=6 --log-level=2 --rewards=staging=true,reconcile-interval=3 --brave-ads-staging
  2. Enable Rewards
  3. Connect KYC'd uphold account
  4. Add ddg and laurenwags.github.io to AC table
  5. Wait for reconcile to occur
  6. See first Timer for contribution retry message (usually 5s). After the second Timer for contribution retry displays in the logs, close the browser. (need to watch closely for this since it is geometric timer and could be seconds or minutes)
  7. Restart the browser

Actual result:

AC retries don't continue. So the balance is deducted from your Uphold account, but it never displays in the UI as it doesn't finish. If you go to contribution_info_publishers table you can see that contributed_amount for second pub listed is 0. This will never get updated after browser restart.

Expected result:

AC should continue with retries to finish processing

Reproduces how often:

easily

Brave version (brave://version info)

Brave 1.10.90 Chromium: 83.0.4103.97 (Official Build) (64-bit)
Revision 326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}
OS macOS Version 10.14.6 (Build 18G3020)

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • 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 @NejcZdovc @brave/legacy_qa

@NejcZdovc
Copy link
Contributor

just tried it on the latest master (1.12.24) and can't reproduce it. Is this reproducible on 1.11? Maybe just specific to 1.10?

@LaurenWags
Copy link
Member Author

Reproduced issue from description using

Brave 1.10.90 Chromium: 83.0.4103.97 (Official Build) (64-bit)
Revision 326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}
OS macOS Version 10.14.6 (Build 18G3020)
Brave 1.11.64 Chromium: 83.0.4103.97 (Official Build) dev (64-bit)
Revision 326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}
OS macOS Version 10.14.6 (Build 18G3020)

However, did not reproduce the issue using

Brave 1.12.25 Chromium: 83.0.4103.97 (Official Build) nightly (64-bit)
Revision 326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}
OS macOS Version 10.14.6 (Build 18G3020)

Steps:

  1. Using 1.10.90, Clean profile, launched with --enable-logging=stderr --vmodule=*rewards*=6 --log-level=2 --rewards=staging=true,reconcile-interval=3 --brave-ads-staging
    2. Enable Rewards
    3. Connect KYC'd uphold account
    4. Add ddg and laurenwags.github.io to AC table
    5. Wait for reconcile to occur
    6. See first Timer for contribution retry message (usually 5s). After the second Timer for contribution retry displays in the logs, close the browser. (need to watch closely for this since it is geometric timer and could be seconds or minutes)
    7. Restart the browser.
    8. AC does not continue where it left off.
    9. Copied profile and renamed to Dev.
    10. Launched using /Applications/Brave\ Browser\ Dev.app/Contents/MacOS/Brave\ Browser\ Dev --enable-logging=stderr --vmodule=*/bat-native-ledger/*=6,*/brave_rewards/*=6 --log-level=2 --rewards=staging=true,reconcile-interval=5 --brave-ads-staging
    11. Waited, watched the logs. No mention of retrying contribution.
    12. Closed and checked DB, contribution_info_publishers table. As with 1.10.x, second site in the list had contributed_amount as 0.
    13. Copied profile and renamed to Nightly.
    14. Launched using /Applications/Brave\ Browser\ Nightly.app/Contents/MacOS/Brave\ Browser\ Nightly --enable-logging=stderr --vmodule=*/bat-native-ledger/*=6,*/brave_rewards/*=6 --log-level=2 --rewards=staging=true,reconcile-interval=5 --brave-ads-staging
    15. AC contributed immediately. Saw the following in the logs:
$ /Applications/Brave\ Browser\ Nightly.app/Contents/MacOS/Brave\ Browser\ Nightly --enable-logging=stderr --vmodule=*/bat-native-ledger/*=6,*/brave_rewards/*=6 --log-level=2 --rewards=staging=true,reconcile-interval=5 --brave-ads-staging
[25648:775:0615/160740.168500:VERBOSE1:contribution.cc(257)] Timer will start in 156
[25648:775:0615/160740.169460:VERBOSE1:contribution.cc(257)] Timer will start in 0
[25648:775:0615/160740.170411:VERBOSE5:ledger_impl.cc(452)] 
[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: UrlMethod::GET
[25648:775:0615/160740.224598:VERBOSE1:contribution.cc(740)] Retrying contribution (1c73834c-e377-42da-9e1d-f69d6cd70bda) on step ContributionStep::STEP_PREPARE
[25648:775:0615/160740.233834:VERBOSE5:ledger_impl.cc(452)] 
[ REQUEST ]
> URL: http://payment.rewards.bravesoftware.com/v1/votes
> Method: UrlMethod::POST
> Content: {"credentials":[{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"IYz6gv8giOYdxs2erupeFz1N+WlW7kWpyXRuPuga3zjGRiQFY9qXGI+Y5JC7p5E/RQxVjiHuHlRD2xqN2Ky3Nw==","t":"VaWqEGDnI0T3CIqcVsut9kjjwckQGQ/kdAymw91NVY+tynKYGCVcOC+ZSmL0yAgRtU3dA1+NgtFDOGDwKXKD6w=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"fKZko1FTe8JyUKAb8wzwKIaR+vBM8Dwlsvxba3d8g2hyecSGykhjGuRxcpL87U+NJ3uf4Gt8ZdrivWBrX8rDKQ==","t":"4BKaisENDAr6W6PMeUTe2VB04rCtyvGO6hC2sAdoIO+4STrDRgxHWY3x+OdHlPUuZ/+P6/zOh27DJgHLh0Drkw=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"6ygFbXHb8hxYp4o+0g3sJGEOuMm398kQuAKTXohzGdG8Fq4WUrbTrVjKRkPDgQIR8BoCqAYZm8S5SHpsptzWyQ==","t":"2+r5/jWeOkBi0C6dIOW95hyaJz8bsgXXRlhSR/M5rzzxJ39Id8bYQBykvOYiOhmekRAUNpVvbDVkymuS/3FH0w=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"R7HuvwuX0paWDLAwhxh9QOttG9pJWt5+Ju/KUaZpGJs/vw4Z33o7NEWERMkvjMNRTDuA1cRUpX8AGQmY/0FgLw==","t":"CLoiYRo5vw5l9F1OUsTxgfGHX2ePCEzYf7MYQZlrWjZCozhnb7uhT7vKUFDvZQIA2X8RLWAo32xXtie6IBVZOA=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"tHPA2BoJh5HO7t3mUpKQmlAaMUFpIn4029KQuM6BppzR5FIYynJ28UuJQyDopByIXBw6iJ+8JzPbVcQR5k6PwQ==","t":"AqLMdsp6c9bsMYXB7mH8P44IEdaO6tPe7tSCmZH51OrlhN0Ms4/5F+BuiXlneLrLiQe1l21GAsy7InyGao86xw=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"0pS6lDRy9YPOjCfzIAl/iljrTtKO5DSVYH8NUUhH1O5Fl0XTHNuY+oD7147NQae9b4HaSuednddtQmz5mklTgw==","t":"xPjUQ20t19HS9X0hbOI03VQb5ke0qN6Lj8YGzlFc2/oFglkMfM0ShWhDjPwJY8GpPpmJavtr9AQjaQbkLp7Nxg=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"nrDxPEK42PsMZYjGxa55TZLrmCm5WkVCb/nNt4vOPB+uqpP4+y8hQbDHMLdLfEHVvwNCphFsbs5Siogmkl1mOg==","t":"aH0vm1uZiVBeQ7zLHCqErnt7vSLPvju6z7l8s8xJmq+F+CCpovunJr9pqcXBrATlhnG6YDP4Lf75JQAq6BtxSA=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"gBlMuGd5aT1lYzd5T2DWYwLu22hLg3uPDiAm6ijU5xx7aD4tsSl/Wryx9/sSTUfk24e54KGp5gx/UcMc5lrzpg==","t":"XazzdL1P+OmA84sHE8MHiaHBFfFPn5CKmyvkIa/mm7guVvxmgBYM+Gsz/bYMQSXL4yONqQcgMxNqPlv0WVCK9g=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"im/4R/2hTIoSs/V4Hpok0DU5DYdKx9+BcEioj4aLxc5MDOZCIyXf9zDLU+Ng3290XuQ16vUxBBt5wQq7LMO6zw==","t":"/Ls6z7O3YvZeIeXDliTkM/7WriIihvvxzyN3r4Z5cRX9GOrK9Mi67E9y4UbfNvhr433up9s/1atBWD6K+0FxMg=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"37Ypm8jFqBZgrTU/YpGY5WNsnd50KU2PYpODBlE5PDZ0X112CXIhtYZo0gHB5nGLvXq50/qmi7SWtP0sJsFCRQ==","t":"H/YMjYy1vDvNE3/6hw0WrqIo1vL6zF8qMufGJG/9VO3f5dYGs32/xc3ZC1zw7ZwmNDEYxtBfrEhP+3H1Lz8XoA=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"SzHms2URV5kauWocF6YaxYEnKCRwZnup9w8tka/8LI7WBUgqSS0yI8BqzL6of/eMlZ42XAfzT181M04rS1VQ+w==","t":"Zf9hEdlCsORia02JdbtPJMwUyirnnp+i7jReT+cF9OpCkJu01lwv0gvKZ8JYdCJ99d8j7YQugMqCgcCRoZ8JWg=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"bJD3lyieDtflL8b9bSebvfDL1GtzrUUxbMC+usgxXC/i8MP6X9WeGJZb5SNK5RMyuijCdIGA5WRV0w3LbgKXIg==","t":"EvwmITNm+NSymua+aeG1tFg0Fzqov3yOCmKXqZaw+LcADKYBE++O4DTZfsKHQTkEOUiQ2HZJrinqjTvNqX4mDw=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"GQRhvuGr5VgZmhqFQId0gjlMfAXaLGFAnQdOpTkkbEdtco7RH/1JqSUvC3s5G56qHQP4PDtX7aNc+JEmeUJQQA==","t":"/ttw2Nc2AiixYJmHzKr1SzDAx2M16L6RK0KT5x5mlzwjfyoaGHNRtJvGTPf1kU4u5osHKtwV4x3xQc6JNz1nhg=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"MCbdnXIEYoNcjquzKf/3QVRGDi1qewM/1RYGooroH1po95Nh5ohfwI3KeRSCBMqrlK/35dsGV9fICwf5QD3X/w==","t":"3BaD2onqLXB2cvelEmwAnWSGks8ftQ/0ItdIlfO1We26dRPzoZ9udF4d8WpkfcUZrA0PBOF+MTTQnhvtgg8ipw=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"njwoLWcUbmv7YiMXUckVZYO8O7R6Et0CX9heOhJx3xY/KGe7O8swZXHHLQEDJ7ro9x2MmcnG43jzGU6tQNJvwA==","t":"L3Ra03tD55ZvHwadyxDqZdfmPC5Yrab39JGYPa6UDkVbpjvlKTTNxaIKq6DobgucWzBHFNXUb3rmMKbIcdBKiQ=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"ugKtKcduKiLd8f6+Tn5/IHE/ZJ/BPFrbCtQGq57yGobNY4sRpK2H7TL2LREudFq9+mSbnlzLkUTJoLaTr0KrgA==","t":"3hjJVyfAhG4f6qtBuKSyUtzolHjDASfYiGj7IrdEt6Bm1GCTHTkmNQIHYGpxGzhl5NgYp9hJ6nZq3F2bW2nCuA=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"mTsCnw0W+EbuwsadkR5bzrfvR27TK0wIynwOS/tHzBGW6GEvNGvZc5tiLiAiaS2onPyylNQBzod5YMmkVJqvYQ==","t":"2xaXATBEgXkV925CmaNiptCRvrtKfM7vCpNE2CkiIQxrOlDZ5IB+g6As9G73+Qx4KmQQSiNuRLFx6rK9EyyHyQ=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"29x5ybKOkEv8CMsW7TmWNEtLIdkKU6DXBiXEdEZVwIPjbaw1TaYh4PxzXTPyihZPJpkJ0DCGscPQeOR47+h6Pg==","t":"zfea30CczT/CyD/G4JAIJLeEyvWFvOaoeq05ff2BiXjYtaQEZqO6fDMrgTjgMAgq3DF7UjHjRT3I4yfy7WXvaQ=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"gJuoPjrAsF4+EsDfmqzsX6zTq7hFVKPOvUhyrEghN66l4KsbsLd6ekwhufDUaxopI93u4LaorZLefjG/XBoAOg==","t":"erCLJffWyHlGQD2FSOCE2HoN4JJlG0Dpslv5YTR6ZuXggWL4Z+EixQjhZoH+lmUsBhL+sxq3+BlH2sppjuvKBw=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"y2rhv9Dj+2aiROFdIJjJJgHKr6pFxFJo3CNRtFIXdsFp/YNIO9qz2Y6H2/vqvJT5lJ43ybNd6/2JvpJ1IknlVA==","t":"7U03PVDf319yVGY5Z7/pILZK0A/qSgBxk9UPVpyDpFkCkl8ydtRgP1+B1NwG4J/FDpT3oIj3FX54B1/xf3zmnA=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"19nxkM44LjzbEvNmZ5xY8FV9RnXWEBgLSYAZO8UHf4gobpvlJWV7aPsUx2uAxVmH1ysn9qq6yQOpTZLsPkurXw==","t":"8GVRI5x6GNpFDsLSsFOPw4p/8JqjtBB9UwkaVx0IqG+HsPPZ7SrcWbxtTQLWS8zHgo/kNIl2NzRevhxLfYSJvA=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"NTvmqaqlfNlIP30BUCDatT3txURgtNNFaQg/33RrF0UUE6NHMVaNJ8a+I1J1MAoI+kYLxotloCUUMBDJjmoa2g==","t":"tEou7f9COuovYpgZ+9sK2jYYI0YS7J20i8kDIvjbwDxzNmZU7qC5n/ToeQ+IcdvHnNYwEIjrPN91f5fQXs0inQ=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"kgW/DLKTcQFPt+haQ0g6yvk1e3R1fygpNGHGvODqzAWWhTjGUzIjQyLrQdLkeaPXA7RC7CYuD5/KdOOMcYmSAQ==","t":"9dl8v4uYWKBDgl2kLQ79kPESKW5op2OOVJSb5JEDiMR/NrTi1wkFTEkreykH8Yve3owYoT7EWVeCG4279+DiFw=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"Wmx7w3j6Fy+su0Kzkux9bM6uvd91cy2VGx2+XuDuq8JA0BemQ4I2CuC4hmiFHwm6KobX9yEQtQmIuZLUm0kb4A==","t":"SJNxwiN1rMztMAdrHA2ljBebMmO0Ahvq4aSf2/GFQvP0uCMGOObkfwybt1rePmmmBWDiZuIiQo2RiCLDNBOkbg=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"ZdCE2a4xNsQ1dHuCJMBTw+APTcJ9YTgtzrqw7B17fygVssDtWDpAUiaT3uOZSP4+ktchbKNSf3Hzfj0IVcPYAg==","t":"FL7KEcFTQ3Hcp1gvw9guFxdxHOYgxBXSb1L6coeTgzP/KGxafGEaSW/CTg/rR7tgChpYmRH53rOwj1cw9R917A=="},{"publicKey":"mMMWZrWPlO5b9IB8vF5kUJW4f7ULH1wuEop3NOYqNW0=","signature":"ue9VXzf18BAF+RGt54BOn/8RiNOJuANZ5KxOTERzjD5AJa/Vp0NqjjxDIv69M5ateY/XTQu5hVWKXDGa9Ykb7w==","t":"j8MxUCElQQoetXen5mT+BjMjKRdGR21z9Yr2LAOxuOqYmja0kHz4xjh5TzVrBEPIt8NtDrq/L4bM88uxsWPjyQ=="}],"vote":"eyJjaGFubmVsIjoibGF1cmVud2Fncy5naXRodWIuaW8iLCJ0eXBlIjoiYXV0by1jb250cmlidXRlIn0="}

followed shortly by

[ RESPONSE - OnRedeemTokens ]
> Url: https://payment.rewards.bravesoftware.com/v1/votes
> Result: Success
> HTTP Code: 200
> Body: 
> Header accept-ranges: bytes
> Header content-length: 0
> Header content-type: application/json
> Header date: Mon, 15 Jun 2020 20:07:40 GMT
> Header request-id: brjta30h2k1c143hhct0
> Header status: 200
> Header via: 1.1 varnish
> Header x-cache: MISS
> Header x-cache-hits: 0
> Header x-ratelimit-limit: 1
> Header x-ratelimit-remaining: 0
> Header x-ratelimit-reset: 1
> Header x-request-id: GCEuFj2sHjWP79q4
> Header x-served-by: cache-ewr18160-EWR

@emerick
Copy link
Contributor

emerick commented Jul 3, 2020

Failed to repro on the latest master. Spoke with @NejcZdovc this morning and we agreed that since the problem is addressed in master and 1.11 is already close to release we can close this out.

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

No branches or pull requests

3 participants