ankicommunity / ankicommunity-sync-server

A personal Anki sync server (so you can sync against your own server rather than AnkiWeb)
GNU Affero General Public License v3.0
870 stars 80 forks source link

Will be incompatible with new versions 2.1.57+ #158

Open dobefore opened 1 year ago

dobefore commented 1 year ago

Due to the syncing protocol update https://github.com/ankitects/anki/pull/2329 sync server is not available for Anki clients 2.1.57+ until the server catches up with new changes.

Here is the available offocial sync server bundled with Anki https://docs.ankiweb.net/sync-server.html

ccchan234 commented 1 year ago

Due to the syncing protocol update ankitects/anki#2329 sync server is not available for Anki clients 2.1.57+ until the server catches up with new changes.

Here is the available offocial sync server embeded with Anki https://docs.ankiweb.net/sync-server.html

hi, for win10 i use v2.1.54 so luckily ok.

but how about ankidroid, it always update itself. i think i am on the latest. v2.15.6 of ankidroid.

thanks

hackerb9 commented 1 year ago

Is anki-sync-server incompatible with the current clients? I was going to try it out, but I notice that this issue hasn't been resolved.

Is the suggested workaround to try ankiweb's built-in mini sync server?

VikashKothary commented 12 months ago

TL;DR: So you're a new user then I would definitely recommend trying out the new sync server as linked above. If it works for your needs then great! If not, then read below.

My guess is that all 3 Anki server's under the Anki Community have been affected by this breaking change. But I haven't had the time to actually investigate is it so I suggest also looking at https://github.com/ankicommunity/anki-sync-server-rs and https://github.com/ankicommunity/anki-api-server.

We've been using the anki python module to handle changes to the anki syncing logic. To my understanding all that code is rust now so maybe the Rust server has been able to adapt quicker. @dobefore can you confirm?

That being said, I'm aware that a lot of people use the Python sync server (this one) so the goal to catch up to the latest sync protocol. So I will try and find the time to better understand the changes and close the gap. Or even better, one of our community members with more time is able to raise a PR!

An overview of the approach I was thinking is:

If the changes are so different that the anki module becomes an hindrance, it might be worth using the custom implementation (called unki) used in the anki-api-server. This might provide a more stable experience for us since we'd only be tied to the sync protocol and not the whole anki module.

VikashKothary commented 12 months ago

TL;DR: So you're a new user then I would definitely recommend trying out the new sync server as linked above. If it works for your needs then great! If not, then read below.

My guess is that all 3 Anki server's under the Anki Community have been affected by this breaking change. But I haven't had the time to actually investigate is it so I suggest also looking at https://github.com/ankicommunity/anki-sync-server-rs and https://github.com/ankicommunity/anki-api-server.

We've been using the anki python module to handle changes to the anki syncing logic. To my understanding all that code is rust now so maybe the Rust server has been able to adapt quicker. @dobefore can you confirm?

That being said, I'm aware that a lot of people use the Python sync server (this one) so the goal to catch up to the latest sync protocol. So I will try and find the time to better understand the changes and close the gap. Or even better, one of our community members with more time is able to raise a PR!

An overview of the approach I was thinking is:

If the changes are so different that the anki module becomes an hindrance, it might be worth using the custom implementation (called unki) used in the anki-api-server. This might provide a more stable experience for us since we'd only be tied to the sync protocol and not the whole anki module.

hackerb9 commented 12 months ago

Thanks, that's exactly what I wanted to know.

dobefore commented 12 months ago

I am not sure this repo has been affected by protocol update,but users have reported the similar problem in repository https://github.com/ankicommunity/anki-sync-server-rs  ,of which I have abandoned the development.

I agree with @VikashKothary about recommending trying out new sync server.

LuckyTurtleDev commented 8 months ago

I think the project should mention in the readme that the sync server is incompatible with the current anki clients.

see pr https://github.com/ankicommunity/anki-sync-server/pull/171

LuckyTurtleDev commented 8 months ago

When exactly did this broke? I remember that this server has still work middle last year, when I had made the docker pr. But anki 2.1.57 is over 2 years olds.

update-freak commented 8 months ago

If there is something I can test let me know

update-freak commented 8 months ago

@kuklinistvan Can you answer the question from @LuckyTurtleDev

VikashKothary commented 7 months ago

This issue was when it was brought to my attention. It's not clear when it broke for other users but I assume it depends on when you updated your AnkiDesktop version that the server may stop working for you.

To provide an update otherwise, I've started writing some code to generate acceptance tests for different AnkiDesktop versions (in this case the versions around 2.1.57). Once it's clearer what as changed, we should be able to write a workaround to initially fix the incompatibility.

Once that's solved, it should allow us to build a more stable server. While we will have to match the Anki Sync API, it will allow us to make much needed changes to the core code.

If you would like to assist in the development, the first step is reverse engineering the AnkiDesktop Sync API. My plan is to use MITMProxy to do this. I welcome any volunteers who can assist me with this.

update-freak commented 6 months ago

here is the link for a docker container for the anki-sync-server: https://forums.ankiweb.net/t/docker-container-for-sync-self-hosted/40134