ankicommunity / anki-sync-server-rs

A personal custom Anki sync server,aim to provide an easier way for deployment
GNU Affero General Public License v3.0
180 stars 27 forks source link

when i migrate anki-sync-server to anki-sync-server-rs ,the anki client will get 500 http error #61

Closed snecker closed 1 year ago

snecker commented 1 year ago

thanks for the rust version ,it's a pretty useful version for me.

I've found a small problem when i migrated the server from python 'anki-sync-server' to this rust version,the first time when i click "sync ", the client will get http 500 error

Then i logout my previous account, and retry to log in ,then it goes well。and

it appears both in ankidroid or anki windows client,

I can solve it by logining again,but the better user experience i think is telling the user to login again (for example,show the logining dialog directly)

i've tried many version of anki-sync-server, your rust version is the only one that make me sync decks from pc to android successfully , thx for your great job!

dobefore commented 1 year ago

Thanks for choosing this version !

I assume that you haven't created an account with this version of ankisyncd?

If possible and please ,could you post the server error log out here ?So that I can inspect the problem further.

Edit:

Then i logout my previous account, and retry to log in ,then it goes well。and it appears both in ankidroid or anki windows client,

I know your concern!THis will surecause errors due to being logged-in account. Because the account you have logged in with is considered as a different ccount from the one that you just created with this server.The only way we recommend you to do is to create an new profile or logout and login with new account.

but the better user experience i think is telling the user to login again (for example,show the logining dialog directly)

And thanks for the good advice!I will try to add message like "It seems that your have an account with Anki,please log out and log in with new account" into server error log.

By the way,I want to know whether the server is working ok or not yet?

dobefore commented 1 year ago

I have adjusted the code related to session part on your suggestions,so that authentication dialog will appear when the situation you have encountered emerges.#62

snecker commented 1 year ago

Thank you so much! I have tried the latest version and re-test it, It works now!