Troubleshooting
The most common problems, their symptoms in your logs and their solutions.
The SDK never takes your application down: when something goes wrong, the request goes through and a message appears in your logs, prefixed with [zarex] or starting with Request allowed without protection. Each section below quotes the exact message as it appears in your logs: search for it on this page (Ctrl+F).
The application refuses to start: ipSource missing
Message: ipSource is required.
With Next.js or Bun, outside Vercel, Fly.io and Cloudflare Workers, Zarex cannot guess where to read the visitor's address. Set ipSource: see The visitor's IP address.
No decision shows up in the decision log
Check the key
Message: check your API key (revoked, wrong environment, or typo). The key is missing, miscopied or revoked. Check ZAREX_KEY on the server, and that the key belongs to the project shown in the dashboard.
Check the IP address
Message: The visitor's IP could not be determined or remote address is unknown. Zarex did not find the visitor's address, the request was not checked. That is the case with Next.js locally, or with an ipSource that does not match your hosting: see The visitor's IP address.
Check that the route goes through Zarex
The middleware or hook must cover the route being called. With Next.js, withZarex only protects the handler it wraps.
Decisions show up in the decision log a few seconds after the requests.
All my visitors are blocked together by the rate limit
All your visitors seem to come from the same address: your proxy's. Possible messages: every visitor will look like the proxy's address, The engine received a private/local/shared IP address. Set ipSource (or trust proxy with Express) to match your hosting.
If the setting is right but many users share an address (mobile network, company Wi-Fi), limit per account with characteristics: see Do not rely on the IP address alone.
An attack gets through while the rule is active
- Is the rule in
DRY_RUN? It logs but never blocks. - Is the attack in the request body? Enable
inspectBody. With Express, place Zarex afterexpress.json(); with Fastify, use thepreHandlerhook, notonRequest. - In a cookie? Enable
inspectCookies. - Was the request checked? If the decision is
degraded, Zarex could not decide: see the previous sections.
A real visitor is blocked
Ask them for the decision identifier (if you return it in onDeny), or search for their address in the decision log: the details show which rule blocked, and why. Depending on the case:
- switch the rule to
DRY_RUNwhile you adjust it; - for the Shield, set
thresholdafter observing your traffic; - for a filter, add an
ALLOWcondition; - for email validation, add the domain to
allowDomains.
Monthly quota used up message
Message: your plan's monthly quota is used up.
Despite its wording, this message does not appear when you exceed your plan: beyond it, Zarex keeps inspecting your requests. It means your account's technical ceiling is reached (all decisions of the month, 10 times your plan on Free, 20 times on paid plans): requests go through without inspection until the next month. Write to us, and see Account and quota. Since 0.2.0, the SDK writes a more precise message: technical ceiling is reached.
Zarex no longer answers: calls paused
Message: the engine failed repeatedly; calls are paused briefly.
Zarex did not answer several times in a row: the SDK lets requests through without waiting during a short pause, then retries. Your site stays online. If the message persists, check that your server can reach the Internet over HTTPS.
The timeout
If Zarex does not answer in time, the SDK lets the request through (degraded decision, reason timeout). Since 0.2.2, the SDK keeps its connection to Zarex open and allows more time for the first call: if you often see timeout, first update the SDK, then check that your server reaches the Internet without a slow intermediary (corporate proxy, VPN).