Brave-browser: inline tipping doesn't work under Twitter

Created on 11 Dec 2019  路  6Comments  路  Source: brave/brave-browser

Description

Inline tipping has stopped working under Twitter. When pressing the inline BAT button, you'll get the following errors in the browser console:

brave_rewards_panel_content_twitter.bundle.js:1 Failed to fetch tweet details for 1204589420617371649: Unexpected end of JSON input
(anonymous) @ brave_rewards_panel_content_twitter.bundle.js:1
Promise.catch (async)
l @ brave_rewards_panel_content_twitter.bundle.js:1
s.onclick @ brave_rewards_panel_content_twitter.bundle.js:1

brave_rewards_panel_content_twitter.bundle.js:1 Failed to fetch tweet metadata for [object HTMLDivElement]: SyntaxError: Unexpected end of JSON input
    at a (brave_rewards_panel_content_twitter.bundle.js:1)
(anonymous) @ brave_rewards_panel_content_twitter.bundle.js:1
Promise.catch (async)
s.onclick @ brave_rewards_panel_content_twitter.bundle.js:1

brave_rewards_panel_content_twitter.bundle.js:1 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.twitter.com/1.1/statuses/show.json?id=1204589420617371649 with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
a @ brave_rewards_panel_content_twitter.bundle.js:1
async function (async)
a @ brave_rewards_panel_content_twitter.bundle.js:1
(anonymous) @ brave_rewards_panel_content_twitter.bundle.js:1
l @ brave_rewards_panel_content_twitter.bundle.js:1
s.onclick @ brave_rewards_panel_content_twitter.bundle.js:1

You'll get the following errors in the terminal:

[79025:775:1210/223655.310171:INFO:CONSOLE(1)] "Failed to fetch tweet details for 1204604280180789248: Unexpected end of JSON input", source: chrome-extension://jidkidbbcafjabdphckchenhfomhnfma/out/brave_rewards_panel_content_twitter.bundle.js (1)

Seems like something was introduced in C79 that's causing the issue. Errors in the browser console are mentioning a CORS issue.

Steps to Reproduce

  1. install & launch 1.1.20 CR: 79.0.3945.74
  2. enable Rewards and login into https://twitter.com/
  3. attempt to tip users/tweets via inline tipping

Actual result:

Clicking on the BAT icon via inline won't do anything and will produce the above errors mentioned above via the browser console and the terminal.

Expected result:

Clicking on the BAT icon via inline on Twitter should display the tipping banner.

Reproduces how often:

100% reproducible when using the above STR.

