moleus / domru

domru domofon client
MIT License
7 stars 4 forks source link

accounts.json: is a directory #19

Open Timuridze1 opened 3 months ago

Timuridze1 commented 3 months ago

time=2024-08-07T21:39:49.602Z level=ERROR source=/home/runner/work/domru/domru/cmd/controllers/login_password.go:44 msg="failed to save credentials" err="open /share/domofon/accounts.json: is a directory" time=2024-08-07T21:39:49.662Z level=WARN source=/home/runner/work/domru/domru/pkg/token_management/main.go:39 msg="load credentials" err="read /share/domofon/accounts.json: is a directory"

My Cfg volumes:

dronix27 commented 3 months ago

time=2024-08-07T21:39:49.602Z level=ERROR source=/home/runner/work/domru/domru/cmd/controllers/login_password.go:44 msg="failed to save credentials" err="open /share/domofon/accounts.json: is a directory" time=2024-08-07T21:39:49.662Z level=WARN source=/home/runner/work/domru/domru/pkg/token_management/main.go:39 msg="load credentials" err="read /share/domofon/accounts.json: is a directory"

My Cfg volumes: - /home/server/backup/database/domofon/accounts.json:/share/domofon/accounts.json

А этот файл уже есть у вас по указанному пути? Его нужно сначала создать, скопировав содержимое из example.accounts.json

Timuridze1 commented 2 months ago

Да файл есть, содержимым заполнил. Host/volume Path in container /home/server/backup/database/domofon/accounts.json /share/domofon/accounts.json

Все равно failed to save credentials: open /share/domofon/accounts.json: is a directory

В логе следующее ```

time=2024-09-22T11:44:45.011Z level=INFO source=github.com/ad/domru/pkg/auth/password.go:58 msg="login successful" url=https://myhome.proptech.ru/auth/v2/auth/160013778545/password body.hash1=aaLi**** body.hash2=770b**** body.login=1600**** body.timestamp=2024-09-22T11:44:43Z response="LogValue panicked\ncalled from runtime.panicmem (runtime/panic.go:261)\ncalled from runtime.sigpanic (runtime/signal_unix.go:881)\ncalled from github.com/ad/domru/pkg/domru/models.AuthenticationResponse.LogValue (github.com/ad/domru/pkg/domru/models/auth.go:38)\ncalled from log/slog.Value.Resolve (log/slog/value.go:492)\ncalled from log/slog.(*handleState).appendAttr (log/slog/handler.go:468)\n(rest of stack elided)\n"

time=2024-09-22T11:44:45.011Z level=ERROR source=github.com/ad/domru/cmd/controllers/login_password.go:44 msg="failed to save credentials" err="open /share/domofon/accounts.json: is a directory"

time=2024-09-22T11:44:45.048Z level=WARN source=github.com/ad/domru/pkg/token_management/main.go:39 msg="load credentials" err="read /share/domofon/accounts.json: is a directory"

time=2024-09-22T11:44:45.048Z level=WARN source=github.com/ad/domru/pkg/authorizedhttp/client.go:81 msg="Failed to get new token" error="load credentials: read /share/domofon/accounts.json: is a directory"

time=2024-09-22T11:44:45.048Z level=WARN source=github.com/ad/domru/pkg/authorizedhttp/client.go:59 msg="Failed to send request" error="load credentials: read /share/domofon/accounts.json: is a directory" url=https://myhome.novotelecom.ru/favicon.ico method=GET headers="map[Accept:[image/avif,image/webp,image/apng,image/svg+xml,image/,/*;q=0.8] Accept-Encoding:[gzip, deflate] Accept-Language:[ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7] Connection:[keep-alive] Cookie:[PHPSESSID=c76e38b63c92ea47a59074383e9c09d0; portainer_api_key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsInNjb3BlIjoiZGVmYXVsdCIsImZvcmNlQ2hhbmdlUGFzc3dvcmQiOmZhbHNlLCJleHAiOjE3MjcwMzM1OTgsImlhdCI6MTcyNzAwNDc5OH0.uxDfNnPEVVqtVxZosXIsYEB6aO_hVwB-Twps1UeUMxA; _gorilla_csrf=MTcyNzAwNDc5OHxJbUpCVGpVMVptZEhhQ3QzUjFRNWNtOVhWMUphSzFOaE1tUTRhMmxtYzAxNU1VMVBRV2RXUjA4dlN6QTlJZ289fDitzZ4fZUqrvEQ1IRJTmGGkOza4mALL6es0Gy1qS6mc] Referer:[http://192.168.1.14:8282/loginWithPassword] User-Agent:[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36]]"