Closed tst32 closed 2 years ago
How exactly did you start the server?
Could you paste the commands you used?
docker-compose -f
Im thinking CMD ["/app/start.sh"] start app.
go also Error: [object Object] at XMLHttpRequest.f.onreadystatechange ((index):72) (index):117 call failed with {error: "The user admin doesn't have access to project null"} 404
i created user admin in web page http://127.0.0.1:8080/#!/register do i need any other user?
@tst32 The issue is that you don't have any projects to show. You'll have to first configure your wakatime client to send some data.
cat .wakatime.cfg
[internal]
cli_version = v1.27.0
cli_version_last_modified = Wed, 22 Sep 2021 01:52:04 GMT
backoff_retries = 0
[settings]
api_key = ad6de9e5-d96c-4f56-965d-skip
api_url= http://127.0.0.1:8080/api/v1/users/current/heartbeats.bulk
[internal]
backoff_at = 2021-09-08T16:57:24+03:00
from .wakatime-cli.log
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"runCmd","level":"error","message":"failed to run command: today fetch failed: api error: failed fetching today from api: failed to make request to \"http://127.0.0.1:8080/api/v1/users/current/statusbar/today\": Get \"http://127.0.0.1:8080/api/v1/users/current/statusbar/today\": dial tcp 127.0.0.1:8080: connect: connection refused","now":"2021-11-05T16:43:48+03:00","version":"v1.28.1"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"runCmd","level":"error","message":"failed to run command: sending heartbeat(s) later due to api error: failed making request to \"http://127.0.0.1:8080/api/v1/users/current/heartbeats.bulk\": Post \"http://127.0.0.1:8080/api/v1/users/current/heartbeats.bulk\": dial tcp 127.0.0.1:8080: connect: connection refused","now":"2021-11-05T16:43:49+03:00","version":"v1.28.1"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"runCmd","level":"error","message":"failed to run command: sending heartbeat(s) later due to api error: won't send heartbeat due to backoff","now":"2021-11-05T17:00:21+03:00","version":"v1.28.1"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"runCmd","level":"error","message":"failed to run command: sending heartbeat(s) later due to api error: won't send heartbeat due to backoff","now":"2021-11-05T17:00:34+03:00","version":"v1.28.1"}
What if you use localhost
instead of 127.0.0.1
?
Hurray! Everything works great. The thing was that I made a mistake in docker-compose.yml I wanted 8080 to be 8585, and unknowingly changed HAKA_PORT: 8080 to 8585 - this gave rise errors. I've fixed it now.: Thanks you so much!
version: "3"
services:
server:
container_name: hakatime
image: mujx/hakatime:v1.7.0
environment:
# DB settings.
HAKA_DB_HOST: haka_db
HAKA_DB_PORT: 5432
HAKA_DB_NAME: test
HAKA_DB_PASS: test
HAKA_DB_USER: test
# Server settings.
# Fill out this field if the api is behind another path (e.g behind a reverse proxy).
# This will adjust the Set-Cookie path for all the /auth related API calls.
HAKA_API_PREFIX: ""
# Update this with the external endpoint that you use to access hakatime.
HAKA_BADGE_URL: "http://localhost:8585"
HAKA_PORT: 8080
HAKA_SHIELDS_IO_URL: "https://img.shields.io"
HAKA_ENABLE_REGISTRATION: "true" # Toggle after you've created your account.
# Number of hours after which inactive browser sessions will expire (login required).
HAKA_SESSION_EXPIRY: "24"
HAKA_LOG_LEVEL: "info" # Control the verbosity of the logger.
HAKA_ENV: "dev" # Use a json logger for production, otherwise key=value pairs.
HAKA_HTTP_LOG: "true" # If you want to log http requests.
GITHUB_TOKEN: "ghp_my_token_here" # If you want to retrieve time spent per commit. No extra scope is required.
# Add the following variables if you want to forward any received heartbeats to another
# Wakatime compatible server.
HAKA_REMOTE_WRITE_URL: "https://wakatime.com/api/v1/users/current/heartbeats.bulk"
HAKA_REMOTE_WRITE_TOKEN: "2-wakatime-token"
ports:
- "127.0.0.1:8585:8080"
haka_db:
container_name: haka_db
image: postgres:12-alpine
environment:
POSTGRES_DB: test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
volumes:
- deploy_db_data:/var/lib/postgresql/data
volumes:
deploy_db_data: {}
if you want i could help localize dashbord (js,css) to :ru:
Glad to hear that you fixed your issue.
Localization will be nice to have. Currently there isn't support for it but I'll open an issue to keep track.
i use docker image
mujx/hakatime:v1.7.0
firstly it dosn't work with https but only http access work secondly, can't acess projects menu. many errors in dev console copied from firefox console
chrome autorize me then freeze (perpetual load js), console saying {"error":"Missing the 'Authorization' header field"} http://127.0.0.1:8080/api/v1/users/current/stats?start=2021-10-19T20%3A03%3A30.640Z&end=2021-11-03T20%3A03%3A30.640Z&timeLimit=15