tsudoko / anki-sync-server

Self-hosted Anki sync server
GNU Affero General Public License v3.0
491 stars 81 forks source link

AnkiDroid Syncing error 404 #43

Closed jnslmk closed 5 years ago

jnslmk commented 5 years ago

Anki Desktop 2.1.14 AnkiDroid 2.8.4

I am using anki sync server behind a NGINX reverse proxy. My setup works with the Anki desktop client with the SyncRedirector Add-on and the following URLs defined:

{
    "msyncUrl": "http://ankisync.my-domain.org/msync/",
    "syncUrl": "http://ankisync.my-domain.org/sync/"
}

It also works via local network with the IP configured directly:

{
    "msyncUrl": "http://192.168.0.x:27701/msync/",
    "syncUrl": "http://192.168.0.x/sync/"
}

However, I tried both variants with and without a trailing slash at the end of the URL and get the following error with all configurations:

Syncing error, type: 404, message: Not Found

Accessing http://ankisync.my-domain.org/ via mobile web browser displays Anki Sync Server correctly.

I'd be grateful for hints on how to debug this issue further.

tsudoko commented 5 years ago

Does the sync URL field contain /sync/? It shouldn't, as AnkiDroid appends sync/ on its own. Otherwise, looking at ankisyncd and nginx logs might help.

jnslmk commented 5 years ago

Thank you! Yes, the URL field ended with /sync. Removing it solved the problem. It also showed in the nginx logs