Inconsistent behavior of subscriptions.sync() under Manifest v3
Environment
- Browser and full version: Chrome 105.0.5195.125
- Extension using this toolkit: test-mv3
- Commit hash: a92fb2c5
Steps to reproduce
- Run
recs = await EWE.subscriptions.getRecommendations()
. - Run
await EWE.subscriptions.add(recs[0].url)
. - Run
await EWE.subscriptions.add(recs[1].url)
. - Run
await EWE.subscriptions.sync(recs[0].url)
. - Run
await EWE.subscriptions.sync()
.
Actual behavior
- After 2) One HEAD request is made.
- After 3) One HEAD request is made.
- After 4) One HEAD request is made.
- After 5) No requests are made.
Expected behavior
- After 2) One HEAD request is made.
- After 3) One HEAD request is made.
- After 4) One HEAD request is made.
- After 5) Two HEAD requests are made.
Further information
For comparison, here's the observed behavior using the test-mv2 build:
- After 2) One GET request is made.
- After 3) One GET request is made.
- After 4) One GET request is made.
- After 5) Two GET requests are made.
Note that EWE.subscriptions.sync()
under Manifest v3 does download the "ABP filters" filter list for some reason, because it's a DownloadableSubscription
rather than a CountableSubscription
, which is a piece of information that's currently not exposed to the product.
Integrator Notes
-
EWE.subscriptions.sync
now returns a promise. Note that this promise resolves when syncing has been successfully triggered, not when it has completed.
Edited by Justin Wernick