ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.7k stars 2.24k forks source link

Can not sync media from my own server #5663

Closed lightzhan-intellif closed 4 years ago

lightzhan-intellif commented 4 years ago
Reproduction Steps
  1. Click sync button
Expected Result

No error dialog pop up!

Actual Result

Pop up a dialog which says Unauthorized, I find the decks are downloaded, but no media files.
I use my own server, PC client is working well.

Debug info

Refer to the support page if you are unsure where to get the "debug info". AnkiDroid Version = 2.9.1

Android Version = 8.1.0

ACRA UUID = 6f32e204-011a-4b88-a21c-e2cb4e61ee50

Research

Enter an [ x ] character to confirm the points below:

[ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid

[ x ] I have checked the manual and the FAQ and could not find a solution to my issue

[ x ] I have searched for similar existing issues here and on the user forum

lightzhan-intellif commented 4 years ago

Thank! I have found the problem. I write it here and hope it can help others! I use Apache2 with sync server. In installation guide the authour didn't tell us if we use apache2 as proxy, we should change our url from "http(s)://ip_address/msync:port" to "http(s)://ip_address:port/msync", beause we use proxy, it should be changed. What's more, my server's DocumentRoot need authorize when it be accessed, so I get "Unauthorized" error . Hope it is useful for any others. Thanks for everyone's contribution, I love Anki : ).

lightzhan-intellif commented 4 years ago

Love Anki!