FAQ — Offline & Sync
import { Aside } from ‘@astrojs/starlight/components’;
Offline sales work on desktop but not in browser
Section titled “Offline sales work on desktop but not in browser”This is by design. The order outbox is a feature only available on Vendor Desktop (Electron). The browser:
- Has no local SQLite.
- Has no outbox.
- Every order creation must hit the API directly — no network = no sale.
When to use what:
| Environment | Offline OK? |
|---|---|
| Vendor Desktop (Electron) | ✅ Yes — SQLite + outbox |
| Vendor web browser | ❌ No — needs the network to place orders |
See: Offline & local data.
Duplicate orders after coming back online
Section titled “Duplicate orders after coming back online”Cause: When the network flaps, the outbox sends the order twice. The system tries to dedupe by client_order_id but occasionally fails.
Fix:
- Do not click “Pay” again while the spinner is running — that’s a sign the order is already in the outbox.
- When the network is back, check Orders for the same
client_order_idor display number on the receipt. - If truly duplicate, ask the owner to void one from the dashboard.
Prevention:
- Wait for the spinner to finish (2–5 seconds) before clicking anything else.
- If in doubt, open Orders to check the new entry before ringing the next sale.
Stale prices or missing new products
Section titled “Stale prices or missing new products”Fix (2 options):
| Option | How | When to use |
|---|---|---|
| Light refresh | Pull down on the product grid, or switch store and back | You suspect the catalog just hasn’t synced |
| Reset cache | Settings → Local data → Reset cache | Cache is heavily corrupted, many products wrong |
Note: Reset cache creates a backup in the user-data directory. You can roll back if needed.
See: Reset local data.
Drafts disappeared
Section titled “Drafts disappeared”By draft type:
| Type | Where it lives | When it’s lost |
|---|---|---|
Server draft (submit_as: draft) | Server database | Cancelled by another cashier, or deleted from the dashboard |
| Named local draft | SQLite on Vendor Desktop | Browser data cleared, local DB reset, or app reinstalled |
Recovery:
- Server draft: ask the store owner to restore from logs.
- Local draft: cannot be recovered after a reset. Lesson: name important drafts clearly (e.g. “Table 5 — Mr Tuan”).
See: Drafts & tabs.
Local data lost after reset
Section titled “Local data lost after reset”Cause: Resetting the cache wipes the SQLite catalog. Some prefs (pinned products, tab order) live in the same local DB.
Fix:
- Prevention: before reset, open Settings → Local data → click “Backup” to snapshot.
- Recovery: same page → “Restore from backup” → pick the latest file.
See: Reset local data.
Still stuck?
Section titled “Still stuck?”Send to the store owner or support@lionpos.com.