Troubleshooting¶
Agent remains offline (Linux / Windows)¶
- Check agent logs:
- Verify WebSocket reachability from client network (
wss://your-server/ws). - Confirm device is approved in Admin → Devices.
- Match
agent_versiontoTIMEKPR_SERVER_VERSION(dev serverv0.0.0-devaccepts any version).
Android policy not syncing¶
- Ensure task worker is running (
task_worker.pyor Dockertasks). - Without FCM, policies sync on WorkManager interval (~4 hours) or when app opens.
- Configure
FCM_SERVER_KEYorFIREBASE_CREDENTIALS_JSONfor push wake. - Confirm Usage Access and VPN consent on non-Device-Owner installs.
Android multi-user and Device Owner¶
Symptom: server does not see child profiles¶
Cause: Device Admin on the parent (User 0) profile cannot enumerate secondary Android users. Guardian only calls getSecondaryUsers() when the app is Device Owner on User 0.
Fix (full shared-tablet management):
- Provision Device Owner (MDM factory-reset QR recommended)
- Pair from User 0
- Create or map child profiles
- Choose Secondary users management mode during MDM setup when prompted
Cannot set Device Owner¶
Android blocks ADB dpm set-device-owner when:
- Google or other accounts exist on User 0
- Secondary users already exist on the device
You must remove accounts and extra users (or factory reset) before Device Owner provisioning—not a Guardian limitation.
Workaround without Device Owner¶
Install and pair Guardian inside the child profile only as a separate device registration. Expect reduced enforcement (package suspension requires Device Owner). See Android agent — multi-user.
Nintendo Switch stale or failing sync¶
- Run background worker with
TIMEKPR_TASKS_UPDATE_USER_DATA=1. - Click Sync Now on device detail.
- Re-link Nintendo Account under Settings if session expired.
- Player nicknames populate after first successful sync.
Xbox stale or failing sync¶
Same pattern as Nintendo: worker enabled, Sync Now, re-link Xbox account, validate with account status API.
Version mismatch / Android update loop¶
Release server rejects hello when versions differ. Android receives update_required with APK URL and signature checksum. Ensure GitHub release assets exist or upload dev APK in Settings.
CI Android signing failures¶
Verify ANDROID_KEYSTORE_BASE64 and password/alias secrets match the release keystore. See CI & releases.
Policy not applying on Linux mapping¶
- Verify mapping Verified status.
- Linux device restrictions apply only to seat0 active session user—another user logged in on console won't receive polkit/terminal blocks.
- Check agent logs for AppArmor or DNS errors.
Webhook not firing¶
- Enable webhook in Settings with valid URL.
- Confirm
TIMEKPR_TASKS_DELIVER_ALERTSis not disabled. - Verify receiver accepts POST JSON and optional HMAC signature.
AppArmor profile loading errors / service failure¶
Symptom¶
apparmor.service fails to start or reload, reporting errors in system logs such as:
* Found reference to variable HOMEDIRS, but is never declared
* Could not open 'abstractions/base' or Could not open 'abi/3.0'
Causes¶
- Stale Profiles: Upgrading from the old
timekpragent toguardiancan leave outdated profiles (e.g. starting withtimekpr-) in/etc/apparmor.d/that do not properly include<tunables/global>at the top. - Missing Base Abstractions: On some Linux distributions (such as Arch or CachyOS), the system abstractions package might be incomplete or missing base files.
- No Traversable Permissions: Running commands like
ls -la /etc/apparmor.d/...as a non-root user may falsely returnNo such file or directory(instead ofPermission denied) if the parent directory has root-only permissions.
Solutions¶
- Run the Installer: The updated
install-agent.shscript automatically unloads and purges all oldtimekpr-*profiles. - Verify Abstraction Files (as root): Check if the base files actually exist on disk:
- Reinstall AppArmor package: If the files are missing, reinstall the base package to restore them:
- On Arch/CachyOS:
sudo pacman -S apparmor - On Debian/Ubuntu:
sudo apt-get install --reinstall apparmor