Switched to aw-server-rust; aw-watcher no longer communicating with server

I recently switched to aw-server-rust by editing the config file so it starts automatically. However, now that I’m running aw-server-rust and not running aw-server, I’m seeing that aw-watcher-window and aw-watcher-afk can no longer communicate with the server. The Chrome browser extensions is still communicating fine but it’s communicating on port 5666 because I’m running it as an unpacked extensions after modifying it to work with Brave.

Are aw-watcher-window and aw-watcher-afk hardcoded to communicate on port 5600, and that’s why they are no longer working? Do I need to be running both aw-server and aw-server-rust simultaneously to fix this? The documentation mentions there being a database migration when using aw-server-rust so I wouldn’t think I should run both?

The log file for aw-watcher-window contains lots of lines like this:

2022-06-07 22:46:05 [WARNING]: Not connected to server, 12089 requests in queue  (aw_client.client:467)

so it really feels like they are just trying to communicate on the wrong port.

I’m running the v0.12.0 beta on Windows 10, if it matters.

I think I may have fixed it. I had to edit aw-client.toml and change the port number to 5666:

hostname = ""
port = "5666"

Now it appears the watchers are able to communicate and they transmitted all the queued events (which is a nice feature BTW).

Honestly, this whole aw-server-rust thing is very confusing. It isn’t clear who should be using and why someone shouldn’t use it, since it’s clearly faster. The process of starting to use it is also confusing. I think I did the following to get here:

  1. Backup all my events by exporting them as .json, just in case.

  2. Stop ActivityWatch entirely

  3. Edit aw-qt.toml to say:

    autostart_modules = [“aw-server-rust”, “aw-watcher-afk”, “aw-watcher-window”]

    (and make sure this isn’t commented out with # symbols)

  4. Start ActivityWatch and make sure aw-server-rust has started, and aw-server has not.

  5. You now have to access the web page using port 5666, so the double-clicking on the tray icon no longer works. Go to the website and make sure everything is still working. There may or may not be a database migration that happens the first time you start this up.

  6. If your browser extension isn’t already running in testing mode (which it will if you are running it unpacked), you’ll need to somehow get that to report on port 5666.

  7. Edit aw-client.toml as mentioned earlier in my post to communicate on port 5666. Make sure the lines aren’t commented.

  8. Restart ActivityWatch

The 5666 port is considered the “testing port”. If I were you, I wouldn’t change the aw-server port, instead I would pack your modified version of aw-watcher-web, as that will make it use the standard port 5600 instead.

Hi - I had the same problem as @tinfever ; however, I just have a default install, with no modifications. This is on linux, if that makes a difference - the installation was just to unzip, so not sure if this means that the plugins are “unpacked” by default…?

Anyway, how do I tell aw-server-rust to not be in “testing” mode, and just use the normal 5600 port?