activitywatch: Can't open dashboard from tray icon

I’m on archlinux (kde plasma), running the latest version installed via aur (activitywatch-bin 0.8.0b3-2).

activitywatch starts fine and the trayicon is displayed, but when I click on open dashboard noting happens. There also isn’t anythin bad in the log:

2018-06-26 11:28:10 [INFO ]: Starting module aw-server  (aw_qt.manager:46)
2018-06-26 11:28:10 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:46)
2018-06-26 11:28:10 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:46)
2018-06-26 11:28:10 [INFO ]: Creating trayicon...  (aw_qt.trayicon:150)
2018-06-26 11:28:35 [INFO ]: Stopped module aw-server  (aw_qt.manager:79)
2018-06-26 11:28:35 [INFO ]: Stopped module aw-watcher-afk  (aw_qt.manager:79)
2018-06-26 11:28:35 [INFO ]: Stopped module aw-watcher-window  (aw_qt.manager:79)

When running aw-qt from the commandline there are errors though:

patrick:~ $ aw-qt 
2018-06-26 11:28:10 [INFO ]: Starting module aw-server  (aw_qt.manager:46)
2018-06-26 11:28:10 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:46)
2018-06-26 11:28:10 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:46)
2018-06-26 11:28:10 [INFO ]: Creating trayicon...  (aw_qt.trayicon:150)
fatal: not a git repository (or any of the parent directories): .git
Unable to get current commit with git
2018-06-26 11:28:10 [INFO ]: aw-watcher-window started  (aw_watcher_window.main:42)
2018-06-26 11:28:10 [INFO ]: aw-watcher-afk started  (aw_watcher_afk.afk:53)
2018-06-26 11:28:10 [INFO ]: Using storage method: peewee  (aw_server.main:26)
2018-06-26 11:28:10 [INFO ]: Starting up...  (aw_server.main:31)
2018-06-26 11:28:10 [INFO ]: Using database file: /home/patrick/.local/share/activitywatch/aw-server/peewee-sqlite.v2.db  (aw_datastore.storages.peewee:111)
 * Serving Flask app "aw-server" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
2018-06-26 11:28:10 [INFO ]:  * Running on http://localhost:5600/ (Press CTRL+C to quit)  (werkzeug:88)
2018-06-26 11:28:11 [INFO ]: Connection to aw-server established by aw-watcher-window  (aw_client.client:334)
2018-06-26 11:28:11 [INFO ]: Connection to aw-server established by aw-watcher-afk  (aw_client.client:334)
Opening dashboard
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by kde-open5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5KIOWidgets.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5KIOCore.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5I18n.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5CoreAddons.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5JobWidgets.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5Service.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5Completion.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5IconThemes.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5WindowSystem.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5ConfigWidgets.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5WidgetsAddons.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5ConfigGui.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5ConfigCore.so.5)
kde-open5: /opt/activitywatch/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/libQt5Xml.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libQt5Xml.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5DBusAddons.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5Auth.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libQt5X11Extras.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5Archive.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5ItemViews.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5Codecs.so.5)
kde-open5: /opt/activitywatch/libQt5Core.so.5: version `Qt_5.11' not found (required by /usr/lib/libKF5GuiAddons.so.5)

CShutdown initiated, stopping all services...
2018-06-26 11:28:35 [INFO ]: Stopped module aw-server  (aw_qt.manager:79)
2018-06-26 11:28:35 [INFO ]: Stopped module aw-watcher-afk  (aw_qt.manager:79)
2018-06-26 11:28:35 [INFO ]: Stopped module aw-watcher-window  (aw_qt.manager:79)

It looks like it can’t find the correct version (5.11) of qt, but it is installed:

patrick:~ $ qtdiag
Qt 5.11.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.1.1 20180531) on "xcb" 
OS: Arch Linux [linux version 4.17.2-1-ARCH]

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 21 (9 by maintainers)

Most upvoted comments

Here’s the issue:

https://github.com/ActivityWatch/aw-qt/blob/9a98933d9f4a7f6c978d947b05809020d7c71c3e/aw_qt/trayicon.py#L19..L26

When webbrowser.open is called it calls subprocess.Popen to start the browser process to handle the URL open request. The problem here is that LD_LIBRARY_PATH is set by PyInstaller for the built executables, which leads to trouble that the PyInstaller folks explicitly warn about.

Now the problem is how to unset LD_LIBRARY_PATH for the subprocess.Popen call made by webbrowser.open. An alternative is to avoid using webbrowser.open and instead directly call xdg-open using subprocess.Popen with properly (re)set LD_LIBRARY_PATH as done in the PyInstaller docs.

Since I don’t have a machine where I can repro/test this, I’ll leave it to someone else.

@omidraha Unfortunately changing the LD_LIBRARY_PATH will have no effect because the executable will override it (as stated in this comment above https://github.com/ActivityWatch/activitywatch/issues/208#issuecomment-417346407).

The only way to fix it would be to wait for a new release or build the git version from source u fortunately. We will try to make a new release soon! Until then you can access the UI by going to http://localhost:5600