Skip to content

Fails to get active window on macOS #229

@VirenMohindra

Description

@VirenMohindra

Mac OSX 10.12.6 Sierra, running all modules + aw-watcher-spotify + aw-watcher-web
Python 3.6.3 :: Anaconda, Inc.

I added the last heartbeat for debugging purposes

Inserted:{'id': 1148, 'timestamp': datetime.datetime(2018, 9, 11, 6, 15, 45, 412000, tzinfo=datetime.timezone.utc), 'duration': datetime.timedelta(0), 'data': {'url': 'https://chrome.google.com/webstore/detail/chrome-better-history/aadbaagbanfijdnflkhepgjmhlpppbad', 'title': 'Chrome Better History - Chrome Web Store', 'audible': False, 'incognito': False}}  (aw_datastore.datastore.Bucket:120)
/Documents/activitywatch/aw_watcher_window/printAppTitle.scpt: execution error: System Events got an error: Can’t get application process 1 whose frontmost = true. Invalid index. (-1719)
2018-09-11 14:26:19 [ERROR]: Exception thrown while trying to get active window: list index out of range  (aw_watcher_window.main:68)
Traceback (most recent call last):
  File "aw_watcher_window/main.py", line 65, in heartbeat_loop
  File "aw_watcher_window/lib.py", line 46, in get_current_window
  File "aw_watcher_window/lib.py", line 23, in get_current_window_macos
  File "aw_watcher_window/macos.py", line 17, in getTitle
IndexError: list index out of range
/Users/virenmohindra/Documents/activitywatch/aw_watcher_window/printAppTitle.scpt: execution error: System Events got an error: Can’t get application process 1 whose frontmost = true. Invalid index. (-1719)
2018-09-11 15:10:08 [ERROR]: Exception thrown while trying to get active window: list index out of range  (aw_watcher_window.main:68)

and then the same error keeps on getting repeated --

../Documents/activitywatch/aw_watcher_window/printAppTitle.scpt: execution error: sh: -c: lish: -c: line 1: syntax error: unexpected end of file (2)
2018-09-11 22:49:23 [ERROR]: Exception thrown while trying to get active window: list index out of range  (aw_watcher_window.main:68)

Please let me know if you need the log files

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions