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

BAT for tip withdrawn twice if internet connection lost after tipping #2297

Closed
LaurenWags opened this issue Nov 29, 2018 · 9 comments
Closed

Comments

@LaurenWags
Copy link
Member

Description

Found while testing #1483

If you tip a site and immediately lose internet connection, when you come back online you'll see that your wallet balance has gone down by the amount of the tip, but no tip is recorded. If you wait a couple minutes, you see your wallet balance go down again, and your tip is recorded (once).

Steps to Reproduce

  1. Fresh profile with 0.56.8.
  2. Enable Rewards, claim grant.
  3. Navigate to a site.
  4. Tip the site and immediately cut wifi/internet.
  5. Wait a few minutes.
  6. Enable wifi/internet again.

Actual result:

When internet returns, your balance is less the tip amount (mine was 1BAT), but no tips displayed in tips panel or Rewards Summary. If you wait a couple more minutes --> wallet balance goes down again (the amount of the tip) and now a single tip is displayed in Tips panel/Rewards Summary.

screen shot 2018-11-29 at 4 49 01 pm

screen shot 2018-11-29 at 5 02 52 pm

Expected result:

Tip should only be deducted from balance once, not twice.

Reproduces how often:

easily

Brave version (brave://version info)

Brave 0.57.8 Chromium: 71.0.3578.53 (Official Build) beta(64-bit)
Revision 599fb72e740eab9d10609f1ed28a2ad669f82c1a-refs/branch-heads/3578@{#669}
OS Mac OS X

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? yes

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields? n/a
  • Is the issue reproducible on the latest version of Chrome? n/a

Additional Information

cc @brave/legacy_qa to check other platforms

@GeetaSarvadnya
Copy link

Issue is reproducible on Win also - 0.57.8. Tip amount was 10 BAT for my test

image

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Nov 30, 2018

Issue is reproducible on Linux as well - 0.57.8. Tip amount was 1 BAT for this test.

image

@kjozwiak
Copy link
Member

kjozwiak commented Dec 4, 2018

Good find @LaurenWags 👍 IMO, this should be a P2 at the very least even though it's a corner case. We should never be dinging users twice for a single tip. This will become a lot more noticeable when users start using larger tip amounts.

@NejcZdovc NejcZdovc added the priority/P2 A bad problem. We might uplift this to the next planned release. label Dec 4, 2018
@rebron rebron modified the milestone: 1.x Backlog Feb 7, 2019
@LaurenWags
Copy link
Member Author

Encountered again while testing #3052 which changes retry logic for tips. Here's what I'm seeing:

  • Fresh profile with 0.60.28 (used staging env).
  • Enable Rewards, claim grant.
  • Navigate to a site.
  • Tip the site and immediately cut wifi/internet.
  • Wait a few minutes. Get notification about Tip unable to go thru.
  • Enable wifi/internet again.
  • Balance goes down by the amount of the tip, but no tip is recorded. It is expected that no tip is recorded because you received the notification about the tip is unable to go thru. However, my balance should not have gone down at all.

@NejcZdovc NejcZdovc added needs-more-info The report requires more detail before we can decide what to do with this issue. and removed priority/P2 A bad problem. We might uplift this to the next planned release. labels Apr 10, 2019
@ryanml
Copy link
Contributor

ryanml commented Apr 10, 2019

@LaurenWags are you able to see if you can reproduce on latest master and nightly and list your STR? I have had a hard time trying to repro this one, and last I checked on was 0.64. (Note I also tried issuing a keyboard interrupt in addition to just cutting my network connection, same results). Thank you!

@LaurenWags
Copy link
Member Author

@ryanml I reproduced on latest nightly available on macOS:

Brave 0.65.28 Chromium: 74.0.3729.61 (Official Build) nightly(64-bit)
Revision 5df2c8936783bd7575987e45d72a92fcf528496b-refs/branch-heads/3729@{#645}
OS Mac OS X
  1. Fresh profile with 0.65.28 (used staging env - launched with --rewards=staging=true)
  2. Enable Rewards, claim grant.
  3. Navigate to a site (used ddg as it's verified on staging)
  4. Tip the site and immediately cut wifi/internet. I did this by clicking on the wifi symbol on my top menu bar on macOS and selecting 'Turn WiFi Off'.
  5. Wait a few minutes. Note, this time I did not get notification about how Tip was unable to go thru.
  6. Enable wifi/internet again.
  7. Balance goes down by the amount of the tip, but no tip is recorded on wallet summary or in Tips table.

Is there any other info I can provide? Maybe launch with additional parameters from terminal?

@NejcZdovc
Copy link
Contributor

@LaurenWags so it didn't tip twice now, the only problem now was that transaction was not recorded?

@LaurenWags
Copy link
Member Author

Tried it again @NejcZdovc and this time the tip did happen twice (but was only recorded once, so could be something to do with timing and I didn't wait long enough last time I tried.

@NejcZdovc
Copy link
Contributor

NejcZdovc commented Apr 10, 2020

closing as we changed contribution flow completely. Please reopen if still a problem after SKU work lands

@NejcZdovc NejcZdovc added this to the Dupe / Invalid / Not actionable milestone Apr 10, 2020
@NejcZdovc NejcZdovc added closed/not-actionable and removed QA/Test-Plan-Specified QA/Yes bug needs-more-info The report requires more detail before we can decide what to do with this issue. labels Apr 10, 2020
@bbondy bbondy removed this from the Dupe / Invalid / Not actionable milestone May 30, 2020
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

7 participants