Admin server using stale assets.db - Asset not found #24

Closed
opened 2026-06-02 23:01:56 +00:00 by shawn · 0 comments
Owner

Root cause: The admin server was using its own local assets.db (7,560 assets) instead of sharing the main app's DB (10,148 assets). Machine IDs added or imported into the main app after May 31 were invisible to the admin server, causing Asset not found errors in Clear GPS and other admin features.

Fix:

  • Copied the main app's assets.db to sync the admin server's copy
  • Updated run.sh to set CANTEEN_DB_PATH defaulting to ../canteen-asset-tracker/assets.db
  • Running admin server with CANTEEN_DB_PATH env var pointing to shared DB

Commit: 4ab08ca

Note: The stale copy was there because the admin server's code defaults to Path(__file__).parent / "assets.db" (its own directory) if the env var is not set. The run.sh now explicitly sets it.

**Root cause:** The admin server was using its own local `assets.db` (7,560 assets) instead of sharing the main app's DB (10,148 assets). Machine IDs added or imported into the main app after May 31 were invisible to the admin server, causing `Asset not found` errors in Clear GPS and other admin features. **Fix:** - Copied the main app's `assets.db` to sync the admin server's copy - Updated `run.sh` to set `CANTEEN_DB_PATH` defaulting to `../canteen-asset-tracker/assets.db` - Running admin server with `CANTEEN_DB_PATH` env var pointing to shared DB **Commit:** `4ab08ca` **Note:** The stale copy was there because the admin server's code defaults to `Path(__file__).parent / "assets.db"` (its own directory) if the env var is not set. The `run.sh` now explicitly sets it.
shawn self-assigned this 2026-06-02 23:01:56 +00:00
shawn closed this issue 2026-06-02 23:01:59 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-admin-server#24