Custom editor activity watcher results in Request error on the overview


#1

Hello,

I’ve been working on an emacs activity watch but unfortunately I am having an issue related with the Activity overview tab.

The frontend produces the following error after querying the editor bucket:

TypeError: Cannot read property 'duration' of undefined.

The error happens on Activity.vue line 413 (from the latest github release). I’ve been trying to debug it locally without success.

The query returns the following data, which seems correct to me:

[
  {
    "languages": [
      {
        "id": null, 
        "data": {
          "language": "ruby-mode"
        }, 
        "timestamp": "2018-10-16T07:18:36+00:00", 
        "duration": 168.0
      }, 
      {
        "id": null, 
        "data": {
          "language": "emacs-lisp-mode"
        }, 
        "timestamp": "2018-10-16T07:17:34+00:00", 
        "duration": 146.0
      }
    ], 
    "files": [
      {
        "id": null, 
        "data": {
          "file": "/home/paul/tymate/redacted/app/jobs/feed_activity_notification_job.rb", 
          "language": "ruby-mode"
        }, 
        "timestamp": "2018-10-16T07:18:36+00:00", 
        "duration": 168.0
      }, 
      {
        "id": null, 
        "data": {
          "file": "/home/paul/tymate/wakatime-mode/wakatime-mode.el", 
          "language": "emacs-lisp-mode"
        }, 
        "timestamp": "2018-10-16T07:17:34+00:00", 
        "duration": 146.0
      }
    ], 
    "projects": [
      {
        "id": null, 
        "data": {
          "project": "redacted"
        }, 
        "timestamp": "2018-10-16T07:18:36+00:00", 
        "duration": 168.0
      }, 
      {
        "id": null, 
        "data": {
          "project": "wakatime-mode"
        }, 
        "timestamp": "2018-10-16T07:17:34+00:00", 
        "duration": 146.0
      }
    ], 
    "duration": 314.0
  }
]

Any recommendation on how to proceed next? I would love to resolve these issues and be able to contribute an Emacs activity watch mode!


#2

Just a quick update, I have installed activity watch from git and it works correctly. So I guess all is good now.

I will try to publish the emacs package soon so everyone can benefit from it.


#3

There is a bug specific for 0.7 beta 6 which breaks editor visualization but is fixed in master as you just found out the hard way.
Sorry for the inconvenience! We really should make a new release…

Awesome with the emacs watcher! Looking forward to testing it out :slight_smile:


#4

There it is https://github.com/pauldub/activity-watch-mode I also have submitted a PR for inclusion into MELPA: https://github.com/melpa/melpa/pull/5759