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

Problem with complex password #31

Open
pinkfloydFR opened this issue Apr 24, 2024 · 7 comments
Open

Problem with complex password #31

pinkfloydFR opened this issue Apr 24, 2024 · 7 comments

Comments

@pinkfloydFR
Copy link

pinkfloydFR commented Apr 24, 2024

Hi,

I am trying to install autokuma in docker but i think there is a problem with complex password :

The log :

thread 'tokio-runtime-worker' panicked at /usr/src/autokuma/kuma-client/src/client.rs:176:74:
called `Result::unwrap()` on an `Err` value: Error("unexpected trailing characters; the end of input was expected", line: 0, column: 0)
WARN [kuma_client::client] Timeout while waiting for Kuma to get ready...
WARN [autokuma::sync] Encountered error during sync: It looks like the server is expecting a username/password, but none was provided

my docker compose :

autokuma:
    image: ghcr.io/bigboot/autokuma:latest
    container_name: kuma-auto
    restart: unless-stopped
    environment:
      AUTOKUMA__KUMA__URL: http://kuma:3001
      AUTOKUMA__KUMA__USERNAME: ${login}
      AUTOKUMA__KUMA__PASSWORD: ${pass}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      kuma:

my (fake) .env :

login='myname'
pass='$AAa*9BbB^kTtHdM$DF5jnF'

test without quote and double quote ( docker compose tried to parse the pass).

@BigBoot
Copy link
Owner

BigBoot commented Apr 26, 2024

Hi, the error here doesn't seem to come from the password but rather autokuma being unable to parse a message from uptime kuma, please run autokuma with the env var set to RUST_LOG=kuma_client=trace and look for the last Client::on_any line before the parse error.

Note that this log might contain sensible information, so do not just copy and paste it here.

Please also provide the version of autokuma and uptime kuma you are using.

@pinkfloydFR
Copy link
Author

Hi,

Here is an extraction of the log :

TRACE [kuma_client::client] Client::on_any(Custom("proxyList"), Text([Array []]))
thread 'TRACE [kuma_client::client] Client::on_any(Custom("notificationList"), Text([Array [Object {"active": Bool(true), "config": String("{\"name\":\"Telegram\",\"type\":\"telegram\",\"isDefault\":true,\"telegramBotToken\":\"*****\",\"telegramChatID\":\"****\"}"), "id": Number(1), "isDefault": Bool(true), "name": String("Telegram"), "userId": Number(1)}]]))
tokio-runtime-worker' panicked at /usr/src/autokuma/kuma-client/src/client.rs:176:74:
called `Result::unwrap()` on an `Err` value: Error("unexpected trailing characters; the end of input was expected", line: 0, column: 0)
TRACE [kuma_client::client] Client::on_any(Custom("dockerHostList"), Text([Array [Object {"dockerDaemon": String("/var/run/docker.sock"), "dockerType": String("socket"), "id": Number(1), "name": String("docker"), "userID": Number(1)}]]))
TRACE [kuma_client::client] Client::on_any(Custom("apiKeyList"), Text([Array []]))
...
TRACE [kuma_client::client] Client::on_any(Custom("proxyList"), Text([Array []]))
thread 'tokio-runtime-worker' panicked at /usr/src/autokuma/kuma-client/src/client.rs:176TRACE [kuma_client::client] Client::on_any(Custom("dockerHostList"), Text([Array [Object {"dockerDaemon": String("/var/run/docker.sock"), "dockerType": String("socket"), "id": Number(1), "name": String("docker"), "userID": Number(1)}]]))
:74:
called `Result::unwrap()` on an `Err` value: Error("unexpected trailing characters; the end of input was expected", line: 0, column: 0)
TRACE [kuma_client::client] Client::on_any(Custom("apiKeyList"), Text([Array []]))

kuma:
image: louislam/uptime-kuma:latest

autokuma:
image: ghcr.io/bigboot/autokuma:latest

@BigBoot
Copy link
Owner

BigBoot commented Apr 26, 2024

Looks like there is a problem parsing DateTimes, the only place where this is used is in maintenances and autokuma expects them to be in Iso8601 format. I'm not sure how a differently formatted date might've ended up there and what format it is in. Can you check your logs contain a message with the maintenanceList event. if you're familiar with your browsers dev tools, you could also take a look at the websocket connection and look at the messages there.

@jordanlambrecht
Copy link

Having the same issue =/

@dorko87
Copy link

dorko87 commented May 21, 2024

Same issue

@innuendoz
Copy link

Same issue, even when I disable auth

@motey
Copy link

motey commented Dec 10, 2024

Just had this exact error when having a paused maintenance notification in UptimeKuma with Europe/Berlin as the Timezone (dk if this affects anything). As soon as i deleted the maintenance notification, AutoKuma went back to work without the above mentioned error.

Here is an example of the maintenanceList format

["maintenanceList",{"2":{"id":2,"title":"Test","description":"this is a test","strategy":"single","intervalDay":1,"active":true,"dateRange":["2024-12-06T11:11","2024-12-12 11:11:00"],"timeRange":[{"hours":0,"minutes":0},{"hours":0,"minutes":0}],"weekdays":[],"daysOfMonth":[],"timeslotList":[{"startDate":"2024-12-06T11:11","endDate":"2024-12-12 11:11:00"}],"cron":"","durationMinutes":null,"timezone":"Europe/Berlin","timezoneOption":"Europe/Berlin","timezoneOffset":"+01:00","status":"under-maintenance"}}]

startDate and endDate seems to differ in format. Is this an upstream bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants