Common Issues
Start here: Run nat doctor to quickly validate your environment β Python version, dependencies, database, config, and exporter connectivity. See the Environment Doctor guide for details.
Installation issues
pip install nat-engine fails
Symptom: Error during pip install, such as Could not find a version that satisfies the requirement nat-engine.
Solutions:
- Check Python version:
python --versionβ requires Python 3.10+ - Upgrade pip:
pip install --upgrade pip - Try installing in a fresh virtual environment:
python3 -m venv .venv && source .venv/bin/activate pip install nat-engine
nat: command not found after installation
Symptom: nat command is not found even after a successful pip install.
Solutions:
- If installed in a virtual environment, activate it first:
source .venv/bin/activate - Check if the pip scripts directory is in your PATH:
Add it to your PATH if missing.
python3 -m site --user-scripts # Shows the scripts directory - Try running via Python module:
python3 -m nat --version
nat doesn't recognize setup, upgrade, doctor, or uninstall
Symptom: Running nat upgrade, nat setup, nat doctor, or nat uninstall returns:
nat: error: argument command: invalid choice: 'upgrade'The nat --help output only lists older commands: scan, security-scan, weights, heal, test-gen, completions, demo.
Why this happens: You are running an older version of nat-engine that was installed before these commands were added in v1.4.0. This commonly occurs when:
- A stale pip cache served an older wheel during upgrade
- You have multiple Python environments (system Python vs. virtualenv) and the wrong one is active
- A cached
.pycbytecode file is being used instead of updated source
Solutions:
- Check your installed version:
nat --versionβ commandssetup,upgrade,doctor, anduninstallrequire v1.4.0 or later - Force a clean reinstall (bypasses pip cache):
pip install --force-reinstall --no-cache-dir nat-engine - If using a virtualenv, make sure it's activated:
source .venv/bin/activate nat --version - If developing from the repo source, reinstall in editable mode:
pip install -e . - Verify the fix β
nat --helpshould now list all commands includingsetup,upgrade,doctor, anduninstall
Run nat doctor after resolving this issue to validate your full environment.
Scan issues
"0 endpoints discovered"
Symptom: NAT reports discovering 0 endpoints after scanning.
Solutions:
- Confirm the target URL is reachable:
curl -I https://api.example.com - If using a spec, verify it's valid and the
servers[].urlmatches your--url - Check that authentication isn't required to reach the API's discovery endpoints
- Try
--verboseto see the raw probe requests and responses:nat scan --url https://api.example.com --verbose
Scan exits immediately with "Scan error"
Symptom: NAT exits with exit code 2 immediately after starting.
Solutions:
- Enable verbose logging:
nat scan --url ... --verbose - Check network connectivity to the target
- Verify your API key is valid:
nat auth status - Check for TLS certificate issues:
curl -v https://api.example.com
Scan is very slow
Symptom: Scan takes much longer than expected.
Solutions:
- Reduce timeout if your API is fast:
--timeout 10 - Increase concurrency if your API can handle it:
--concurrency 10 - Use a spec to skip the discovery phase:
--spec ./openapi.yaml - Exclude known-slow endpoints:
--exclude "/api/v1/reports/*"
False positives in report
Symptom: A finding appears in the report but you've confirmed it's not a real vulnerability.
Solution: Dismiss the finding with a reason:
nat findings dismiss --id FINDING_ID --reason false_positive --note "CORS policy is intentional"Server issues (self-hosted)
Server fails to start
Symptom: nat server start exits immediately.
Solutions:
- Check if the port is already in use:
ss -tlnp | grep 8080 - Check permissions on the data directory:
ls -la ~/.nat/data # Should be writable by the current user - Check for missing
NAT_SECRET_KEY:NAT_SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))") nat server start
Dashboard is unreachable
Symptom: Browser shows "Connection refused" when accessing the dashboard.
Solutions:
- Verify the server is running:
nat server status - Check the bind address β if
hostis127.0.0.1, the server is only accessible locally - Check firewall rules:
sudo ufw status
Report issues
Report is empty / "No findings"
Symptom: Scan completes but the report shows no findings.
This may be expected if your API is well-secured. To confirm NAT tested your API:
- Open the report and check the Coverage section β were endpoints actually tested?
- Run with
--verboseto confirm requests were sent - Ensure you're scanning against a staging environment with actual vulnerabilities (try
nat demofirst)
API errors
401 Unauthorized
Symptom: Every API call returns 401 Unauthorized.
Solutions:
- Ensure the
X-API-Keyheader is set (notAuthorization: Bearer):curl https://api.nat-testing.io/api/v1/usage \ -H "X-API-Key: $NAT_API_KEY" - Confirm your key starts with
nat_pk_β keys in any other format are invalid. - Check that the key has not been rotated or revoked in the dashboard under Settings β API Keys.
429 Too Many Requests
Symptom: API calls return 429 Too Many Requests.
Why this happens: You have exceeded your plan's per-minute request rate limit. Check the Retry-After header in the response for the number of seconds to wait.
Rate limits by plan:
| Plan | Requests / minute |
|---|---|
| Free | 10 |
| Pro | 60 |
| Team | 200 |
| Enterprise | 1,000 |
Solutions:
- Add exponential back-off and retry logic that honours the
Retry-Afterheader. - If you consistently hit the limit, consider upgrading your plan.
402 Payment Required β Quota Exceeded
Symptom: POST /api/v1/scan returns 402 Payment Required with error code QUOTA_EXCEEDED.
Why this happens: You have consumed all functional scans in the current billing period.
{
"error": "QUOTA_EXCEEDED",
"message": "Monthly scan quota exhausted. Quota resets on 2025-02-01.",
"quota_reset_date": "2025-02-01T00:00:00Z"
}Solutions:
- Wait for reset β quota resets automatically on
quota_reset_date. Check it viaGET /api/v1/usage. - Upgrade your plan β log in to the dashboard (opens in a new tab) and go to Settings β Billing.
- Reduce scan frequency β pause non-critical CI/CD scans until the quota resets.
See Billing Issues for more detail.
Functional testing issues
Scan returns 402 FEATURE_NOT_AVAILABLE for functional tests
Symptom: Starting a scan with "mode": "functional" returns a 402 error with code FEATURE_NOT_AVAILABLE.
Why this happens: Functional testing (visual regression, accessibility, performance) requires a Pro or Team plan.
Solutions:
- Log in to the dashboard (opens in a new tab) and go to Settings β Billing to upgrade your plan.
- Alternatively, upgrade via the API:
curl -X POST https://api.nat-testing.io/api/v1/billing/checkout \ -H "X-API-Key: $NAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"plan": "pro", "success_url": "https://app.nat-testing.io/dashboard"}'
Visual regression shows unexpected diffs on first run
Symptom: The first functional scan reports visual diffs even though nothing has changed.
Why this happens: NAT creates a baseline screenshot on the first scan. If no prior baseline exists, the first scan captures the baseline and may flag transient rendering differences.
Solutions:
- Run the scan a second time β the second run compares against the baseline captured in the first.
- If the diffs are expected (e.g., after a deliberate UI change), reset the baseline:
Or via the API by adding
nat scan --url https://app.example.com --mode functional --reset-baseline"reset_baseline": trueto the request body.
Accessibility score is lower than expected
Symptom: The compliance score is below your target even though your app appears accessible.
Solutions:
- Review the specific violations returned in
GET /api/v1/scan/{id}/accessibilityβ each violation includes the affected element, WCAG rule, and ahelp_urlwith remediation guidance. - Check the
impactlevel:criticalandseriousviolations have the most effect on the score. - Ensure you are testing with authentication if your app requires login to reach most pages β unauthenticated scans will only cover public pages.
Performance score is lower than expected
Symptom: The performance score is significantly below your Lighthouse measurements.
Why this happens: NAT measures performance from a neutral network environment (not from localhost or a fast CI runner). This gives you a real-world perspective but may differ from local Lighthouse results.
Solutions:
- Focus on the
lcp_ms,cls, andtbt_msfields β these have the largest impact on the score. - Use the
help_urllinks in the performance report for specific optimization guidance. - Pages with heavy server-side rendering or CDN-dependent assets may score differently between runs. Check TTFB (
ttfb_ms) as a first diagnostic step.
Functional test scan takes much longer than a security scan
Symptom: Functional scans take 5β10Γ longer than security scans on the same target.
Why this happens: Functional testing uses real browser automation (Chromium headless) to load and interact with pages, which is significantly slower than sending API requests.
Solutions:
- Reduce the number of pages tested by using
--excludeto skip non-critical URLs. - Lower
--concurrencyif your staging environment has limited capacity (e.g.,--concurrency 2). - Run functional tests on a schedule (e.g., nightly) rather than on every pull request.
Getting more help
- Run
nat doctorfor a quick environment health check β catches most setup issues automatically. See the Environment Doctor guide - If
natdoesn't recognize a command, check that you're runningnat-enginev1.4.0+ β see the stale install section above - Run
nat <command> --helpfor command-specific help - Use
--verboseon any command to enable detailed output - Check the FAQ for answers to common questions
- See the specific troubleshooting guides: