Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening the dashboard crashes aw-qt #132

Closed
nikanar opened this issue Nov 11, 2017 · 9 comments
Closed

Opening the dashboard crashes aw-qt #132

nikanar opened this issue Nov 11, 2017 · 9 comments

Comments

@nikanar
Copy link
Contributor

nikanar commented Nov 11, 2017

I don't have a trace yet (I tend to close the console in which I launch aw-qt and I don't know where to find logs), but it already happened twice (/2), to me today that clicking "Open Dashboard" would make aw-qt crash, with only the aw-server process staying alive (nothing unexpected here).

Is there a known issue about this ?

More details to come.

(Edit : Arch Linux)

@nikanar nikanar changed the title Opening the dashboard crashes everything Opening the dashboard crashes aw-qt Nov 11, 2017
@johan-bjareholt
Copy link
Member

johan-bjareholt commented Nov 11, 2017

Hm, that's odd. I have had issues on some linux distros that the link doesn't open so i have to go to localhost:5600 manually, but it has never crashed. What OS are you using?

Edit: by the way, logs can be found at ~/.cache/activitywatch/log/ on linux as described in https://github.com/ActivityWatch/activitywatch/blob/master/CONTRIBUTING.md

@nikanar
Copy link
Contributor Author

nikanar commented Nov 11, 2017

Ah, thanks, I forgot that. Arch linux.

Nothing noticeable in those logs.
$ cat ~/.cache/activitywatch/log/*/* | grep 23:50
[there's nothing here at 23:50:31]
2017-11-10 23:50:56,912 [INFO ]: Starting module aw-server  (aw_qt.manager:44)
2017-11-10 23:50:57,916 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:44)
2017-11-10 23:50:57,922 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:44)
2017-11-10 23:50:57,927 [INFO ]: Creating trayicon...  (aw_qt.trayicon:145)

{"asctime": "2017-11-10 23:50:57,519", "filename": "main.py", "funcName": "main", "levelname": "INFO", "lineno": 25, "module": "main", "message": "Using storage method: peewee", "name": "aw_server.main", "pathname": "/home/will/.local/lib/python3.6/site-packages/aw_server/main.py"}
{"asctime": "2017-11-10 23:50:57,520", "filename": "main.py", "funcName": "main", "levelname": "INFO", "lineno": 30, "module": "main", "message": "Starting up...", "name": "aw_server.main", "pathname": "/home/will/.local/lib/python3.6/site-packages/aw_server/main.py"}
{"asctime": "2017-11-10 23:50:57,520", "filename": "peewee.py", "funcName": "__init__", "levelname": "INFO", "lineno": 111, "module": "peewee", "message": "Using database file: /home/will/.local/share/activitywatch/aw-server/peewee-sqlite.v2.db", "name": "aw_datastore.storages.peewee", "pathname": "/home/will/.local/lib/python3.6/site-packages/aw_core-0.4.0-py3.6.egg/aw_datastore/storages/peewee.py"}
{"asctime": "2017-11-10 23:50:57,525", "filename": "_internal.py", "funcName": "_log", "levelname": "INFO", "lineno": 87, "module": "_internal", "message": " * Running on http://localhost:5600/ (Press CTRL+C to quit)", "name": "werkzeug", "pathname": "/usr/lib/python3.6/site-packages/werkzeug/_internal.py"}

2017-11-10 23:50:31,108 [INFO ]: afkwatcher stopped because parent process died  (aw_watcher_afk.afk:76)
2017-11-10 23:50:58,399 [INFO ]: afkwatcher started  (aw_watcher_afk.afk:59)
2017-11-10 23:50:58,446 [INFO ]: Connection to aw-server established  (aw_client.client:257)

2017-11-10 23:50:31,153 [INFO ]: window-watcher stopped because parent process died  (aw_watcher_window.main:62)
2017-11-10 23:50:58,342 [INFO ]: Running watcher with poll time 1.0 seconds  (aw_watcher_window.main:35)
2017-11-10 23:50:58,343 [INFO ]: aw-watcher-window has started  (aw_watcher_window.main:44)
2017-11-10 23:50:58,401 [INFO ]: Connection to aw-server established  (aw_client.client:257)

@ErikBjare
Copy link
Member

ErikBjare commented Nov 11, 2017 via email

@nikanar
Copy link
Contributor Author

nikanar commented Nov 19, 2017

I can't seem to reproduce it for now. Sorry for the noise.

@nikanar nikanar closed this as completed Nov 19, 2017
@nikanar
Copy link
Contributor Author

nikanar commented Nov 22, 2017

It happened again, and/but terminal was closed.

In fact, I restarted AW and it worked well (it opened the dashboard) while the terminal was open, and then I close the terminal (process being in the background), and then it crashed again (when I clicked "Open Dashboard").

So just like in ActivityWatch/aw-watcher-window#27 : I can't get a terminal trace because the crash only happens when the terminal is closed.

It sounds like a really obscure reason, but the behavior is very well identified & stable & reproducible now on my machine.

@nikanar nikanar reopened this Nov 22, 2017
@johan-bjareholt
Copy link
Member

In your autostart of aw-qt, do something like aw-qt 2>&1 ~/.aw-qt-stdout.log so you can get the stack trace next time it crashes. We have plans to add so all stdout/stderr is redirected to the logs aswell later but that is not finished yet.

@nikanar
Copy link
Contributor Author

nikanar commented Nov 23, 2017

Good idea and it doesn't crash that way (aw-qt >~/.aw-qt-stdout.log 2>&1 or aw-qt |& tee .awqt.log to also keep the terminal messages), even with the terminal closed. Still crashes as clockwork if I don't redirect the output though.

This question seems to describe the issue, and this one also.

I suggest to first focus on ActivityWatch/aw-watcher-window#27 because it's almost certainly the very same problem and that one is easier.

@stale
Copy link

stale bot commented Feb 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the !wontfix label Feb 15, 2020
@stale
Copy link

stale bot commented Aug 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 13, 2020
@stale stale bot closed this as completed Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants