Download the PHP package pstoute/jarvis-error-reporter without Composer
On this page you can find all versions of the php package pstoute/jarvis-error-reporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pstoute/jarvis-error-reporter
More information about pstoute/jarvis-error-reporter
Files in pstoute/jarvis-error-reporter
Package jarvis-error-reporter
Short Description Send Laravel errors to Jarvis for automatic analysis and fixing
License MIT
Informations about the package jarvis-error-reporter
Jarvis Error Reporter
A Laravel package that sends application errors to Jarvis for automatic analysis and fixing. Think Sentry, but with AI-powered auto-remediation.
Prerequisites
Before installing this package, you'll need:
- n8n Instance: A running n8n server (cloud or self-hosted) to receive error webhooks and orchestrate the auto-fix workflow
- GitHub Access: Your Laravel application must be in a GitHub repository with API access configured
- Claude Code Setup: Claude Code CLI installed and configured to interact with your repositories
- Queue Workers (Recommended): Laravel queue workers running for asynchronous error reporting
- NocoDB (Optional): For tracking auto-fix attempts and outcomes
Note: This package sends error data to YOUR infrastructure (n8n webhook), not a third-party service. You have complete control over your error data.
Installation
Configuration
Add to your .env file:
That's it! Errors will automatically be captured and sent to Jarvis.
Optional Configuration
Publishing Config
To customize ignored exceptions or sensitive fields:
Test Your Installation
Verify everything is configured correctly:
This command will:
- Validate your configuration settings
- Send a test error to your n8n webhook
- Provide troubleshooting guidance if anything fails
Use the --sync flag to bypass the queue and send immediately:
Manual Usage
Capture an Exception Manually
Add Context
Middleware Example
For multi-tenant applications or complex context tracking, create a middleware:
Register in app/Http/Kernel.php:
What Gets Sent
Each error report includes:
- Error details: class, message, file, line, stack trace
- Source code: the file contents and surrounding context
- Request info: URL, method, sanitized input, headers
- User context: authenticated user info
- App context: Laravel version, PHP version, locale
- Git info: current branch and commit hash
- Custom context: anything you add via
setContext()
Sensitive Data
The following fields are automatically redacted:
- password, password_confirmation
- secret, token, api_key
- credit_card, card_number, cvv, ssn
- Authorization and Cookie headers
Security & Privacy
What Data Leaves Your Application
By default, Jarvis sends comprehensive error context to help with auto-fixing:
⚠️ Important: Review these settings carefully for production environments.
Source Code Inclusion (JARVIS_INCLUDE_SOURCE)
When enabled (default: true), the package sends:
- Full file contents of the file where the error occurred
- Related files from the stack trace (up to 5 files, excluding vendor)
- Line-by-line context around the error
Privacy Considerations:
- May include sensitive business logic or proprietary algorithms
- Could expose internal architecture and design patterns
- Might contain TODO comments with internal information
- Files could have hardcoded values (though secrets should be in .env)
Recommendations:
- Set
JARVIS_INCLUDE_SOURCE=falseif your codebase contains highly sensitive IP - Review your
.env.exampleto ensure no secrets are in code - Consider adding
JARVIS_EXCLUDE_PATHSfor sensitive directories (coming soon) - Ensure your n8n webhook is secured with authentication and HTTPS
Data Sent to Your n8n Webhook
All data is sent to your infrastructure (not a third-party service):
- Error details, stack traces, and source code (if enabled)
- Request data (URL, method, sanitized input, headers)
- User information (ID, email, name of authenticated user)
- Application context (Laravel version, PHP version, locale)
- Git information (current branch and commit hash)
- Custom context you've added via
setContext()
Best Practices:
- Use HTTPS for your n8n webhook
- Implement webhook authentication
- Restrict network access to your n8n instance
- Regularly audit what data is being sent
- Consider different settings for production vs. staging
Architecture
How Auto-Fix Works
- Error Occurs: Your Laravel app throws an exception
- Capture: Jarvis Error Reporter captures comprehensive context
- Queue (Optional): Job queued for async delivery to prevent blocking
- Send: HTTP POST to your n8n webhook with full error details
- Orchestrate (n8n workflow):
- Creates/updates GitHub issue with error details
- Updates NocoDB tracking
- Clones repository locally
- Invokes Claude Code with error context
- Claude analyzes error and writes fix
- Runs automated tests to verify fix
- Deploy:
- High Confidence: Push directly to main branch
- Medium Confidence: Create PR for human review
- Notify: Send notification via ntfy with rollback option
Troubleshooting
Errors Not Being Sent
Check Configuration:
This will validate your settings and attempt to send a test error.
Common Issues:
-
Queue Not Processing
- Verify queue worker is running:
php artisan queue:work - Check queue jobs table for failed jobs
- Review
storage/logs/laravel.logfor queue errors - Try sending synchronously:
php artisan jarvis:test --sync
- Verify queue worker is running:
-
Network/Firewall Issues
- Verify n8n webhook URL is accessible:
curl -X POST YOUR_JARVIS_DSN - Check firewall rules on both application and n8n servers
- Ensure Docker containers can reach external networks (if using Docker)
- Verify DNS resolution for your n8n hostname
- Verify n8n webhook URL is accessible:
-
Configuration Problems
- Ensure
JARVIS_ENABLED=truein.env - Verify
JARVIS_DSNis set and correct - Check that error isn't in
ignored_exceptionslist - Confirm environment matches
JARVIS_AUTOFIX_ENVIRONMENTS(if expecting auto-fix)
- Ensure
- Rate Limiting
- Check logs for "Rate limit reached" messages
- Increase
JARVIS_RATE_LIMIT_PER_MINUTEif needed - Adjust
JARVIS_DEDUP_WINDOWfor deduplication sensitivity
Debugging Tips
Enable Debug Logging:
Check Laravel Logs:
Verify Payload Structure:
Add temporary logging in SendJarvisReport.php:
Test Webhook Manually:
Queue Worker Not Running
Forge/Envoyer: Ensure queue workers are configured in deployment
Vapor: Queues are required - cannot send synchronously
Docker: Add queue worker as separate service in docker-compose.yml
Local: Run php artisan queue:listen in a separate terminal
Still Having Issues?
- Review the full error logs:
storage/logs/laravel.log - Check n8n workflow execution logs
- Verify GitHub repository access from your n8n instance
- Open an issue: GitHub Issues
Comparison to Sentry
| Feature | Sentry | Jarvis |
|---|---|---|
| DSN-based config | ✓ | ✓ |
| Auto exception capture | ✓ | ✓ |
| Rate limiting | ✓ | ✓ |
| Deduplication | ✓ | ✓ |
| User context | ✓ | ✓ |
| Source code context | ✓ | ✓ (more aggressive) |
| Sensitive data scrubbing | ✓ | ✓ |
| Queued sending | ✓ | ✓ |
| Auto-fix attempts | ✗ | ✓ |
| GitHub issue creation | ✗ | ✓ |
| Your infrastructure | ✗ | ✓ |
| Monthly cost | $26+ | $0 |
Environment-Specific Setup
Laravel Forge
Configuration:
- Add environment variables in Forge dashboard
- Configure queue worker:
- Navigate to site → Queue
- Add worker:
php artisan queue:work --tries=3
- Ensure server can reach your n8n instance (check firewall rules)
Recommended Settings:
Laravel Vapor
Configuration:
-
Add to
vapor.yml: - Add secrets via Vapor CLI:
Important:
- Vapor requires queue workers - you cannot send synchronously
- Consider payload size limits (Vapor has ~6MB limit)
- Use
JARVIS_INCLUDE_SOURCE=falseif hitting size limits
Recommended Settings:
Docker / Docker Compose
Configuration:
Add to your docker-compose.yml:
Network Considerations:
- Ensure containers can reach your n8n instance
- If n8n is also in Docker, use service names for DSN
- Example:
JARVIS_DSN=http://n8n:5678/webhook/autofix
Local Development
Recommended Approach: Disable in local, or use separate n8n instance
Why disable locally?:
- Avoids noise from development errors
- Prevents accidental commits to repos
- Saves n8n resources
Testing Locally:
Platform-Specific Tips
| Platform | Key Considerations |
|---|---|
| Forge | Configure queue workers in dashboard, check firewall |
| Vapor | Must use queues, watch payload size limits |
| Envoyer | Similar to Forge, ensure queue workers restart on deploy |
| Heroku | Add worker dyno, set buildpack, use env vars |
| RunCloud | Configure supervisor for queue, add env vars |
| Docker | Network connectivity, separate queue service |
| Kubernetes | Create separate queue deployment, use ConfigMap/Secrets |
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- Queue worker (recommended for production)
- n8n instance (cloud or self-hosted)
License
MIT
All versions of jarvis-error-reporter with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0