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

anki server sync not sync #29

Open
CharlyJr opened this issue Feb 9, 2021 · 10 comments
Open

anki server sync not sync #29

CharlyJr opened this issue Feb 9, 2021 · 10 comments

Comments

@CharlyJr
Copy link

CharlyJr commented Feb 9, 2021

when click in sync...

conection error
error decoding response body: missing field mod at line 1 column 99

seconds later...

anki id and password are wrong

I can`t use docker image and anki desktop, latest version both and i have installed Djankiserv connect

@limitedAtonement
Copy link
Contributor

Can reproduce. I installed latest Anki yesterday and latest anki-devops-service today, both on Arch Linux.

@VikashKothary
Copy link
Member

This looks like a duplicate of ankicommunity/ankicommunity-sync-server#56. It looks like this is an issue in the server rather regarding the Docker image.

@CharlyJr
Copy link
Author

I don't think it's the server, in AnkiDroid it works perfect, it synchronizes me without problems.
I installed the latest version of AnkiDesktop 2.1.43 on Ubuntu 20.04 (before it was on windows) and it doesn't work for me either, it gives me the following horrors:

A connection error has occurred.
Error details: error decoding response body: missing field mod at line 1 column 99
2)
The AnkiWeb ID or password is wrong; please try again.

Please help!!! I need to study!!!!!!

@CharlyJr
Copy link
Author

The server is installed on docker

@limitedAtonement
Copy link
Contributor

@CharlyJr Since I cannot get the anki sync server set up, I'm not using it. It's only necessary when you want to study from a different computer. When I do that, I wrote a script that copies ~/.local/Anki and ~/.local/Anki2 to my current machine, runs anki, then copies them back. Good luck out there!

@CharlyJr
Copy link
Author

@CharlyJr Since I cannot get the anki sync server set up, I'm not using it. It's only necessary when you want to study from a different computer. When I do that, I wrote a script that copies ~/.local/Anki and ~/.local/Anki2 to my current machine, runs anki, then copies them back. Good luck out there!

Thanks for the detail!
The topic is that not always I am in house and when I am out to revise with the cellular one it is the double perfect one, that's why my insistence in spite of the fact that the servant mounts, since what I am studying I am loading manually.
Greetings!

@andrewchenshx
Copy link

same issue.
Version ⁨2.1.44 (b2b3275f)⁩

@jacktheripper19
Copy link

I get the same error when checking for media log. I didn't notice until recently that new added cards don't play audio. The cards sync well in both anki and ankidroid but the audio in newly added cards don't get to the server apparently and in media log I see the message:

Tue Aug 10 20:12:42 2021: Media sync starting...
Tue Aug 10 20:12:43 2021: A network error occurred.

Error details: ⁨Please force a full sync in the Preferences screen to bring your devices into sync. Then, please use the Check Database feature, and sync to your other devices. If problems persist, please post on the support forum.

error decoding response body: invalid type: null, expected a string at line 1 column 56⁩

@SyntaxBlitz
Copy link

I had the same problem @jacktheripper19 above mentioned. This happened after I spent some time using an older version of the sync server (the 2020 Docker image mentioned as being out of date in ankicommunity/ankicommunity-sync-server#56), with Anki desktop 2.15. After switching to the newest version of the sync server and of Anki desktop, I was able to get my cards but not my media to sync correctly.

I did some debugging and found that the null value referenced in the error message was a None in the response from the server in the csum (checksum) field returned in the mediaChanges endpoint (ref).

I think all of these null-checksum entries are orphaned, i.e. they don't appear in any of my cards. They seem to have filenames related to some audio clips that I do have in my actual cards, but files with these particular names don't show up in my media collection on the server.

My hunch is that I could have solved this by re-syncing my desktop Anki profile from the client to the new server build from scratch (as opposed to what I did, which was to create a new desktop Anki profile and pull down from my existing anki-sync-server database, which I copied from my old install).

Instead, my solution was to just add an explicit null check in anki-sync-server's sync_app.py:

                if csum is not None:
                  result.append([fname, usn, csum])

This got the sync working, and "Tools->Check Media" in desktop Anki reports that every card has its media. I'll probably just leave the null check in here and hope it doesn't mask any problems.

mfilser added a commit to mfilser/anki-sync-server that referenced this issue Oct 12, 2023
@mfilser
Copy link

mfilser commented Oct 12, 2023

This patched worked for me as well, thank you :)

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

7 participants