Troubleshooting

The problems people run into most often, and how to fix them.

"AUTH_SECRET is missing or too short"

The dashboard signs its session cookie with AUTH_SECRET. Set it in .env to 32 or more random characters and restart the server. Changing it later signs everyone out of the dashboard, nothing else.

"Settings row missing: run npm run db:seed"

The database exists but is empty. Run npm run db:seed (or npm run setup on a new copy).

The site says the restaurant is closed

Ordering follows Dashboard > Settings > Opening hours in the restaurant's time zone (RESTAURANT_TIMEZONE, default Asia/Muscat). Check the day is not marked closed, and that the server's time zone setting is right. A closing time earlier than the opening time (for example 12:00 to 00:30) means the restaurant closes after midnight.

If the page says "Online orders paused", someone switched it off on the kitchen board: press Resume orders.

"Card (Thawani)" does not appear at checkout

All of these must be true:

  1. THAWANI_SECRET_KEY and THAWANI_PUBLISHABLE_KEY are set in .env (restart after editing).
  2. Dashboard > Settings > Payments > Card (Thawani) is on.
  3. The currency is OMR: Thawani charges in Omani rials only.

See Payments.

The sign-in page keeps coming back

  • The browser blocks cookies for the site: allow them.
  • In production SITE_URL starts with https:// but the site is opened over plain http://: the secure cookie is not sent. Use HTTPS or fix SITE_URL.
  • The account was deactivated in Dashboard > Staff.

No sound on the kitchen board

Browsers only play sound after a click. Press Sound alert once on the board; the setting is remembered on that device.

Uploading a dish photo fails

  • Only JPEG, PNG or WebP up to 4 MB are accepted; the file's real type is checked, not its name.
  • Behind Nginx, set client_max_body_size 5m;.
  • On hosts with a read-only disk, uploads cannot be saved in public/uploads: see Manual setup and deployment.

"Too many requests"

Public forms are limited per visitor: 8 orders and 5 reservation requests per minute, and 10 sign-in attempts per minute (8 per email per 15 minutes). The counters live in the server's memory and reset when it restarts. Behind a proxy, make sure it sends X-Forwarded-For, or every visitor shares one counter.

I changed prisma/schema.prisma and the app fails

Apply the change and rebuild the client:

npx prisma db push
npx prisma generate

Prices look wrong

Prices are stored in the currency's smallest unit (for OMR, 1 rial = 1000 baisa) and shown with Settings > Decimal places. If you change the currency to one with 2 decimals (for example USD), re-enter your prices: 1.500 OMR is stored as 1500 and would become 15.00 USD.