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

When I log in, it shows that the username and password are wrong #22

Open
fusang1337 opened this issue Jan 2, 2021 · 12 comments
Open

Comments

@fusang1337
Copy link

  • AnkiDesktop version number: 2.1.19
  • AnkiDroid version number: 2.9.1

Summary

When I log in, it shows that the username and password are wrong

Reproduction (what did you do - the more details you give, the better):
1 docker deployment
2 Username and password have been set

log:
auth.db found
,collections directory exists
,No outdated 'auth' table found.
,Starting tsudoko's anki-sync-server
,No outdated 'session' table found.
,Updating database schema
,[2021-01-02 14:50:29,852]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,ankisyncd.conf found
,[2021-01-02 14:49:42,327]:INFO:ankisyncd:ankisyncd [unknown version] (https://github.com/tsudoko/anki-sync-server)
,[2021-01-02 14:49:42,337]:INFO:ankisyncd:Loaded config from /app/anki-sync-server/ankisyncd.conf
,[2021-01-02 14:49:42,337]:INFO:ankisyncd.users:Found auth_db_path in config, using SqliteUserManager for auth
,[2021-01-02 14:49:42,339]:INFO:ankisyncd.sessions:Found session_db_path in config, using SqliteSessionManager for auth
,[2021-01-02 14:49:42,340]:INFO:ankisyncd:Serving HTTP on 0.0.0.0 port 27701...
,[2021-01-02 14:49:47,065]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:49:52,539]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:03,211]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:49:57,872]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:08,547]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:13,863]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:19,204]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:24,536]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:35,195]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:40,527]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
,[2021-01-02 14:50:45,877]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16

What was expected to happen:

What happened instead (the more details you give, the better):

@kuklinistvan
Copy link
Collaborator

Hello,
which client was not able to synchronize?

@fusang1337
Copy link
Author

Hello,
which client was not able to synchronize?

喂,哪个客户端无法同步?

both 
AnkiDesktop : 2.1.19
AnkiDroid : 2.9.1

@kuklinistvan
Copy link
Collaborator

I see. I did an attempt to reproduce your issue - however, I was a bit occupied (as always :)) and I did not have an installation ready on my current distribution to test your problem.

Now I ran into an issue compiling Anki 2.1.19 for my platform. Meanwhile I'm figuring the latter out, I'm checking the Android version.

I've asked the community about that on Gitter. For the record, I'm copying that here as well.

Hello again,
I need some help. I was trying to run Anki Desktop version 2.1.19 on Void Linux from source (as version 2.1.15 is the latest one that is available on this platform), using the run script. I was attempting the reproduction of #22. Now I'm stuck with a segmentation fault.
As this did not serve me with a lot of information, I've started to dig into the source of Anki and I have found that the problem occurs at creating a RustBackend object instance - that is, with that commented out, the segmentation fault no longer occurs.
I'm not yet familiar with Rust and maturin, but meanwhile it seems that the Rust libraries and their dependencies are built successfully, the problem occurs anyway.
I could run Anki Desktop 2.1.38 from source, though.

Do any of you have experience with that error above?

@EgidioCaprino
Copy link

@fusang1337 was this fixed for you? I'm experiencing the same issue. I added my user with

./ankisyncctl.py adduser egidio
./ankisyncctl.py passwd egidio

But I can't login in Anki desktop 2.1.62. I have the exact same messages in the log

@QuantumCoded
Copy link

Having the same issue with Anki for iOS 2.0.92 and AnkiDesktop 2.1.61. I also have the same log messages.

@Opisek
Copy link

Opisek commented Jun 11, 2023

AnkiDesktop 2.1.65: When trying to log in, the error Authentication failed for nonexistent user None. is thrown. Not sure if this is the same issue.

@fritzcloud
Copy link

fritzcloud commented Jun 12, 2023

AnkiDesktop 2.1.65: When trying to log in, the error Authentication failed for nonexistent user None. is thrown. Not sure if this is the same issue.

I am having this issue as well, lsuser shows my created user, but when I try to login from anki mobile or desktop client I am getting that in the log.

Edit: This works: https://github.com/ankicommunity/anki-sync-server-rs/

@needthisforctf
Copy link

needthisforctf commented Dec 15, 2023

Okay, did a bit of a digging. Essentially, the server tries to get the username and password from u and p provided in post request to /sync/hostKey, but my anki app version 23.10.1 doesn't provide such values in the post request, because it instead provides what seems like a session key using parameter s (that's why rust version linked above works).

@needthisforctf
Copy link

Apparently, kuklinistvan/anki-sync-server docker image has been updated 3 years ago and the current code is different = might work. So anyone who stumbles on this issue — follow the python instruction and let us know if it works, it just might.

@0wle
Copy link

0wle commented Jan 14, 2024

Edit: This works: https://github.com/ankicommunity/anki-sync-server-rs/

Since this repository has been archived I have decided to simply create my own docker image with the official anki sync server following the instructions for cargo

@namelivia
Copy link

namelivia commented Sep 25, 2024

Edit: This works: https://github.com/ankicommunity/anki-sync-server-rs/

Since this repository has been archived I have decided to simply create my own docker image with the official anki sync server following the instructions for cargo

Would you mind sharing the image setup?

Looks like the repository is not archived anymore, it has been transferred to ankicommunity. Maybe we can try opening a PR here, I believe @VikashKothary is still reviewing them.

@tomasmetal23
Copy link

Edit: This works: https://github.com/ankicommunity/anki-sync-server-rs/

Since this repository has been archived I have decided to simply create my own docker image with the official anki sync server following the instructions for cargo

Would you mind sharing the image setup?

Looks like the repository is not archived anymore, it has been transferred to ankicommunity. Maybe we can try opening a PR here, I believe @VikashKothary is still reviewing them.

check this, its work for me.
https://github.com/tomasmetal23/Anki-Sync-Server

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

10 participants