Skip to content

Troubleshooting

Payment Issues

Order stuck in open status after payment

Cause: SBPS webhook not received or not processed.

Diagnose:

# Check recent orders
php artisan tinker
> Order::where('status', 'open')->latest()->get(['id','created_at','payment_method'])

# Check failed jobs
> DB::table('failed_jobs')->latest('failed_at')->get()

Fix: If payment was taken at SBPS, manually update order status via admin panel. Check routes/webhook.php is publicly accessible and not firewalled.

Note: SBPS webhook has no HMAC verification — idempotency guard is status === OPEN only.


Atone payment not completing

Cause: Atone JS SDK issue or AtoneChecksumService key mismatch.

Check: Verify ATONE_PUBLIC_KEY + ATONE_SECRET_KEY match environment (prod vs test).


Lottery Issues

Winners not receiving email

Cause 1: SendLotteryWinnerEmailJobis_sent set to true before queue delivers notification.

Diagnose:

php artisan tinker
> Lottery::where('status', 'won')->where('is_sent', true)->whereDoesntHave('orderDetail')->count()
# Check queue depth
> Queue::size()

Fix: If is_sent = true but email not sent, re-queue manually or temporarily set is_sent = false for affected records. Ensure queue worker is running.

Cause 2: LotteryWonNotification::setCartUrl() throws on empty collection — check logs for exception.


Lottery winner job not running

Diagnose: Check scheduler is running (php artisan schedule:work in dev, cron in prod). Job runs every minute — confirm no overlap locking issue (no withoutOverlapping() set).

Note: SendLotteryWinnerEmailJob has uncommitted changes on staging branch.


Oricon / Billboard Reporting

Oricon not receiving data (silent failure)

SendToOricon catches and swallows all Throwable — SFTP failures are invisible.

Diagnose:

# Check scheduled job ran
grep "SendToOricon" storage/logs/laravel.log

# Test SFTP connectivity
php artisan tinker
> Storage::disk('oricon-sftp')->exists('.')

Fix: Check oricon-sftp disk config in config/filesystems.php — SSH key path, hostname, username.


Billboard FTP failing

Unlike Oricon, Billboard exceptions propagate — check failed jobs table or Sentry.

> DB::table('failed_jobs')->where('payload', 'like', '%Billboard%')->get()

Cart Issues

Guest cart not migrating to user on login

Cause: CartManager::copyUserCart() called in LoginController::authenticated(). Verify session('_guest_user') was set before login.

Diagnose:

# Check if guest items exist
php artisan tinker
> CartItem::whereNotNull('guest_id')->where('user_id', null)->latest()->take(5)->get()


Cart item validation failing unexpectedly

Cause: PurchaseLimitRule or BuyableRule checking limits. Rules run at cart-add and at order placement.

Diagnose: Check product_purchase_limits for the product. Limits are per-user, per-date, per-member, and per-order.


Authentication Issues

User can't log in after password reset

Cause: Legacy SHA256 password path. On first successful SHA256 login, password is upgraded to bcrypt. Until then, SHA256 is tried on every login.

Fix: Confirm the user's password column starts with $2y$ (bcrypt). If not, the SHA256 path is still active.


Session bleeding between web user and admin

Cause: CustomSession middleware sets config('session.cookie') per request. Under Octane, Config::set() mutations persist in a worker if the middleware doesn't run.

Fix: Restart Octane workers (php artisan octane:reload). Confirm CustomSession is in $middlewarePriority in Kernel.php.


Chekicha (CKC) Issues

Order not completing for CKC products

Cause: CkcConnect::attach() is called inside the DB transaction during fulfilment. Chekicha API failure rolls back the entire order.

Diagnose:

# Check Sentry for CkcConnect exceptions
# Check Chekicha API status
php artisan tinker
> Http::get('https://api.ckc.utaten.com/health')

Fix: If Chekicha API is down, orders cannot complete for CKC-enabled products until restored.


Serial code ZIP import failing

Check: 1. ZIP file is valid (not corrupt) 2. System has unar installed (fallback for non-standard ZIPs) 3. CSV inside ZIP is SJIS-encoded 4. Validation errors from ChekichaImport — check admin UI error output


Frontend Build Issues

"Unable to locate file in Vite manifest" error

npm run build
# or start hot reload:
npm run dev

Performance

Slow authenticated page loads

Cause: AddressRequired middleware lazy-loads $user->address on every request — one extra query per authenticated page.

Octane note: View::composer injects cart count on every web request for authenticated users (extra query).


Queue / Jobs

Notifications not sending

# Check queue worker is running
php artisan queue:work --queue=default

# Check failed jobs
php artisan queue:failed
php artisan queue:retry all

All notification classes implement ShouldQueue — they require a running queue worker. InquirySentListener is the only synchronous mail send.


Logs and Monitoring

  • Application logs: storage/logs/laravel.log
  • Error tracking: Sentry (configured via SENTRY_LARAVEL_DSN)
  • Oricon failures: check logs manually (exceptions swallowed in SendToOricon)
  • Queue failures: failed_jobs table + php artisan queue:failed