Bluetooth page stuck on Loading forever when bluetoothd is not running #66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How it was found: clicking through the
98be903build (main, v2 merged) in a headless BOS live VM on 2026-10-13. The VM has no Bluetooth adapter, and bluetooth.service is inactive. Bluetooth still said "Loading..." more than 2 minutes after opening.Confidence: high. In the same VM,
timeout 5 bluetoothctl listexits 124: bluetoothctl waits for bluetoothd forever. Home handles the same machine fine ("No adapter").Bug: src/src/commands/bluetooth.rs runs every bluetoothctl call (
get_adapter_poweredshow,run_devices,info,power) throughCommand::output().awaitwith no timeout. When bluetoothd is not running (service disabled, or no adapter so the service never starts), the first call never returns, and the page never leaves its loading state. Any user who has disabled the Bluetooth service sees this.Fix: wrap bluetoothctl calls in a short tokio timeout (or check
systemctl is-active bluetoothfirst), treat a timeout as "no adapter / Bluetooth service off", and show that state with a way to start the service.PR: #77 (head
40a9ec5)Review PASS for PR #77, exact head
40a9ec5ae9(base main14d1315, mergeable).Criteria:
Checks run on the exact head in a scratch worktree: cargo fmt --check ok; cargo clippy --locked --all-targets -D warnings ok; cargo test --locked 147 passed; npm ci, npm run check (0 errors, 0 warnings), npm test, npm run build all exit 0.
CI: Forgejo status "check / check (push)" success on
40a9ec5. No reviews or change requests on the PR.Non-blocking notes: systemctl is-active has no explicit timeout (it does not wait on bluetoothd). The pair timeout kills bluetoothctl at 30s, which is acceptable. No test covers get_bluetooth_state branches directly.
Not merged: the reviewer session has no Forgejo PR or merge tools, so the PR is awaiting merge by the coordinator.
Verified on integrated main
a7b3e8b(mergea7b3e8b, PR #77): hung_command_times_out_and_is_killed, adapter sysfs test, 179 cargo tests, svelte-check/npm test/build pass. Live VM (no adapter, bluetooth.service inactive): page shows No Bluetooth adapter found immediately instead of hanging.