inline tipping doesn't work under Twitter
See original GitHub issueDescription
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
- install & launch
1.1.20 CR: 79.0.3945.74
- enable
Rewards
and login into https://twitter.com/ - 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:
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
About Tips and tipping - Twitter Help Center
You can tip to show support, show appreciation, help out or reward anyone you want – from emerging creators and journalists to Twitter...
Read more >Custom Audiences - Twitter for Business
If your Custom Audience is under 100 Twitter users, it will display as "Audience too small" and will not be available for selection....
Read more >Our range of enforcement options for violations | Twitter Help
Learn about various levels at which we may take action, what happens, and how you can appeal an account suspension.
Read more >List Custom Audiences - Twitter for Business
If your List Custom Audience is under 100 Twitter users, it will display as "Audience too small" and will not be available for...
Read more >Working with Web Intents - Twitter Developers
Web Intents provide flows for working with Tweets & Twitter Users: Tweet, Reply, Retweet, ... If a viewer does not have a Twitter...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Verification passed on
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
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
Verified test plan from https://github.com/brave/brave-core/pull/4215
Verified able to see custom banner data when tipping from panel
Verified normal banner displayed as well:
Verified able to tip Twitter publishers from panel and tips displayed in Tips panel on brave://rewards
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:
Verification PASSED on
macOS 10.15.1 x64
using the following build:Note: Used
Production
instead ofStaging
brave://rewards
Fixed with https://github.com/brave/brave-core/pull/4215
cc: @SergeyZhukovsky @samartnik @AlexeyBarabash RE: the above Android issue