Troubleshooting
Common issues and solutions for the License Manager plugin.
Installation Issues
Plugin Not Appearing
Problem: Plugin doesn't show in admin panel after upload.
Solutions:
- Clear cache:bash
php artisan cache:clear php artisan config:clear - Check file permissions:bash
chmod -R 755 platform/plugins/license-manager - Verify plugin.json exists and is valid JSON
- Check Laravel logs:
storage/logs/laravel.log
Migration Errors
Problem: Database migration fails.
Solutions:
- Check database connection in
.env - Ensure MySQL user has CREATE TABLE permission
- Run migrations manually:bash
php artisan migrate --path=platform/plugins/license-manager/database/migrations - Check for existing tables with conflicting names
Missing Tables
Problem: Tables don't exist after activation.
Solutions:
- Re-run migrations:bash
php artisan migrate - Check migration status:bash
php artisan migrate:status - If table exists without
lm_prefix, run:bashphp artisan migrate:fresh --seedWARNING
This will reset all database data. Backup first.
API Issues
401 Unauthorized
Problem: API returns "Unauthorized" error.
Causes & Solutions:
- Missing API Key: Add
X-API-KEYheader - Invalid Key: Verify key in Settings → API Keys
- Expired Key: Check key expiration date
- Revoked Key: Key may have been revoked
- Wrong Key Type: Use External key for external endpoints
403 Forbidden
Problem: API returns "Forbidden" error.
Causes & Solutions:
- Insufficient Scopes: Check API key permissions
- IP Blacklisted: Check blacklist settings
- Domain Blacklisted: Check blacklist settings
- Rate Limited: Wait and retry
429 Too Many Requests
Problem: Rate limit exceeded.
Solutions:
- Wait before retrying (see
Retry-Afterheader) - Increase rate limit in Settings → API
- Implement client-side rate limiting
- Use exponential backoff
Connection Failed
Problem: Can't connect to API.
Solutions:
- Verify server is running
- Check SSL certificate (for HTTPS)
- Test with curl:bash
curl -v https://your-domain.com/api/external/connection-check \ -H "X-API-KEY: your-key" - Check firewall rules
- Verify API routes are registered:bash
php artisan route:list | grep api
License Issues
License Not Found
Problem: Valid license returns "not found".
Causes & Solutions:
- Wrong Product: Verify
product_reference_id - Typo in Code: Check exact license code
- Case Sensitivity: License codes are case-sensitive
- Deleted License: Check if license was removed
License Invalid
Problem: License exists but shows invalid.
Causes & Solutions:
- Blocked: Check
is_validfield - Expired: Check
expires_atdate - Product Inactive: Check product status
- Domain Mismatch: Verify allowed domains
Parallel Use Exceeded
Problem: "Maximum activations reached" error.
Solutions:
- Check current activation count
- Deactivate unused installations
- Increase
parallel_useslimit - Enable "Deactivate Old" setting
Domain Not Allowed
Problem: "Domain not authorized" error.
Causes & Solutions:
- Add domain to license whitelist
- Check for typos in domain list
- Ensure www/non-www both covered
- Use wildcard:
*.example.com
Activation Issues
Activation Failed
Problem: License activation fails.
Diagnostic Steps:
- Check activity logs for error details
- Verify all required headers are sent:
X-API-KEYX-API-URLX-API-IP
- Test with minimal request:bash
curl -X POST https://your-domain.com/api/external/license/activate \ -H "Content-Type: application/json" \ -H "X-API-KEY: your-key" \ -H "X-API-URL: https://client-site.com" \ -H "X-API-IP: 192.168.1.1" \ -d '{"license_code": "YOUR-LICENSE"}'
Deactivation Not Working
Problem: Can't deactivate a license.
Solutions:
- Verify domain/IP match activation record
- Check license code is correct
- Use admin panel to manually delete activation
Customer Portal Issues
Can't Login
Problem: Customer login fails.
Solutions:
- Verify email exists in customers table
- Reset password via "Forgot Password"
- Check if account is confirmed (
confirmed_at) - Clear browser cookies
Licenses Not Showing
Problem: Customer sees no licenses.
Causes & Solutions:
- Wrong Customer ID: License
customer_idmust match customer'sclient_id - Wrong Email: License email must match customer email
- No Licenses: Verify licenses exist for customer
Password Reset Not Working
Problem: Password reset email not received.
Solutions:
- Check spam folder
- Verify email configuration in
.env:MAIL_MAILER=smtp MAIL_HOST=your-smtp-host MAIL_PORT=587 MAIL_USERNAME=your-username MAIL_PASSWORD=your-password - Test email sending:bash
php artisan tinker >>> Mail::raw('Test', fn($m) => $m->to('[email protected]'));
Webhook Issues
Webhooks Not Received
Problem: Webhook endpoint not receiving events.
Solutions:
- Verify webhooks are enabled in settings
- Check webhook URL is accessible
- Test endpoint manually:bash
curl -X POST https://your-webhook-url \ -H "Content-Type: application/json" \ -d '{"test": true}' - Check server logs for errors
- Verify SSL certificate (if HTTPS)
Signature Verification Failing
Problem: Webhook signature doesn't match.
Solutions:
- Use raw request body for verification
- Ensure secret matches exactly
- Check for whitespace in secret
- Verify HMAC algorithm is SHA-256
Events Not Triggering
Problem: Expected events not firing.
Solutions:
- Run cron command manually:bash
php artisan cms:license-manager:process-expirations - Check if licenses match criteria
- Verify cron job is running
- Check activity logs for errors
Performance Issues
Slow API Responses
Solutions:
- Add database indexes:sql
CREATE INDEX idx_licenses_code ON lm_licenses(license_code); CREATE INDEX idx_activations_license ON lm_activations(license_code); - Enable query caching
- Optimize database queries
- Use Redis for session/cache
High Memory Usage
Solutions:
- Limit results in API responses
- Use pagination for large datasets
- Run cleanup commands regularly
- Increase PHP memory limit
Database Growing Large
Solutions:
- Clear old activity logs:bash
php artisan cms:license-manager:activity-log:clear - Clear old download logs:bash
php artisan cms:license-manager:download-log:clear - Archive old activations
- Remove expired licenses
Debug Mode
Enable detailed logging:
// config/logging.php
'channels' => [
'license-manager' => [
'driver' => 'daily',
'path' => storage_path('logs/license-manager.log'),
'level' => 'debug',
'days' => 14,
],
],Then use:
Log::channel('license-manager')->debug('Message', $data);Getting Help
If issues persist:
- Check Logs:
storage/logs/laravel.log - Activity Logs: Admin → License Manager → Activity Logs
- Enable Debug: Set
APP_DEBUG=truetemporarily - Contact Support: [email protected]
Include in support requests:
- PHP version
- Laravel version
- Plugin version
- Error messages
- Steps to reproduce