Brave version (brave://version info)

Brave | 1.1.20 Chromium: 79.0.3945.74聽(Official Build)聽(64-bit)
-- | --
Revision | 99b6d241cf84f7fa7434ae8a59f9e74eb1464280-refs/branch-heads/3945@{#888}
OS | macOS Version 10.15.1 (Build 19B88)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Reproducible
  • Can you reproduce this issue with the beta channel? Reproducible
  • Can you reproduce this issue with the dev channel? Reproducible
  • Can you reproduce this issue with the nightly channel? Reproducible

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No, still reproducible
  • 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:

CCing @rebron @bsclifton @brave/legacy_qa @NejcZdovc

QA Pass-Linux QA Pass-Win64 QA Pass-macOS QTest-Plan-Specified QYes bug featurrewards prioritP2 regression release-noteinclude

All 6 comments

inline tipping for both Reddit and GH are working as expected - when clicking on the inline Tip button the tip banner displays.

Brave | 1.1.20 Chromium: 79.0.3945.74聽(Official Build)聽(64-bit)
-- | --
Revision | 99b6d241cf84f7fa7434ae8a59f9e74eb1464280-refs/branch-heads/3945@{#888}
OS | macOS Version 10.13.6 (Build 17G5019)

Reproduced on

Brave | 1.1.20 Chromium: 79.0.3945.74聽(Official Build)聽(64-bit)
-- | --
Revision | 99b6d241cf84f7fa7434ae8a59f9e74eb1464280-refs/branch-heads/3945@{#888}
OS | Ubuntu 18.04 LTS

After speaking with @rebron and @bbondy, we'll move this out of it's not completed by the time https://github.com/brave/brave-browser/issues/7314 is done. We'll want to get the CR out ASAP whenever it's available.

Not sure if it's related, but I noticed that Brave (on Android at least) isn't targeting the correct Twitter user when opening the rewards panel while on someone's profile. For instance, if I go to my Twitter profile, and click the rewards button, it shows the information for a different user's profile that I had accessed the other day (even though I'm verified and all). Let me know if it's not related and I'll create a new issue if one doesn't exist.

Screenshot_20191212-150130

Also noticed (and I'm sure you get this a lot) that @brave itself isn't verified (on GH at least).

Screenshot_20191212-145407

Fixed with https://github.com/brave/brave-core/pull/4215

cc: @SergeyZhukovsky @samartnik @AlexeyBarabash RE: the above Android issue

Verification passed on

Brave | 1.1.21 Chromium: 79.0.3945.79聽(Official Build)聽(64-bit)
-- | --
Revision | 29f75ce3f42b007bd80361b0dfcfee3a13ff90b8-refs/branch-heads/3945@{#916}
OS | Windows聽7 Service Pack 1 (Build 7601.24530)

Verified test plan from the description and https://github.com/brave/brave-core/pull/4215.
Verified that I was able to tip the publisher.
Verified that the tip was visible under Tips on brave://rewards

Verification passed on

Brave | 1.1.21 Chromium: 79.0.3945.79聽(Official Build)聽(64-bit)
-- | --
Revision | 29f75ce3f42b007bd80361b0dfcfee3a13ff90b8-refs/branch-heads/3945@{#916}
OS | Ubuntu 18.04 LTS

Verified test plan from the description and https://github.com/brave/brave-core/pull/4215.
Verified that I was able to tip the publisher.
Verified that the tip was visible under Tips on brave://rewards

Verified passed with

Brave | 1.1.21 Chromium: 79.0.3945.79聽(Official Build)聽(64-bit)
-- | --
Revision | 29f75ce3f42b007bd80361b0dfcfee3a13ff90b8-refs/branch-heads/3945@{#916}
OS | macOS Version 10.13.6 (Build 17G5019)

  • Verified test plan from https://github.com/brave/brave-core/pull/4215
  • Verified able to see custom banner data when tipping from panel
    Screen Shot 2019-12-13 at 9 22 53 AM
  • Verified normal banner displayed as well:
    Screen Shot 2019-12-13 at 9 23 25 AM

  • Verified able to tip Twitter publishers from panel and tips displayed in Tips panel on brave://rewards
    Screen Shot 2019-12-13 at 9 24 03 AM

  • Verified in-line tipping for Twitter, Reddit, and GH showed the expected banners (encountered https://github.com/brave/brave-browser/issues/5562 for in-line tipping on GH) and am able to tip on each of these sites:
    Screen Shot 2019-12-13 at 9 39 00 AM
    Screen Shot 2019-12-13 at 9 42 59 AM
    Screen Shot 2019-12-13 at 9 45 48 AM

Verification PASSED on macOS 10.15.1 x64 using the following build:

Brave | 1.1.21 Chromium: 79.0.3945.79聽(Official Build)聽(64-bit)
-- | --
Revision | 29f75ce3f42b007bd80361b0dfcfee3a13ff90b8-refs/branch-heads/3945@{#916}
OS | macOS Version 10.15.1 (Build 19B88)

Note: Used Production instead of Staging

  • Verified test plan from the description and https://github.com/brave/brave-core/pull/4215.
  • Verified that I was able to tip the publisher.
  • Verified that the tip was visible under Tips on brave://rewards
  • also checked GH & Reddit re: inline tipping
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathansampson picture jonathansampson  路  3Comments

AlexCombas picture AlexCombas  路  3Comments

traffisco picture traffisco  路  3Comments

bsclifton picture bsclifton  路  3Comments

simonhong picture simonhong  路  3Comments