Troubleshooting
Common issues and solutions when using Oculum.
Installation Issues
npm install fails
Problem: npm install -g @oculum/cli fails with permission errors.
Solution:
# Option 1: Use npx (no installation needed)
npx @oculum/cli scan
# Option 2: Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g @oculum/cli
Command not found
Problem: oculum: command not found after installation.
Solution:
- Check if installed:
npm list -g @oculum/cli - Find npm bin:
npm bin -g - Add to PATH:
export PATH="$(npm bin -g):$PATH"
Authentication Issues
"Authentication required"
Problem:
Error: Authentication required for verified scans.
Run 'oculum login' to authenticate.
Solution:
# Login via browser
oculum login
# Or use API key
oculum login --api-key ocu_your_key_here
# Or set environment variable
export OCULUM_API_KEY=ocu_your_key_here
"Invalid API key"
Problem:
Error: Invalid API key.
Solutions:
- Verify key has no extra spaces
- Check key hasn't been revoked
- Create a new key at Dashboard Settings
Browser doesn't open
Problem: oculum login doesn't open browser.
Solution:
# Manually open the URL shown in terminal
# Or use API key directly
oculum login --api-key ocu_your_key_here
Scanning Issues
No files scanned
Problem:
Scanning...
Files scanned: 0
Solutions:
-
Check you're in the right directory:
pwd ls -la -
Check ignore patterns aren't too broad:
oculum scan --verbose -
Verify file extensions are supported:
# Supported: .js, .ts, .tsx, .jsx, .py, .go, .java, .rb, .php # Also: .env, .yaml, .json, Dockerfile, etc.
Scan hangs
Problem: Scan appears frozen.
Solutions:
-
Try verbose mode to see progress:
oculum scan --verbose -
Check for very large files:
# Files over 50KB are skipped find . -type f -size +50k -
Reduce scope:
oculum scan src/ --depth local
Out of credits
Problem:
Error: Quota exceeded. You have 0 credits remaining.
Solutions:
-
Check usage:
oculum usage -
Use local scans (no credits needed for pattern matching):
oculum scan --depth local -
Upgrade your plan at /pricing
Output Issues
Can't see colors
Problem: Output shows escape codes instead of colors.
Solution:
# Disable colors
oculum scan --no-color
# Or pipe to a file
oculum scan > results.txt
Output too long
Problem: Results scroll past screen.
Solutions:
# Use compact mode
oculum scan --compact
# Pipe to less
oculum scan | less -R
# Use quiet mode
oculum scan --quiet
# Output to file
oculum scan --format json --output results.json
JSON parsing fails
Problem: Can't parse JSON output.
Solutions:
# Ensure no extra output
oculum scan --format json --quiet > results.json
# Verify JSON is valid
cat results.json | jq .
CI/CD Issues
GitHub Action fails
Problem: Action fails with authentication error.
Solution: Add API key to repository secrets:
- Go to Settings → Secrets and variables → Actions
- Add
OCULUM_API_KEYsecret - Update workflow:
env: OCULUM_API_KEY: ${{ secrets.OCULUM_API_KEY }}
Exit code issues
Problem: Pipeline fails unexpectedly.
Understanding exit codes:
| Code | Meaning |
|---|---|
| 0 | Success, no blocking findings |
| 1 | Findings at or above --fail-on severity |
| 2 | Configuration or usage error |
Solution: Adjust --fail-on threshold:
# Only fail on critical
oculum scan --fail-on critical
# Don't fail on findings
oculum scan --fail-on none
Incremental scan not working
Problem: Incremental scan scans all files.
Solutions:
-
Ensure git is available:
git --version -
Check you're in a git repository:
git status -
Specify the base branch:
oculum scan --diff main
VS Code Extension Issues
Extension not activating
Problem: Oculum panel not showing.
Solutions:
- Check extension is installed: Extensions → Search "Oculum"
- Reload window: Cmd/Ctrl + Shift + P → "Reload Window"
- Check Output panel for errors: View → Output → Select "Oculum"
Findings not updating
Problem: Panel shows stale findings.
Solutions:
- Manual scan: Click refresh in Oculum panel
- Enable auto-scan: Settings → Oculum → Auto Scan On Save
- Check file is supported (JS, TS, Python, etc.)
Authentication in VS Code
Problem: Can't authenticate in extension.
Solution:
- Open Command Palette: Cmd/Ctrl + Shift + P
- Run: "Oculum: Login"
- Follow browser OAuth flow
Performance Issues
Slow scans
Problem: Scans take too long.
Solutions:
-
Use local depth for quick checks:
oculum scan --depth local -
Ignore unnecessary directories:
# .oculum.yaml ignore: - "node_modules/**" - "dist/**" - "**/*.test.ts" -
Use incremental scans:
oculum scan --incremental -
Scan specific directories:
oculum scan src/
High memory usage
Problem: Node runs out of memory.
Solutions:
-
Increase Node memory:
NODE_OPTIONS="--max-old-space-size=4096" oculum scan -
Scan smaller directories:
oculum scan src/api/ oculum scan src/lib/
Common Error Messages
"Rate limited"
Problem:
Error: Rate limited. Please wait before making more requests.
Solution: Wait and retry. Check your plan's rate limits:
| Plan | Requests/minute |
|---|---|
| Free | 10 |
| Starter | 30 |
| Pro | 60 |
| Max | 120 |
"Network error"
Problem:
Error: Network error. Check your internet connection.
Solutions:
- Check internet connection
- Check firewall/proxy settings
- Try again later (service may be temporarily unavailable)
"Unsupported file type"
Problem:
Warning: Skipping unsupported file: example.xyz
Note: This is informational. Oculum only scans code files. See Targeting Files for supported types.
Getting More Help
If your issue isn't covered here:
-
Check verbose output:
oculum scan --verbose -
Check status:
oculum status -
See Getting Help for contact options
Related
- Getting Help — Contact and support options
- CLI Commands — Command reference
- Exit Codes — CI/CD exit codes