Code Monkey home page Code Monkey logo

Comments (7)

Zocker1999NET avatar Zocker1999NET commented on June 26, 2024 5

For people like me finding this issue later: The Docker image URI has changed (that change is not reflected in the README of https://github.com/ankicommunity/anki-devops-services at time of writing). It is now available at https://hub.docker.com/r/ankicommunity/anki-sync-server (e.g. ankicommunity/anki-sync-server:20220516), see ankicommunity/anki-devops-services#47

from ankicommunity-sync-server.

valuex avatar valuex commented on June 26, 2024 1

Anki Desktop: 2.1.42

I've tried to use @levindu 's docker image. And It is OK for uploading, but fails to downloading.
When it comes to downloading, the error message says that the user name or password is incorrect.
Any comment on this will be appreciated. Thanks.

from ankicommunity-sync-server.

hblr avatar hblr commented on June 26, 2024

I am having the same issue and unfortunately no solution yet. However, I can provide some thoughts on it. Have you tried to sync with another application (e.g. AnkiDroid)?
For me the sync works with AnkiDroid. Hence the issue seems to be related to the Anki application itself.
Assuming the sync functionality works with the official AnkiWeb (I have not tested it yet), I suspect an API incompatibility between this anki-sync-server and the anki desktop application (version 2.1.35).

from ankicommunity-sync-server.

ndwarshuis avatar ndwarshuis commented on June 26, 2024

@hblr I just tried AnkiDroid and it appears to sync (albeit nothing since the server has nothing on it). But no 40X HTTP errors.

Server output when I sync with AnkiDroid:

anki-sync-server    | [2020-12-04 20:49:18,635]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
anki-sync-server    | [2020-12-04 20:49:19,721]:INFO:ankisyncd.CollectionThread[ndwar]:Running meta(*[], **{'v': 9, 'cv': 'ankidroid,2.14.2,android:8.1.0:Pixel XL'})
anki-sync-server    | [2020-12-04 20:49:19,756]:INFO:ankisyncd.http:172.30.0.1 "POST /sync/meta HTTP/1.0" 200 108
anki-sync-server    | [2020-12-04 20:49:19,809]:INFO:ankisyncd.CollectionThread[ndwar]:Running begin(*[], **{'skey': '68ff8e1a'})
anki-sync-server    | [2020-12-04 20:49:19,811]:INFO:ankisyncd.http:172.30.0.1 "POST /msync/begin HTTP/1.0" 200 49
anki-sync-server    | [2020-12-04 20:49:24,022]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16

I'm guessing the number for the 'v' key in "Running meta..." above (and in the OP) is the protocol version? It's 9 for AnkiDroid, and 10 for the desktop client. I'm not sure what that means yet (or if I'm right).

from ankicommunity-sync-server.

hblr avatar hblr commented on June 26, 2024

I'm guessing the number for the 'v' key in "Running meta..." above (and in the OP) is the protocol version? It's 9 for AnkiDroid, and 10 for the desktop client. I'm not sure what that means yet (or if I'm right).

By looking into the source code, parameter v seems to be the sync protocol version and cv a more detailed client information string.
https://github.com/ankicommunity/anki-sync-server/blob/f8a1fb0f9c2c66e59ae260734697d32603e2b58a/src/ankisyncd/sync_app.py#L86-L92

from ankicommunity-sync-server.

levindu avatar levindu commented on June 26, 2024

@ndwarshuis
That docker image has a rather old server code.
You'll have to build a new one yourself. See this PR .
I've archived a successful sync with Anki 2.1.35 in Arch Linux.

from ankicommunity-sync-server.

ndwarshuis avatar ndwarshuis commented on June 26, 2024

I finally got back to this and got it to work with Anki 2.1.35 (same build as in the OP). I tried uploading my local deck and nuking my local deck and redownloading it. All is well (no password issues or errors).

@levindu was indeed correct in that it was old server code that was causing this bug. Simply updating the server fixed the bug I was originally having (and so far has not introduced any new bugs).

Just to be clear for anyone else who stumbles upon this, I used anki-sync-server at commit 43f4934. This was somewhat arbitrary but I simply went forward in time from @levindu 's PR until it worked.

I also used the docker-compose files from here (note the commit hash), and the only change I made was I added the following lines after git clone in bin/download-release.sh to pull the server commit I wanted:

cd anki-sync-server
git reset --hard 43f4934de8add5f23aa9318a84c756f27214fb72
cd ..

Obviously this could be simpler if I just pulled a version tag, but the latest version is from Dec 2020 and it didn't build correctly.

from ankicommunity-sync-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.