ActivityWatch / ActivityWatch/aw-server-rust

aw-watcher-jetbrains fails with aw-server-rust

Offen
#174 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
315
Forks
96
Ø Merge
2 T. 21 Std.
Gemergte PRs (30 T.)
14

Beschreibung

https://github.com/OlivierMary/aw-watcher-jetbrains

Running activitywatch-0.9.2

There seems to be an issue with the JSON being sent, but because we don't appear to have `--log-json` in aw-server-rust I can't work out what the issue is.

This is the output from aw-server-rust
```
[2020-10-05][11:30:52][rocket::rocket][INFO] POST /api/0/buckets/aw-watcher-PhpStorm_L0365/events application/json; charset=utf-8:
[2020-10-05][11:30:52][_][INFO] Matched: POST /api/0/buckets//events (bucket_events_create)
[2020-10-05][11:30:52][_][ERROR] Couldn't parse JSON body: Error("invalid type: map, expected a sequence", line: 1, column: 0)
[2020-10-05][11:30:52][_][INFO] Outcome: Failure
[2020-10-05][11:30:52][_][WARN] Responding with 422 Unprocessable Entity catcher.
[2020-10-05][11:30:52][_][INFO] Response succeeded.
```

And this is debugging from aw-server showing the json (edited to protect some data)
```
2020-10-05 11:36:46 [DEBUG]: Received post request for event in bucket 'aw-watcher-PhpStorm_L0365' and data: {'timestamp': '2020-10-05T11:36:43.909+08:00', 'duration': 2.031, 'data': {'file': '/src/app/Repository/CardRepository.php', 'project': 'intranet', 'projectPath': '/home/timw/src/app', 'language': 'PHP', 'editor': 'PhpStorm', 'editorVersion': '2020.2.2', 'eventType': 'fr.mary.olivier.aw.watcher.listener.RAVisibleAreaListener'}} (aw_server:168)
2020-10-05 11:36:46 [DEBUG]: 200 (127.0.0.1): POST /api/0/buckets/aw-watcher-PhpStorm_L0365/events HTTP/1.1 (flask:25)
```

I'm not sure if this is a bug in aw-server-rust or aw-watcher-jetbrains, but there is a compatability issue. If you can let me know what the problem is (and/or how to get log-json in aw-server-rust) then I can help aw-watch-jetbrains implement the fix if that's what's needed.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.