ActivityWatch won't open anymore

Hello, everyone!

I’ve been using ActivityWatch for a few months now. Starting two weeks ago, the app became unresponsive, meaning I can’t open it anymore. I tried to reinstall it several times, as admin, in compatibility mode and a few other options with no luck.

Is anyone experiencing anything like this?

System specs:

image

Yes, this happend to me a few months back. In my case I get an error message “Module aw-server quit unexpectedly”.

When I check which modules are running, I can see that aw-server isn’t:
image

When the message “aw-server quit unexpectedly” shows, please press “show more” and share the info in that message. Otherwise the only thing we know is that it doesn’t start rather than why it can’t start.

Hello!

I am having this issue as well for some time now. I am in Manjaro Linux, getting “Module aw-server quit unexpectedly”.

The Details of the message are:

2020-09-07 16:16:57 [INFO ]: Using storage method: peewee  (aw_server.main:26)
2020-09-07 16:16:57 [INFO ]: Starting up...  (aw_server.main:31)
2020-09-07 16:16:57 [INFO ]: Using database file: /home/username/.local/share/activitywatch/aw-server/peewee-sqlite.v2.db  (aw_datastore.storages.peewee:90)
2020-09-07 16:16:57 [ERROR]: [Errno 98] Address already in use  (aw_server.server:93)

Edi: I have avoided re-installing because I don’t want to lose my Category naming.

The last log message means that some instance of aw-server is already running and it can’t be started twice. Maybe a restart of the computer will fix it?

Also, the category settings are saved in the browser so they will not be lost. Also, the database is saved elsewhere in your users home folder so uninstalling ActivityWatch will not remove those.

The error is thrown when I turn on the PC, so there is no “room” for restarting.

I uninstalled it and built it again (I use the AUR package), without removing any leftover files though, and the error remains.

In that case you can use tools like “ss” to find which other application is already using the port aw-server wants (which is 5600).

Ok, I used ss -tulwn and ss -tulw and the result is an esmmanager something which I have no idea what it is.

Netid                    State                     Recv-Q                    Send-Q                                                            Local Address:Port                                               Peer Address:Port                   Process           
tcp                      LISTEN                    0                         50                                                                   *:esmmanager                                                    *:*    

Is it something relevant to ActivityWatch? If not, what do you propose? Is changing ~/.config/activitywatch/aw-server/aw-server.ini port number “risky”?

Why is the “process” field empty for you? That’s the most interesting field.

Personally I had to add a -p to ss to see the process (maybe have a different version of ss or something).
For me it looks like this

$ ss -tulwnp | grep 5600
tcp   LISTEN 0      128           127.0.0.1:5600        0.0.0.0:*         users:(("aw-server",pid=9725,fd=6))

As you can see, owned by aw-server.

I have no idea what esmmanager is, should not be related to activitywatch.

Changing the port is not risky, but then you also have to change the port for all the clients (easy for aw-watcher-window and aw-watcher-afk, but for some watchers like aw-watcher-web you need to build them manually from source).

1 Like

Yes the -p flag did it, sorry I didn’t search more for it. It was a music player and I moved it to another port.

Aw-server starts fine now, thanks!

What music player was it? Would be interesting to know if others have a similar issue in the future. I assume that it always uses the same port since a reboot didn’t fix it? And I also assume that you didn’t set that port manually yourself?

Clementine! It has a feature for remote control with an android app, through the network hence it uses a port. I think it is not enabled by default, and I can’t recall if the default value was 5600. But I believe it should be the same port every time, yes.

I googled it up, seems like the default is 5500 rather than 5600. Saw it in a screenshot as well as in the source code of the Android app

2 Likes