Activity Watch Mobile Query Error

Does the android version of Activity Watch support queries? Any query I write, even the default one, returns this error

ParsingError("(None, \"expectedBool,Ident,LBrace,LBracket,LParen,Number,RParen, orString\")")

Yes it supports queries, that’s what the activities view also uses and I assume that works for you?

The default query does not work though on older versions of aw-server-rust, I don’t remember what version of aw-server-rust the latest aw-android version uses though.

ParsingError just means that the query had an invalid syntax.

hmm that’s odd, I’m using the same query on mobile as I am on the desktop version just switching out the bucket name.

The query I am using is

events = query_bucket(find_bucket('aw-watcher-android-test'));
RETURN = events;

Is there something wrong with the query?

This android version is from the play store and the aw-server-rust version is v0.1

I think single quotes are not allowed in aw-server-rust.

The reason why it works on the desktop but not on mobile is because the desktop does not run the aw-server-rust but just the old aw-server in python. In the future the desktop version will be replaced by the rust server as well.

It’s also odd that all of you events have a duration of 0 in the screenshot, that should not be the case and is likely a bug. @erikbjare do you know what the issue might be?

That’s a good tidbit are there many query differences between the rust and old python server? Unfortunately I’m still getting a similar error when using double quotes. This query

events = query_bucket(find_bucket("aw-watcher-android-test"));
RETURN = events;

returns this similar error

ParsingError("(Some((Semi, Span { lo: 80, hi: 81, line: 3 })), \"expectedBool,Ident,If,LBrace,LBracket,LParen,Number,RBrace,Return,String, or end of file\")")

Actually looking at my history on mobile the majority of my events have a duration of 0, maybe half…

That exact query works on aw-server-rust on the desktop with the latest version, I just tested. So there is likely an bug in the older aw-server-rust version in the android app so it will likely work in the next version whenever that is.

Ok, I’ll open up an issue on the github repo so this isn’t lost. Thanks for the help!
edit: here is the github issue

1 Like