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

twitter banner/tipping mismatch issues #5580

Closed
LaurenWags opened this issue Aug 7, 2019 · 12 comments
Closed

twitter banner/tipping mismatch issues #5580

LaurenWags opened this issue Aug 7, 2019 · 12 comments

Comments

@LaurenWags
Copy link
Member

Description

Sometimes when tipping a Twitter user, there is a mismatch of information on the tip banner, the thank you banner, and if applicable, pending contributions (potentially tips panel as well).

Steps to Reproduce

  1. Clean profile.
  2. Enable Rewards. Fund wallet or restore a wallet. (I didn’t use KYC’d wallet here, using anon wallet.)
  3. Login to Twitter.
  4. Navigate to a user’s twitter page.
  5. Click on in-line tip button and tip user (user I tipped unverified, not sure if it matters).
  6. Navigate to a different user’s twitter page.
  7. Click on in-line tip button, view banner, but don’t tip.
  8. Repeat steps 6-7 several times until you see a mismatch of info on Tipping banner.
  9. Once you see the mismatch, actually tip.
  10. Mismatch is displayed on thank you banner as well.
  11. Furthermore, if you tipped an unverified pub in step 5/9, when you go to view your pending contributions, there’s a serious mismatch - it looks like you tipped one of the people from the banner, but when you click on the Site in the table, you’ll be taken to a page with your own info.

Actual result:

Gif picks up from step 8 above:

twittermismatch-dev

Note that when the tip banner displays, there's a mix of info for bcrypt and torproject. After tipping when the thank you banner comes up, it says bcrypt but you were trying to tip torproject.
When you go to pending contributions table and click on the sites, it looks like bcrypt is listed, however when you click on the site in the table, you see your own info. (bcrypt was who I tipped in step 5 btw)

Expected result:

All info on tipping banner, thank you banner, and pending contributions (or actual tip table), should be for the intended recipient.

Reproduces how often:

easily

