Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will be incompatible with new versions 2.1.57+ #158

Open
dobefore opened this issue Jan 19, 2023 · 12 comments
Open

Will be incompatible with new versions 2.1.57+ #158

dobefore opened this issue Jan 19, 2023 · 12 comments

Comments

@dobefore
Copy link
Contributor

dobefore commented Jan 19, 2023

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 bundled with Anki https://docs.ankiweb.net/sync-server.html

@ccchan234
Copy link

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
Copy link

hackerb9 commented Sep 5, 2023

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
Copy link
Member

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:

  • End-to-end testing with Anki Desktop <= 5.1.57
  • End-to-end testing with Anki Desktop > 5.1.57
  • Handle the changes in the Sync protocol to pass both test cases.

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
Copy link
Member

VikashKothary commented Sep 21, 2023

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:

  • End-to-end testing with Anki Desktop < 5.1.57
  • End-to-end testing with Anki Desktop >= 5.1.57
  • Handle the changes in the Sync protocol to pass both test cases.

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
Copy link

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

@dobefore
Copy link
Contributor Author

dobefore commented Sep 22, 2023

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
Copy link
Contributor

LuckyTurtleDev commented Jan 11, 2024

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

see pr #171

@LuckyTurtleDev
Copy link
Contributor

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
Copy link

If there is something I can test let me know

@update-freak
Copy link

@kuklinistvan Can you answer the question from @LuckyTurtleDev

@VikashKothary
Copy link
Member

VikashKothary commented Jan 30, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants