Bug 298199
| Summary: | dNR: rules are not applied when cold-launching the browser | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | rhill |
| Component: | WebKit Extensions | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | timothy, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 18 | ||
| Hardware: | All | ||
| OS: | All | ||
rhill
This happens on iOS and macOS. Given that to steps to reproduce require to cold-launch the browser, this requires to install the official version of the extension, as this cannot be reproduced using temporary extension, which by design are not persistent across browser launch.
Steps to reproduce:
- Install uBlock Origin Lite from App store:
https://apps.apple.com/us/app/ublock-origin-lite/id6745342698
- Navigate to:
https://ublockorigin.github.io/uBOL-home/tests/test-filters.html
- Observe that all tiles in "uBO Lite Test Page" are all red, as expected since no filters apply on this page
- Open uBO Lite dashboard by clicking the gear icon in the popup panel
- Bring up "Filter lists" pane and enable "uBO Lite Test Filters" under "Miscellaneous" section, which you may need to expand
- Wait for the rulesets to be re-compiled (spinner near the top of the page will go away)
- Go back to "uBO Lite Test Page" tab
- Force a reload of the page
- Observe that all the tiles in the two top sections are now green (except for one, as expected since it relates to not yet supported DNR rule syntax)
Completely quit Safari -- be sure that "uBO Lite Test Page" is the current tab when quitting:
- On macOS, select "Quit Safari" option under "Safari" menu
- On ipadOS, tap the 3-dot menu at the top of the browser window, then select "Close"
- On iOS: I do not have access to an iPhone, but there are users who do have reported the issue to uBO Lite issue tracker:
https://github.com/uBlockOrigin/uBOL-home/issues/428
Launch Safari again:
The default tab being loaded should be "uBO Lite Test Page". Observe that all the tiles in the top two sections are now red: this is not expected, as the DNR API guarantees that enabled rulesets are enforced at browser launch[1]:
> The set of enabled static rulesets is persisted across sessions
This issue does not exist when with the same extension under Blink or Gecko platforms.
---
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest#rulesets
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/159613083>