Brave version (brave://version info)

Brave 0.69.100 Chromium: 76.0.3809.87 (Official Build) dev (64-bit)
Revision 111fe1e15d5ced26080a7dc239bcfe70f6c49aad-refs/branch-heads/3809@{#967}
OS Mac OS X
Brave 0.70.44 Chromium: 76.0.3809.100 (Official Build) nightly (64-bit)
Revision ed9d447d30203dc5069e540f05079e493fc1c132-refs/branch-heads/3809@{#990}
OS Mac OS X

Version/Channel Information:

  • Can you reproduce this issue with the current release? no, could not reproduce on 0.67.x
  • Can you reproduce this issue with the beta channel? no, could not reproduce on 0.68.x
  • Can you reproduce this issue with the dev channel? yes, reproduced on 0.69.x
  • Can you reproduce this issue with the nightly channel? yes, reproduced on 0.70.x

Other Additional Information:

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

Miscellaneous Information:

cc @mandar-brave @NejcZdovc @brave/legacy_qa

@LaurenWags LaurenWags added bug feature/rewards priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes QA/Test-Plan-Specified labels Aug 7, 2019
@kjozwiak
Copy link
Member

kjozwiak commented Aug 8, 2019

Reproduced this several on macOS 10.14.5 x64 using the following build:

Brave 0.70.46 Chromium: 76.0.3809.100 (Official Build) nightly (64-bit)
Revision ed9d447d30203dc5069e540f05079e493fc1c132-refs/branch-heads/3809@{#990}
OS Mac OS X

Screen Shot 2019-08-08 at 7 34 58 PM

Screen Shot 2019-08-08 at 7 35 06 PM

Screen Shot 2019-08-08 at 7 37 19 PM

Screen Shot 2019-08-08 at 7 37 28 PM

Other examples:

Screen Shot 2019-08-08 at 3 42 29 AM

Screen Shot 2019-08-08 at 3 54 48 AM

@jdkuki
Copy link

jdkuki commented Aug 8, 2019

Not able to recreate on

Brave 0.70.9 Chromium: 76.0.3809.72 (Developer Build) (64-bit)
Revision 5a04c669126f657f98824b436555cae41b8f4146-refs/branch-heads/3809@{#897}
OS Ubuntu 19.10

I have a feeling this is because my linux build is too slow and problem is most likely race condition from tabs_api setting state via getProfileUrl.

Is issue reproduced if 10-15s of wait time is held between page navigation?

@kjozwiak
Copy link
Member

kjozwiak commented Aug 9, 2019

I reproduced one of the cases several times using the following STR @jdkuki:

  • launch 0.70.49 Chromium: 76.0.3809.100 (should be creating a brand new profile)
  • under the tab that has the welcome page opened, click on the BAT icon --> Join Rewards
  • load http://twitter.com and login
  • once the page loads, quickly type mandar under Search Twitter on the top right
  • click on mandar via the search results
  • once https://twitter.com/Mandarstwit loads, click on the BAT icon with the verified checkmark

You'll notice the following:

Screen Shot 2019-08-08 at 7 34 58 PM

Screen Shot 2019-08-08 at 7 35 06 PM

Screen Shot 2019-08-08 at 7 37 28 PM

Screen Shot 2019-08-08 at 7 37 19 PM

Sending a tip in this state will send the tip my way and not @mandar-brave. However, all the UI components look like the funds should be going to @mandar-brave. You can tell that the tipping banner has 5, 10, 20 BAT listed which is incorrect as @mandar-brave has 1, 5, 10 BAT set.

@emerick
Copy link
Contributor

emerick commented Aug 9, 2019

@jdkuki Definitely make sure you're signed in on Twitter, as I suspect this problem is tied to new Twitter and you have to be signed in to get that.

@emerick
Copy link
Contributor

emerick commented Aug 9, 2019

@NejcZdovc @jdkuki I think there's a disconnect when we're saving the publisher info so that we end up with the media key pointing to the wrong user ID. I noticed that there are two ways to call SavePublisherInfo in twitter.cc. One happens when you tip and one happens when you visit a Twitter URL. In the first case we have the screen name and user ID available to us and it all works as you'd expect. In the second case, I think we're scraping the DOM for the user ID and that leads to this problem.

@jdkuki
Copy link

jdkuki commented Aug 9, 2019

Was not able to reproduce exactly but have this issue:

  1. Clean profile
  2. Open twitter / login
  3. Go to any profile page
  4. Click BAT Panel icon (do not click inline tip button)
  5. BAT Panel will be blank

Looks like BAT panel / page browsing doesn't create publisher_key in the format it expects to read.

If you click an inline tip button for user, then go back to their profile page and click panel button, correct info shows up.

@mandar-brave
Copy link

thanks @jdkuki - do you believe the issue above can potentially be causing the issue here?

@jdkuki
Copy link

jdkuki commented Aug 9, 2019

not 100% sure but seems like two sides of the same coin

@LaurenWags
Copy link
Member Author

LaurenWags commented Sep 11, 2019

Reviewed this on a call with @NejcZdovc

Unable to reproduce with

Brave 0.72.11 Chromium: 77.0.3865.65 (Official Build) nightly (64-bit)
Revision 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS macOS Version 10.13.6 (Build 17G5019)

But able to easily reproduce with

Brave 0.69.125 Chromium: 76.0.3809.132 (Official Build) (64-bit)
Revision fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS Mac OS X

We should check 0.69.x when Chromium 77 lands in that branch, see if the issue still reproduces.
cc @kjozwiak @rebron

@kjozwiak
Copy link
Member

kjozwiak commented Oct 2, 2019

@LaurenWags mind going through the above and see if you can reproduce using 0.69.x? I spent ~2hrs going through the above cases using 0.69.131 CR: 77.0.3865.90 and couldn't reproduce.

Used both anon and KYC accounts for the following cases:

I also made sure that the Twitter ID's are correctly being added into the DB via:

  • visiting a new user via their page and clicking on the panel
  • clicking on a new user via clicking inline tipping and bringing up the banner
  • tipping via both inline and panel (using anon & KYC methods)

Ensured the Twitter's ID are correctly being added in publisher_info_db:

Screen Shot 2019-10-01 at 9 26 05 PM

Screen Shot 2019-10-01 at 9 24 24 PM

@LaurenWags
Copy link
Member Author

Unable to reproduce with

Brave 0.69.131 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS macOS Version 10.13.6 (Build 17G5019)

@NejcZdovc
Copy link
Contributor

thank you are for really pushing hard on testing this one. Will close it for now and let's reopen it if we still have problems

@NejcZdovc NejcZdovc added closed/not-actionable and removed QA/Test-Plan-Specified QA/Yes bug priority/P2 A bad problem. We might uplift this to the next planned release. labels Oct 2, 2019
@NejcZdovc NejcZdovc added this to the Dupe / Invalid / Not actionable milestone Oct 2, 2019
@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