GuideHelp
Troubleshooting
A rule is not hitting, headers are not applied, a redirect loops — the usual causes and fixes.
The rule does not hit
| Check | Fix |
|---|---|
| Global switch off | Turn it on in the popup or the panel top bar |
| Project disabled | Enable the project in the sidebar |
| Rule disabled or dimmed | Hover the rule — the tooltip names the reason (quota, plan) |
| An earlier rule wins | Rules match in order and the first enabled hit wins — move the specific rule above the broad one |
| Wrong method | A rule set to GET never matches a POST; use ALL if you are unsure |
| Path vs full URL | Exact compares the whole string — use Contains or Path params for dynamic paths |
| Query string in the pattern | Contains /api/users matches ?page=2 too; Exact does not |
| Conditions too strict | All conditions must match — check header casing and body dot paths |
| Already-loaded data | The page cached the response — hard reload (⇧⌘R) or clear the app cache |
It worked before, now it does not
- Service worker cache — a PWA can serve the response itself; unregister it in DevTools → Application.
- Chrome’s own overrides — check DevTools → Network → Overrides; two tools answering the same request is confusing but harmless.
- Extension reloaded — after an update, already-open tabs stop seeing the injected script until reloaded.
Headers or Redirect do nothing
- The rule is marked Inactive — the tooltip gives the compile reason (invalid regex, protected header, empty target, unsupported method).
- The request never reaches the browser’s network request layer — a page service worker or an in-memory cache answered it. Use Mock for those.
- The redirect target is an
httpaddress from anhttpspage — the browser blocks it except for localhost. - A CORS error appeared after the redirect — add a Headers rule with the CORS preset, and remember cookies follow the target domain.
The page reloads forever
Two redirect rules pointing at each other, or a substitution that keeps growing the URL, form an endless loop. The panel flags the chain on the rule before it bites. Disable one rule in the chain, or make the target resolve to the current URL — the browser skips a redirect that changes nothing.
A JS Hook fails
| Message | Cause |
|---|---|
import() always fails | The sandbox CSP only allows the extension’s own files — use context.loadScript(url) with a UMD build |
| ES module cannot run | Pass an IIFE / UMD build (*.min.js), not an ESM bundle |
req is not defined | Hooks take a single context argument — use context.req / context.res |
| Execution timed out | The hook never returned or awaited forever — add a timeout or simplify the code |
Storage and quota
- “Could not save your rules” — the 10 MB extension storage is full. Export a backup, then delete unused rules, large bodies or long JS hooks.
- “N not taking effect” — you are over the Free quota. Disable or delete rules, or upgrade.
- Import was trimmed — the report after the import lists what was dropped; split the file and import in parts.
Still stuck
Email support with the rule exported (panel → Export), the page URL pattern, the expected and actual response, and your Chrome version. Do not paste cookies, tokens or customer data — redact them first.
Stuck, or need something clarified? support@mockrew.com·Terms of Service