BigBoot / AutoKuma

AutoKuma is a utility that automates the creation of Uptime Kuma monitors based on Docker container labels. With AutoKuma, you can eliminate the need for manual monitor creation in the Uptime Kuma UI.
MIT License
166 stars 11 forks source link

Problem with complex password #31

Open pinkfloydFR opened 3 months ago

pinkfloydFR commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

Having the same issue =/

dorko87 commented 2 months ago

Same issue

innuendoz commented 1 month ago

Same issue, even when I disable auth