Skip to content

Error shown for filters in AdGuard-specific preprocessor block #4144

Description

@Stevoisiak

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

Filters inside Adguard-only preprocessor directive blocks, (ie: !#if adguard), can display errors when viewing the content of a filter list or the "My Filters" tab.

Image

A specific URL where the issue occurs.

extension://odfafepnkmbhccpbejgmiehpchacaeak/asset-viewer.html?url=https%3A%2F%2Fgist.githubusercontent.com%2FStevoisiak%2Faf471c390bf225a96b969737e8044bac%2Fraw%2Fe9a19222e2f2bbeaf3c2da6966f69ec30c298d2f%2Fpreprocessor-adguard-error-in-ubo.txt

Steps to Reproduce

  1. Open "Filter lists" tab in uBO
  2. Import filter list from URL https://gist.githubusercontent.com/Stevoisiak/af471c390bf225a96b969737e8044bac/raw/e9a19222e2f2bbeaf3c2da6966f69ec30c298d2f/preprocessor-adguard-error-in-ubo.txt
    ! Title: uBO Adguard-specific preprocessor error
    !#if adguard
    jsfiddle.net##.error:has-text(Can't complete code. Error code: Failed to fetch.)
    !#else
    jsfiddle.net##.error:has-text("Can't complete code. Error code: Failed to fetch.")
    !#endif
    
  3. Click "View content" on newly imported filter list

Expected behavior

No errors are listed, as the only "erroneous" filter will never run in uBlock Origin.

Troubleshooting information

uBlock Origin: 1.75.0
Chromium: 154
filterset (summary):
 network: 189178
 cosmetic: 164521
 scriptlet: 49010
 html: 0
listset (total-discarded, last-updated):
 added:
  https://codeberg.org/just_a_husk/uBlockOrigin-AI-Blocklist/raw/branch/main/list.txt: 15977-0, 14h.39m
  https://raw.githubusercontent.com/Stevoisiak/Annoyance-Blocklist/refs/heads/main/annoyance-blocklist.txt: 326-0, 14h.39m
  https://raw.githubusercontent.com/alvi-se/ai-ublock-blacklist/refs/heads/master/list.txt: 2741-120, 13h.29m
  https://raw.githubusercontent.com/cevvalkoala/CevvalYoutubeAIBlocklist/refs/heads/main/CevvalYoutubeAIblocklist.txt: 1901-12, 2d.14h.46m
  fanboy-cookiemonster: 59266-11228, 7d.12h.36m
  ublock-cookies-easylist: 5855-107, 12h.29m
  adguard-social: 27122-48, 14h.29m
  fanboy-social: 17958-897, 5d.13h.35m
  fanboy-thirdparty_social: 69-0, 3d.13h.6m
  adguard-mobile-app-banners: 8040-23, 14h.29m
  easylist-newsletters: 9628-30, 12h.29m
  easylist-notifications: 2557-448, 12h.29m
 default:
  user-filters: 4-0, never
  ublock-filters: 53680-95, 2h.32m Δ
  ublock-badware: 10341-17, 2h.32m Δ
  ublock-privacy: 4171-4, 2h.32m Δ
  ublock-unbreak: 2834-1, 2h.32m Δ
  ublock-quick-fixes: 566-0, 2h.32m Δ
  easylist: 86085-491, 2h.32m Δ
  easyprivacy: 56766-752, 2h.32m Δ
  urlhaus-1: 47685-11, 2h.32m
  plowe-0: 3550-0, 7d.19h.37m
filterset (user): [array of 8 redacted]
trustedset:
 added: [array of 5 redacted]
switchRuleset:
 added: [array of 1 redacted]
userSettings:
 advancedUserEnabled: true
 userFiltersTrusted: true
hiddenSettings:
 trustedListPrefixes: ublock- https://raw.githubusercontent.com/Stevoisiak/Stevos-AI-Blocklist/
supportStats:
 allReadyAfter: 143 ms (selfie)
 maxAssetCacheWait: 64 ms
 cacheBackend: indexedDB

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions