Troubleshooting
When something doesn’t work as expected, this guide helps you figure out why.
Authentication Issues
Section titled “Authentication Issues””Authentication required”
Section titled “”Authentication required””Error: Authentication required. Run 'unfault login' to authenticate.Solution: Run the login flow:
unfault loginThis opens a browser for device authentication. If you’re in CI/CD, use an API key instead:
export UNFAULT_API_KEY="sk_live_..."unfault review“Invalid or expired token”
Section titled ““Invalid or expired token””Error: Invalid or expired token. Please re-authenticate.Solution: Your session has expired. Log in again:
unfault loginLogin flow doesn’t open browser
Section titled “Login flow doesn’t open browser”On headless systems or remote servers, the browser won’t open automatically.
Solution: Copy the URL shown in the terminal and open it manually:
To authenticate, visit: https://app.unfault.dev/auth/device/Enter code: ABCD-1234Analysis Issues
Section titled “Analysis Issues””No files found”
Section titled “”No files found””→ Analyzing project... Found 0 matching source filesCauses:
- Wrong directory
- No supported language files
- Files excluded by gitignore or config
Solutions:
Check you’re in the right place:
ls -la # Should see your source filesCheck supported extensions exist:
find . -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.ts" | headUse verbose mode for more details:
unfault review -v“Unknown language” or “Unsupported framework”
Section titled ““Unknown language” or “Unsupported framework””Unfault supports Python, Go, Rust, and TypeScript. If you’re using a different language, analysis won’t run.
For supported languages with unrecognized frameworks, analysis still works but framework-specific rules won’t apply.
Analysis is slow
Section titled “Analysis is slow”Large codebases take time, but if analysis seems stuck:
Check for symlink loops:
find . -type l -exec test -e {} \; -printNarrow the scope by running from a subdirectory:
# Instead of the whole repocd srcunfault reviewUse verbose mode to see progress:
unfault review -vDifferent results locally vs CI
Section titled “Different results locally vs CI”Common causes:
-
Different working directories
Make sure you’re running from the same directory in both environments.
-
Different git state
Terminal window # CI might have uncommitted changes excludedgit status -
Configuration differences
Check which config is loaded with verbose mode:
Terminal window unfault review -v
Output Issues
Section titled “Output Issues”JSON output is malformed
Section titled “JSON output is malformed”If JSON output appears truncated or malformed:
# Ensure nothing else writes to stdoutunfault review --output json 2>/dev/null > results.json“Finding not actionable”
Section titled ““Finding not actionable””If a finding doesn’t make sense for your code:
- Check if it’s a false positive specific to your pattern
- Use inline suppression with a comment explaining why:
# unfault: ignore[rule.id] -- reason this doesn't apply
- Report it if you think it’s a bug in the rule
Connection Issues
Section titled “Connection Issues””Connection refused” or “Network error”
Section titled “”Connection refused” or “Network error””Error: Failed to connect to API: Connection refusedSolutions:
Check your network:
curl -I https://api.unfault.dev/healthCheck for proxy issues:
# If behind a corporate proxyexport HTTPS_PROXY="http://proxy.company.com:8080"unfault review“Timeout” errors
Section titled ““Timeout” errors”Error: Request timed outLarge codebases may hit default timeouts.
Solutions:
Analyze a smaller scope by running from a subdirectory:
cd src/apiunfault reviewSSL certificate errors
Section titled “SSL certificate errors”Error: SSL certificate problemUsually indicates a corporate proxy intercepting HTTPS.
Solution: Add the corporate CA certificate to your system trust store, or contact your IT department for guidance.
Configuration Issues
Section titled “Configuration Issues””Config not found” or wrong config loaded
Section titled “”Config not found” or wrong config loaded”Use verbose mode to see which config Unfault is loading:
unfault review -vCommon issues:
- Config is in wrong file (should be
pyproject.toml,Cargo.toml, orpackage.json) - TOML/JSON syntax errors in config
- Config key is misspelled
Validate your config:
# For TOMLpython -c "import tomllib; tomllib.load(open('pyproject.toml', 'rb'))"
# For JSONpython -c "import json; json.load(open('package.json'))"Rules not being excluded
Section titled “Rules not being excluded”If rules you’ve excluded still appear:
-
Check the path pattern matches:
# This excludes the rule everywhereexclude = ["python.http.missing_timeout"]# This excludes it only in tests/exclude = ["python.http.missing_timeout:tests/*"] -
Check for typos in rule IDs by looking at the finding output
Verbose Mode
Section titled “Verbose Mode”For detailed diagnostics, use verbose mode:
unfault review -vThis shows:
- Which config files are loaded
- Workspace detection details
- API request/response details
Getting Help
Section titled “Getting Help”Check the status
Section titled “Check the status”unfault statusThis shows your authentication status and configuration.
Report an issue
Section titled “Report an issue”If you’ve found a bug or unexpected behavior:
- Check existing issues: github.com/unfault/cli/issues
- If new, open an issue with:
- Unfault version (
unfault --version) - OS and architecture
- Verbose output (
unfault review -v) - Minimal reproduction steps
- Unfault version (
Community
Section titled “Community”- GitHub Discussions: github.com/unfault/cli/discussions
- For security issues, email security@unfault.dev
Quick Reference
Section titled “Quick Reference”| Symptom | Likely Cause | First Step |
|---|---|---|
| ”Authentication required” | Not logged in | unfault login |
| ”No files found” | Wrong directory | Check ls and pwd |
| Slow analysis | Large codebase | Run from subdirectory |
| Different results in CI | Different working directory | Ensure same cd path |
| Connection errors | Network/proxy issues | curl https://api.unfault.dev/health |
| Rules not excluded | Path pattern mismatch | Check TOML syntax |