jonhadfield/sn-cli

error: unhandled type 'SN|ItemsKey'

Closed this issue · 3 comments

Hello,

I'm trying to use this tool to recover from a borked sync with my account. I can't seem to perform any operations though: they all return error: unhandled type 'SN|ItemsKey'

$ sn --use-session get notes
error: unhandled type 'SN|ItemsKey'

$ sn --use-session get tag  
error: unhandled type 'SN|ItemsKey'

$ sn --use-session stats
COUNTS
Notes    0
Tags     0
Deleted  0

The stats output is surprising, as the web UI shows all 2200 notes and 100 tags.

Any thoughts on what I can do to debug?

Note that the sn --debug --use-session add note --title "test" --text "hello from cli" commands works fine and creates the note.

re-running the stats command still shows zero notes/tags/items.

Sorry for the delay.
There have been some significant updates to the SN API, including encryption that introduced a new type called ItemsKey. In November, any new account would use SN encryption version 004 by default and any older accounts (on 003) that added new items, including Notes, would start using 004 for those items only.
I've finally added basic support (please make a backup first!) for accounts that use 004 exclusively. You can upgrade your account to use 004 only by simply performing a backup and then restore via the official SN clients.

I've not implemented the fixup option for 004 yet, but will be working on it shortly.

Will close and follow up in #21.