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

Authentication failed for nonexistent user None. #164

Open
p-curtis opened this issue Sep 25, 2023 · 2 comments
Open

Authentication failed for nonexistent user None. #164

p-curtis opened this issue Sep 25, 2023 · 2 comments

Comments

@p-curtis
Copy link

Hope this is the right forum. First time leaving an issue on GitHub.
Edit: Originally posted on Tsudoko's repo but realized he hasn't answered in any issues in a couple of years.

Long story short, I've set up a docker container (kuklinistvan/anki-sync-server) for Anki-Sync-Server (AnkiSS) and when attempting to use the Anki Desktop client to sync, I'm receiving the "AnkiWeb ID or password was incorrect; please try again." error. When looking at the server logs it says "Authentication failed for nonexistent user None.".

AnkiSS is on a Linux Server and the Anki Desktop is on a Linux Client.
The Anki Desktop client is v2.1.66.

To go over set up & troubleshooting steps:
On the AnkiSS host, I've ran the ./ankisyncctl.py adduser command, as noted in the linked documentation.

Troubleshooting output is shown below:

  1. Docker-Compose config
  2. The wireshark output as observed on the client
  3. As well as the docker logs from the running conainer showing that it receives the request (first line)
  4. The in-container AnkiSS output that shows the user exists.

My goal is to identify (as shown in # 3) why a user of NONE is observed on the server, even after I've explicitly created one and validated that one exists. Also, I would like to know if there is anything in general I am missing or misunderstanding about the Sync Server's purpose/configuration.

I have an nginx proxy, but I tried with both FQDN and just IP and the result is the same.

01. Docker Compose:

version: "3.8"

services:
  anki-sync-server:
    image: kuklinistvan/anki-sync-server:latest
    container_name: anki-sync-server
    restart: unless-stopped
    ports:
    - "1257:27701"
    volumes:
    - ./data/sync_server:/app/data
    logging:
      options:
        max-size: "10m"
        max-file: "3"

02. Wireshark HTTP Stream:

---- POST ----

POST /sync/hostKey HTTP/1.1
anki-sync: {"v":11,"k":"","c":"2.1.66,70506aeb,linux","s":"dVi2Fn"}
content-type: application/octet-stream
accept: */*
host: 192.168.50.61:1257
transfer-encoding: chunked

(./..X...{"u":"bob","p":"1234"}

---- RESPONSE ----

HTTP/1.0 403 Forbidden
Date: Fri, 22 Sep 2023 15:39:29 GMT
Server: WSGIServer/0.2 CPython/3.7.0
Content-Length: 161
Content-Type: text/html; charset=UTF-8

<html>
 <head>
  <title>403 Forbidden</title>
 </head>
 <body>
  <h1>403 Forbidden</h1>
  Access was denied to this resource.<br /><br />
null


 </body>
</html>

03. Docker Log Output:

Error output:

anki-sync-server    | [2023-09-22 15:39:29,385]:INFO:ankisyncd.users:Authentication failed for nonexistent user None.
anki-sync-server    | [2023-09-22 15:39:29,386]:INFO:ankisyncd.http:192.168.55.10 "POST /sync/hostKey HTTP/1.1" 403 161

A successful connection looks like:

anki-sync-server    | [2023-09-22 15:48:29,386]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16 

04. Container Output:

/app/anki-sync-server # ./ankisyncctl.py lsuser
bob
@hbnordin2
Copy link

I've got the same issue

@PassiSchoppi
Copy link

I still got the same issue. Was anyone able to figure out the reason why this happens?

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

3 participants