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

Syncing error: ⁨error decoding response body: missing field mod at line 1 column 99 #117

Open
gla23 opened this issue Dec 22, 2021 · 9 comments

Comments

@gla23
Copy link

gla23 commented Dec 22, 2021

When I sync to the server, Anki shows this error:

Error details: ⁨error decoding response body: missing field mod at line 1 column 99
Screenshot 2021-12-22 at 10 53 15

At which point the running process on the backend gives the following output:

[2021-12-22 10:53:27,019]:INFO:ankisyncd.http:127.0.0.1 "GET /msync/begin?k=4b3a8990496166b7c559a3a63fd064b2&v=anki%2C2.1.49+%28dc80804a%29%2Cmac%3A10.16 HTTP/1.1" 403 157
[2021-12-22 10:53:27,045]:INFO:ankisyncd.CollectionThread[ggwp]:Running meta(*[], **{'v': 10, 'cv': 'anki,2.1.49 (dc80804a),mac:10.16'})
[2021-12-22 10:53:27,046]:INFO:ankisyncd.http:127.0.0.1 "POST /sync/meta HTTP/1.1" 200 99

⁩It looks like the /msync/begin call is failing (returns a 443) and so understandably the frontend is confused when there's no body on the response.

How can I start debugging this?

By the way I'm using apache with this in the VirtualHost for the proxy. According to what I could find on stack overflow the SetEnv proxy-sendcl 1 line should be unchunking the requests properly.

  ProxyPreserveHost On
  ProxyRequests Off
  ProxyPass /anki/ http://localhost:27701/
  ProxyPassReverse /anki/ http://localhost:27701/

  SetEnv proxy-sendcl 1 
@dobefore
Copy link
Contributor

sorry,totally unfamiliar with apache.
How about switching to other reverse proxies,like nginx and caddy?
here is a good example on how to configure nginx #97
After you test with nginx,if no problem with it,then the culprit is apache.
feel free to add

@kanjieater
Copy link

kanjieater commented Dec 25, 2021

I'm getting this as well, and using nginx. Even without the reverse proxy this occurs. I'm currently on Anki 2.1.35.

@dobefore
Copy link
Contributor

this may help #56

@gla23
Copy link
Author

gla23 commented Dec 27, 2021

Thanks for the reply. Unfortunately I had a proper look through #56 before creating this issue and couldn't find anything that helps. I tried the git reset in this comment but the commit hash doesn't exist.

The OP fixed their issue by updating their sync server to the newest version. When I do git fetch, I'm already on the latest version (41205c0b92290bc3dc6e50d401dc9dbf33bdd52c)

Not sure where to go from here.

@dobefore
Copy link
Contributor

one more thing to confirm,are you under develop branch?

@gla23
Copy link
Author

gla23 commented Dec 28, 2021

Oh it turns out I was on the wrong repository! Somehow I had origin set as a different anki-sync-server fork. I should have noticed that something was off in my previous comment when the commit hash didn't exist...

I'm on the develop branch now. When I run what previously started the server (python -m ankisyncd) as explained in the readme, I get:

/usr/bin/python: No module named ankisyncd.__main__; 'ankisyncd' is a package and cannot be directly executed

I'm guessing this is because there's been an undocumented restructure and it no longer works the same way?
I've installed the new dependencies with pip install -r src/requirements.txt.

@GustavoDouradoSilva
Copy link

GustavoDouradoSilva commented Jan 21, 2022

had same issue while running anki-official-binary-bundle 2.1.49-1 on manjaro linux. "Solved" it by running 2.1.15 https://github.com/ankitects/anki/releases/tag/2.1.15

I got this problem because i am using anki-sync-server which i link to the server using http and ip

@MrDrache333
Copy link

Same problem here with Anki Desktop for macOS on macOS 12.3 and Anki 2.1.49 and the latest Docker Image.

@Love4yzp
Copy link

Love4yzp commented Apr 1, 2022

Anki 2.1.49

Using the docker Anki sync server, I changed my AnkiDroid version below 3.10 (V3.9.7), which helps me solve the SSL Problem

But on PC, I have no idea.

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