Skip to content

Troubleshooting Guide

1. Common Issues

"Tenant Not Found" (404)

  • Symptom: User visits foo.olow.com and sees 404 or generic error.
  • Cause:
    1. No property exists with subdomain = 'foo'.
    2. Nginx is not routing wildcards correctly.
    3. DNS record *.olow.com is missing.
  • Fix: Check properties table. Verify Nginx server_name directive.

"Method Not Allowed" on Login

  • Symptom: POST to /login returns 405.
  • Cause: Often mixed content (HTTP vs HTTPS). Laravel redirects POST to GET if protocol mismatch.
  • Fix: Ensure APP_URL uses https:// and Nginx forces HTTPS.

SMS Not Sending

  • Symptom: Booking confirmed, no SMS received.
  • Check:
    1. Is the Queue Worker running? (php artisan queue:work).
    2. Check sms_logs table. If status is failed, check error_message.
    3. Check Balance on the Gateway.

2. Debugging Tools

Laravel Logs

  • Location: storage/logs/laravel.log.
  • Search for Exception Stack Traces.

Telescope (If Installed)

  • Visit /telescope (Super Admin only).
  • Inspect "Jobs" and "Exceptions".

Artisan Commands

  • php artisan tenant:list: View all active properties.
  • php artisan tinker: Interactive shell to query DB.

3. Performance Issues

Slow Dashboard Load

  • Cause: Often N+1 queries on Booking::with('room', 'customer').
  • Fix: Run CheckNPlusOne audit or inspect Laravel Debugbar.

Database Deadlocks

  • Cause: High concurrency on wallets table.
  • Fix: Verify lockForUpdate() is used in Transaction services.

4. Accounting Issues

"No accounting mapping found for key" Error

  • Cause: AccountingMapService can't find a mapping for a logical key (e.g., revenue.room) in the current property.
  • Fix: Navigate to Finance > Accounting Setup and map all required keys to GL accounts. Ensure the property has been seeded with default mappings.

"Property ID is required for accounting entries" Error

  • Cause: AccountingPoster can't determine the property context.
  • Fix: Ensure current_property_id is bound in the container, or pass propertyId explicitly.

5. WebSocket Issues

Reverb Connection Failed

  • Cause: WebSocket server not running.
  • Fix: Run php artisan reverb:start. In production, use Supervisor to keep it running.

Real-Time Notifications Not Appearing

  • Check:
    1. Is Reverb running? (php artisan reverb:start)
    2. Are environment variables set? (REVERB_APP_ID, REVERB_APP_KEY, REVERB_APP_SECRET)
    3. Check browser console for WebSocket connection errors.

6. Authentication Issues

Logging Into Wrong Portal

  • Cause: The system uses 3 auth guards (web, customer, admin). Using the wrong login form directs to the wrong guard.
  • Fix:
    • Staff login: {subdomain}.hotels.test/admin/login
    • Guest login: {subdomain}.hotels.test/login
    • Super Admin: {subdomain}.hotels.test/platform/login