Skip to content

v0.1.2 — the kiosk survives a server outage

Choose a tag to compare

@clicktrend clicktrend released this 04 Sep 10:12
· 5 commits to main since this release

A kiosk terminal runs unattended for weeks. This release fixes what it showed during that time when the server was briefly away — and documents honestly what the app does and does not do.

Fixed

The kiosk no longer paints a raw JavaScript error on the wall. During a deployment the reverse proxy answers with HTML, not JSON. frappe-ui's frappeRequest.js fails on JSON.parse, swallows it in an empty catch, and the error object stays undefined — line 69 guards with error?.exc_type, line 73 then reads error.exc unguarded. The resulting TypeError went straight to the screen.

The kiosk now shows a plain "no connection to the server" notice, disables the PIN keypad, retries get_kiosk_config every 15 s, and recovers on its own once the server is back. It deliberately does not try to tell maintenance apart from an outage: every company signals maintenance differently, or not at all, so it is treated as one undifferentiated state.

Related: all loads now go through one catching refresh() instead of auto: true. frappe-ui re-throws after logging, and nobody was awaiting those fetches — a terminal left running for weeks accumulated unhandled rejections.

Verified with Playwright against a server answering 503 + HTML: no raw JS text, notice visible, button disabled, 0 uncaught errors, and unattended recovery once the server returned.

Documentation

  • Where your data goes — a three-level table of what the app writes: one Single, four custom fields, and Employee Checkin. Nothing writes Attendance directly.
  • Scope and limitations — seven honest points about what this app is not, with the offline queue and a quarantine log for rejected scans leading the roadmap.
  • The Auto Attendance checkbox is now named as it appears in the UI, with troubleshooting.

Upgrading

No migration steps beyond the usual bench migrate. Note that the deployment itself causes the outage that the old bundle will display incorrectly one last time.

Full changelog: v0.1.1...v0.1.2