Documentation Index
Fetch the complete documentation index at: https://docs.laportenard.com/llms.txt
Use this file to discover all available pages before exploring further.
Orders do not persist after navigation or reload (dev mode)
Symptoms
Running in development mode (npm run dev) with mock bootstrap data. Adding items to an order, navigating away, or refreshing causes the order to appear lost — even though Dexie persistence is enabled.
Root cause
React StrictMode in development performs a mount → unmount → remount cycle. The POS restore effect used a mount-guard ref that was not reset on cleanup. On remount, restore was skipped and persisted state was not loaded back into the UI.Fix
Insrc/features/sales/hooks/usePOS.tsx, reset the restore-guard ref in the effect cleanup:
Verify
- Start the dev server:
npm run dev - Open a table and add at least one item
- Navigate back to the floor plan and return to the same table (or refresh
/order) - Confirm the order is restored
Hub won’t start: cannot find module ‘@nu/sync-protocol’
Build the protocol package first:Auth fails for all terminals
Make sure Odoo is running and credentials innu_pos_hub/.env are correct. In local development, ensure HUB_DEV_AUTH=true is set in the hub’s .env file.
Frontend stuck in “Connecting” state
- Is the hub running?
curl http://localhost:8766/health - Is
nu_hub_enabledset totruein bootstrap config? - Check browser DevTools Network tab for WebSocket connection attempts
- Look for connection errors in the browser console
Orders not forwarding to Odoo
- Is Odoo reachable from the hub?
curl http://localhost:8069/web/login - Check hub logs for forwarding errors:
journalctl -u pos-hub -f - The hub authenticates as
ODOO_USER/ODOO_PASSWORD— ensure this user has POS access
Customer RNC validation fails
- Check internet connection (DGII requires external access)
- Verify the DGII module is installed on Odoo
- Personal cédulas may not be in the DGII registry — this is expected behavior
Android tablet not connecting to hub
Symptoms
The Android app logs in to Odoo successfully but never connects to the hub WebSocket. The sync status indicator stays disconnected. No connection attempts appear in hub logs.Root cause
Android WebView enforces CSP strictly. Scheme-specific wildcards (ws://*, wss://*) in connect-src do not match IP addresses on Android. Additionally, Android 9+ blocks cleartext (ws://) traffic by default.
Fix
-
Use bare
*inconnect-srcinsrc-tauri/tauri.conf.json: -
Set
usesCleartextTrafficto"true"in thedefaultConfigblock ofsrc-tauri/gen/android/app/build.gradle.kts - Rebuild and reinstall the APK
Verify
- Check hub logs for a WebSocket connection from the tablet’s device ID
- Confirm the sync status indicator shows connected
- Create an order on the tablet and verify it appears on other terminals