requestly / requestly/interceptor
[ENGG-1977] MV3: 2KB limit for regexFilter in DNR
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 87
- Forks
- 23
- Avg merge
- 14h
- Merged PRs (30d)
- 3
Description
When creating host regex rules Unchecked runtime.lastError: Rule with id 1 was skipped as the "regexFilter" value exceeded the 2KB memory limit when compiled. Learn more: https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest#regex-rules
Possible Solutions
1. Using URL source conditions instead of HOST source conditions
If you are using HOST - EQUALS | CONTAINS | MATCHES | WILDCARD, then try switching it to URL source condition.
2. Try using Redirect Rule
Almost all the usecases that are supported by replace rule are also supported by Redirect Rule . Try creating a redirect rule instead
Some patterns to convert Replace rule into Redirect rule
Pattern 1
Current Replace Rule
Converted Redirect Rule
Pattern 2
Current Replace Rule
Converted Redirect Rule
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Chrome declarativeNetRequest error with host-based regex rules and review the linked regex-rules documentation. Compare the suggested URL source conditions and redirect-rule approach against the affected replace-rule use cases. Done means supported rules no longer exceed the 2KB compiled regexFilter limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100