Skip to content

Error on idle iteration: Failed to send heartbeat #62

@wojnilowicz

Description

@wojnilowicz

I regularly get lines like this one (not only at system startup like in this example)
[2025-08-30 05:49:35.103571 ERROR watchers::watchers] Error on idle iteration: Failed to send heartbeat
They appear in
journalctl -b --user-unit=aw-awatcher.service

The site http://localhost:5600/#/timeline around 07:49:35 shows that indeed there is no "afk" event logged.
Image
The aw-server (started with aw-server --verbose) log (see the attached file) shows two POSTs:
[2025-08-30 07:49:35][INFO][rocket::server]: POST //api/0/buckets/aw-watcher-afk_username application/json:
and shortly after
[2025-08-30 07:49:35][INFO][rocket::server]: POST //api/0/buckets/aw-watcher-window_username application/json:
and both with successful responses.

The relevant code lines are as below

Self::run_with_retries(request)
.await
.with_context(|| "Failed to send heartbeat")

This error is a bit unsettling. Why does this happen and can this be prevented?

Additional info:

  1. sway version 1.10.1
  2. Activity Watcher 0.3.1
  3. aw-server 0.13.1+c640979

awatcher-log-till-failure.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions