Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with chrome.declarativeNetRequest Not Blocking Requests Over Time #492

Closed
tombenattar opened this issue Nov 23, 2023 · 2 comments
Closed

Comments

@tombenattar
Copy link

Hi there,

I'm working on an email tracking extension for Gmail, utilizing the chrome.declarativeNetRequest API. Our extension Manifest V3 aims to block certain network requests when users open emails, ensuring these opens aren't counted by our tracking system.

We employ both Dynamic and Static Rules for this purpose. The Static Rules are a fallback to handle scenarios where the JavaScript might not be loaded.

However, we've encountered a recurring issue reported by several users. After Chrome has been open for an extended period, it appears that our blocking rules stop functioning, and the requests that should be blocked are getting sent.

Here are some specific details:

  • Rule Example: { id: 2, priority: 1, action: { type: "block" }, condition: { urlFilter: "pixeluser=" + user.id + "&end=1*", resourceTypes: ["image"] } }
  • Issue Observation: The rule works as expected initially but fails after Chrome has been active for a long time.
  • Configuration: We're using a mix of Dynamic and Static Rules, with the latter as a backup.

I'm looking for insights or suggestions on the following:

  1. Are there known issues with chrome.declarativeNetRequest in relation to browser uptime?
  2. Could this be related to rule limits, caching, or service worker interactions?
  3. Any best practices or troubleshooting steps recommended for such a scenario?

Any assistance or guidance would be greatly appreciated.

@dotproto
Copy link
Member

Related discussion on the chromium-extensions google group: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/kGdHMCq-yTc/m/HwbX0_PLBAAJ

@Rob--W
Copy link
Member

Rob--W commented Nov 23, 2023

This sounds like a Chrome-specific issue and not a flaw in the DNR API design. Please file a bug at https://crbug.com instead of here. The list of browser-specific issue trackers can be found at #155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants