Sync error log
Lists farmers whose Crop Actual or ATM data was rejected by the server, explains why, and opens the screen to fix it.
FactsheetSupport & admin
- Who uses it
- CadreUnit In-Charge / FMT L1
- How you get here
- Sync-error icon on the Home bottom bar (only shown when there are entries).
- Tables
sync_error_logs- APIs
- 8 calls today, 2 App Service operations
- Offline
- Fully offline.
Screens
| Screen | What it does | Source |
|---|---|---|
| Sync Error Log | List of rejected up-syncs with a red (unprocessed) or green (processed) icon. | app/src/main/java/org/platformcommons/urvi/view/home/error_log/SyncErrorFragment.kt |
Rules
Conditions from the code, rewritten as plain decision rules.
| When | Then |
|---|---|
| Error type is ITEM_PART_OF_COMPACT_BLOCK_ERROR | Message: Crop Actual for farmer X with IEID Y is part of a compact block. |
| Error type is ERR_PLATFORM_ASSET_CHECKSUM_MISMATCH | Message: land details changed, so crop or ATM data was not synced. |
| Error type is ERR_PLATFORM_ASSET_TOTAL_QUANTITY_LIMIT_EXCEED | Message: crop or ATM area exceeds the land acreage. |
| A Crop Actual row is tapped | Open Crop Actual (season actual) for that farmer. |
| An ATM row is tapped | Open ATM for that farmer. |
API contracts
Each call opens to its use case, headers, request and response bodies, and errors.
| Today: call | Use | Replaced by |
|---|---|---|
PATCH /gateway/urvi-app-service/api/v1/remote-app-actions/{id}/execution | Report a remote command as done, optionally attaching a zip of the app databases. | |
GET /gateway/asset-service/api/v1/assets/{assetId} | Refetch one asset from the server to repair a sync error. | |
GET /gateway/portfolio-service/api/v1/portfolios/portfolioLineItems?portfolioLineItems= | Refetch crop line items from the server (overwrite local after a compact-block edit lock, or pick a harvest target). | |
POST /sync-service/api/v1/data/so | Upload a snapshot of the whole offline queue for support. | |
POST /sync-service/api/v1/data/clickstream | Upload screen/action analytics. | |
SDK Firestore SYNC_LOG / PLI_IMAGE / URVI_ATTACHMENT_ISSUE | Write sync-failure copies (every 10th attempt), crop-photo fallback metadata and attachment issues. | |
SDK Firebase Storage userId/farmerId/pliId/pliId.ext | Fallback upload for crop photos that keep failing. | |
SDK Firestore / Storage DB zip dump | Upload a zip of the app databases to Firebase Storage (urvi_clear_app_data/) before wiping data. |
| App Service v2: operation | Use |
|---|---|
POST /sync/batch | Apply an ordered batch of offline mutations |
POST /telemetry | Screen events and sync-health counters (no PII) |
Behaviour notes
- Row titles: "Crop Actual sync error for farmer" or "ATM sync error for farmer".
Improve in the rewrite
- Mark entries processed automatically once the fix syncs successfully.