This guide provides a practical diagnostic workflow for common OWL integration and runtime issues across core modules (A01-A10) and the React adapter.
Run:
npm run lint
npm run test
npm run check
If check fails, resolve lint errors first, then test failures.
Map issue to category before debugging:
For authorization and policy logic, inspect reason metadata and error codes before changing rules.
| Area | Symptom | Likely Cause | Fix |
|---|---|---|---|
| Setup | Adapter imports fail | Workspace install drift | Re-run npm install from repo root |
| A07 | isAuthenticated false after login | Missing/expired token | Set valid expiresAt and session |
| A07 | refresh not triggered | Missing onRefresh or refreshToken | Configure refresh hook and token payload |
| A01 | PermissionGate denies expected route | ACL deny overrides RBAC allow | Review ACL policy and PermissionChecker reason |
| A01 | useACL/usePermission throws | Missing providers in tree | Ensure AuthProvider + ACLProvider + RBACProvider are all mounted (or use <OwlProvider>, which mounts all four for you and can’t be assembled incompletely) |
| A08/A10 | HTTP request blocked | Outbound URL rejected by policy | Validate host/protocol against SSRFGuard settings |
| A08 | CSRF validation errors | Rotated token mismatch | Re-attach latest CSRF header before retry |
| A03 | Sanitizer strips too much | strict profile behavior | Use moderate profile for controlled rich text |
| A03 | Validation false negatives | Schema/pattern mismatch | Add explicit schema tests and tune rules |
| A09 | Secrets appear in logs | Redaction key coverage incomplete | Extend redactKeys list in logger configuration |
Checklist:
Checklist:
Checklist:
Checklist:
If local pass but CI fails:
npm run lint
npm run test
npm run check
Use these commands before filing an issue.
Include: