uBlockOrigin / uAssets

Resources for uBlock Origin, uMatrix: static filter lists, ready-to-use rulesets, etc.
GNU General Public License v3.0
3.96k stars 744 forks source link

amazon.com: breakage #20795

Closed unforgettableid closed 9 months ago

unforgettableid commented 9 months ago

Prerequisites

Category

breakage

Description

Steps to reproduce

  1. 👉 Please set uBO to block all remote fonts by default. Otherwise, you cannot reproduce this breakage.
  2. Visit the URL: https://www.amazon.ca/Gut-Inside-Story-Underrated-Revised/dp/1771643765?asin=B0795B7M79&revisionId=78b45cab&format=1&depth=1
  3. Below the book cover image, click the white button labelled "Read sample".

Observed

  1. The book cover appears, but no sample.
  2. Perhaps 10 seconds later, Amazon eventually shows an error message: "Sorry, there was a problem loading this page."

Expected

I was hoping to view the book sample.

Notes

I've confirmed that this issue exists on amazon.com and amazon.ca. I'm not sure about Amazon's other websites.

I wonder if you could please add a rule to unbreak.txt. This new rule would always allow sufficient remote fonts so that all book samples are viewable.

Other extensions used

Blocksi Web Filter and Plucky Filter.

(Please forgive me for not having disabled them. For various reasons, I've left them both enabled. However, I'm pretty sure that I've narrowed the issue down enough to show that the breakage is caused solely by uBO.)

Configuration

```yaml uBlock Origin: 1.53.0 Chromium: 119 filterset (summary): network: 125595 cosmetic: 196318 scriptlet: 30178 html: 0 listset (total-discarded, last-updated): added: https://filters.adtidy.org/extension/ublock/filters/14.txt: 75324-118, 7m https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt: 94876-21822, 7m adguard-social: 22006-1618, 8m dpollock-0: 11584-2, 7m fanboy-cookiemonster: 48926-48926, 7m fanboy-social: 16210-16210, 7m fanboy-thirdparty_social: 68-18, 7m ublock-annoyances: 5887-216, 7m default: user-filters: 1172-1, never easylist: 75534-345, 7m easyprivacy: 32903-367, 7m plowe-0: 3718-1453, 7m ublock-badware: 7423-138, 7m ublock-filters: 35636-519, 7m ublock-privacy: 680-7, 7m ublock-quick-fixes: 115-38, 7m ublock-unbreak: 2155-36, 7m urlhaus-1: 9855-0, 7m filterset (user): [array of 1080 redacted] trustedset: added: [array of 160 redacted] removed: chrome-extension-scheme edge-scheme switchRuleset: added: [array of 186 redacted] hostRuleset: added: [array of 2 redacted] userSettings: [none] hiddenSettings: [none] supportStats: allReadyAfter: 371461 ms (selfie) maxAssetCacheWait: 8312 ms popupPanel: blocked: 147 no-remote-fonts: true network: amazon.ca: 102 amazon-adsystem.com: 1 amazon.com: 18 amazonaws.com: 1 b11v5ewz9l.execute-api.us-east-1.amazonaws.com: 4 d3fpmv3m8wlug6.cloudfront.net: 4 del51-p4.cloudfront.net: 1 media-amazon.com: 12 ssl-images-amazon.com: 4 extended: ##.author-follow-button ###navBackToTop ##.reviews-display-ad ###rhf ##.maple-banner ###nav-swmslot ##div[cel_widget_id*="_ad-placements-"] ##div[cel_widget_id*="desktop-dp-"] ##div[cel_widget_id^="adplacements:"] ##div[id^="sp_detail"] ##[id*="related"] ##[class*="related"] ##[aria-label="Back to top"] ##[id*="sidebar"] ```

Conclusion

Thank you!

okiehsch commented 9 months ago

With a default setup

Screenshot(s) ![image](https://github.com/uBlockOrigin/uAssets/assets/16838044/11394608-7636-4854-837e-c60ea12b781b)
gorhill commented 9 months ago

Please set uBO to block all remote fonts by default. Otherwise, you cannot reproduce this breakage.

If blocking remote fonts breaks the site, then don't block remote fonts on that site? This is an opt-in per-site switch, it's up to you to use it and not use it if it breaks a site.

gorhill commented 9 months ago

I wonder if you could please add a rule to unbreak.txt. This new rule would always allow sufficient remote fonts so that all book samples are viewable.

You can't bypass rules with filters, all rules have precedence over filters, and rules are to be used at your own discretion, by default none of them interfere with filters.

unforgettableid commented 9 months ago

Thank you for replying!

If blocking remote fonts breaks the site, then don't block remote fonts on that site? This is an opt-in per-site switch, it's up to you to use it and not use it if it breaks a site.

I've been using uBO for years. On many sites, blocking web fonts hides symbols, making site functionality harder to use. But this is the first time I've seen that blocking web fonts actually makes site functionality fail completely:

image

I had never dreamed that ticking the box to block web fonts by default would cause such breakage. It's easy for users to untick the box. However, it may be tricky for them to figure out that unticking the box is necessary.

Amazon is the 12th most popular website on the Internet. (Source.) So, this issue probably affects a fair number of users.

Proposed solutions

A.) If filters can't override rules, maybe the checkbox should not create the rule no-remote-fonts: * true. Instead, maybe the checkbox should create the filter *$font. That way, a new filter in unbreak.txt could then override the filter *$font, on Amazon's website only.

B.) Also, maybe the "block web fonts by default" checkbox on the settings page should be renamed. Perhaps it could be renamed to the following eight-word string: Block remote fonts (this may break some sites).

gorhill commented 9 months ago

https://github.com/gorhill/uBlock/wiki/Per-site-switches#no-remote-fonts

unforgettableid commented 9 months ago

Dear @gorhill:

I know that I can create an exception rule so that Amazon can load web fonts no matter what. Perhaps my main concern is for other users, who might not realize why Amazon book previews aren't loading.

I've proposed two possible solutions, above.