Skip to content

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:

EnvironmentOffline OK?
Vendor Desktop (Electron)✅ Yes — SQLite + outbox
Vendor web browser❌ No — needs the network to place orders

See: Offline & local data.

Cause: When the network flaps, the outbox sends the order twice. The system tries to dedupe by client_order_id but occasionally fails.

Fix:

  1. Do not click “Pay” again while the spinner is running — that’s a sign the order is already in the outbox.
  2. When the network is back, check Orders for the same client_order_id or display number on the receipt.
  3. 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.

Fix (2 options):

OptionHowWhen to use
Light refreshPull down on the product grid, or switch store and backYou suspect the catalog just hasn’t synced
Reset cacheSettings → Local data → Reset cacheCache 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.

By draft type:

TypeWhere it livesWhen it’s lost
Server draft (submit_as: draft)Server databaseCancelled by another cashier, or deleted from the dashboard
Named local draftSQLite on Vendor DesktopBrowser 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.

Cause: Resetting the cache wipes the SQLite catalog. Some prefs (pinned products, tab order) live in the same local DB.

Fix:

  1. Prevention: before reset, open Settings → Local data → click “Backup” to snapshot.
  2. Recovery: same page → “Restore from backup” → pick the latest file.

See: Reset local data.

Send to the store owner or support@lionpos.com.