-
-
Notifications
You must be signed in to change notification settings - Fork 252
Description
BEFORE OPENING AN ISSUE, MAKE SURE YOU READ THIS: #1382
OS & Hardware
Ubuntu VM
Version
Dawarich v1.2.0
Describe the bug
I am using PhoneTrack android app custom log job to send location updates. While dawarich app returns a 200 on POST call, the points are never logged.
To Reproduce
Steps to reproduce the behavior:
- Create a custom log job with following setting -
- Start the custom log job.
- Dawarich returns
200 - Points never show up in dawarich db/app
Expected behavior
The logged points should show up in the db and the app
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Dawarich App
dawarich_app | User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."api_key" IS NULL LIMIT $1 [["LIMIT", 1]]
dawarich_app | ↳ app/controllers/api_controller.rb:36:in 'ApiController#current_api_user'
dawarich_app | {"method":"GET","path":"/api/v1/health","format":"*/*","controller":"Api::V1::HealthController","action":"index","status":200,"allocations":1205,"duration":5.3,"view":0.13,"db":0.52}
dawarich_app | User Load (3.5ms) SELECT "users".* FROM "users" WHERE "users"."api_key" = $1 LIMIT $2 [["api_key", "[FILTERED]"], ["LIMIT", 1]]
dawarich_app | ↳ app/controllers/api_controller.rb:36:in 'ApiController#current_api_user'
dawarich_app | {"method":"POST","path":"/api/v1/owntracks/points","format":"html","controller":"Api::V1::Owntracks::PointsController","action":"create","status":200,"allocations":23147,"duration":168.45,"view":0.4,"db":25.48}
traefik | 2026-02-21T05:00:58Z DBG github.com/traefik/traefik/v3/pkg/server/service/loadbalancer/wrr/wrr.go:176 > Service selected by WRR: http://172.19.0.3:3000
dawarich_app | User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."api_key" = $1 LIMIT $2 [["api_key", "[FILTERED]"], ["LIMIT", 1]]
dawarich_app | ↳ app/controllers/api_controller.rb:36:in 'ApiController#current_api_user'
dawarich_app | {"method":"POST","path":"/api/v1/owntracks/points","format":"html","controller":"Api::V1::Owntracks::PointsController","action":"create","status":200,"allocations":1273,"duration":8.94,"view":0.32,"db":0.94}
Dawarich Sidekiq
Performed BulkStatsCalculatingJob (Job ID: 499757bb-45f4-448a-a21d-a9af9c466032) from Sidekiq(stats) in 79.86ms
I, [2026-02-21T05:00:25.908895 #8] INFO -- : done
Performing Import::WatcherJob (Job ID: 4dd03466-d103-4f00-b524-85d90e6b5745) from Sidekiq(imports) enqueued at 2026-02-21T05:00:25.499805916Z
Performing StaleJobsRecoveryJob (Job ID: 12fc3a8a-1e6f-40d3-b349-9327a5a29e2c) from Sidekiq(exports) enqueued at 2026-02-21T05:00:25.534106166Z
Performing AppVersionCheckingJob (Job ID: 550383a3-b633-4e1b-a7a5-553e20c3e3b0) from Sidekiq(default) enqueued at 2026-02-21T05:00:25.510638097Z
Performed Import::WatcherJob (Job ID: 4dd03466-d103-4f00-b524-85d90e6b5745) from Sidekiq(imports) in 19.12ms
I, [2026-02-21T05:00:25.933665 #8] INFO -- : done
Performed AppVersionCheckingJob (Job ID: 550383a3-b633-4e1b-a7a5-553e20c3e3b0) from Sidekiq(default) in 49.98ms
I, [2026-02-21T05:00:25.968324 #8] INFO -- : done
Export Load (2.1ms) SELECT "exports".* FROM "exports" WHERE "exports"."status" = $1 AND "exports"."processing_started_at" < $2 ORDER BY "exports"."id" ASC LIMIT $3 [["status", 1], ["processing_started_at", "2026-02-21 03:00:26.007331"], ["LIMIT", 1000]]
↳ app/jobs/stale_jobs_recovery_job.rb:18:in 'StaleJobsRecoveryJob#recover_stale_exports'
Import Load (1.6ms) SELECT "imports".* FROM "imports" WHERE "imports"."status" = $1 AND "imports"."processing_started_at" < $2 ORDER BY "imports"."id" ASC LIMIT $3 [["status", 1], ["processing_started_at", "2026-02-20 23:00:26.042494"], ["LIMIT", 1000]]
↳ app/jobs/stale_jobs_recovery_job.rb:33:in 'StaleJobsRecoveryJob#recover_stale_imports'
Performed StaleJobsRecoveryJob (Job ID: 12fc3a8a-1e6f-40d3-b349-9327a5a29e2c) from Sidekiq(exports) in 145.05ms
Dawarich Console
root@v2202602337541434014:/opt/dawarich# docker exec -it dawarich_app /bin/bash
root@877a5a6bb8eb:/var/app# bin/rails console
[dotenv] Set OBJC_DISABLE_INITIALIZE_FORK_SAFETY
[dotenv] Loaded .env.development
OIDC: Not configured (missing OIDC_CLIENT_ID or OIDC_CLIENT_SECRET)
Loading development environment (Rails 8.0.3)
[1] pry(main)> Point.where(created_at: 24.hours.ago..Time.current).count
Point Count (4.6ms) SELECT COUNT(*) FROM "points" WHERE "points"."created_at" BETWEEN $1 AND $2 [["created_at", "2026-02-20 05:01:43.758568"], ["created_at", "2026-02-21 05:01:43.758633"]]
=> 0
Additional context
-
Target Address - https://timeline.example.com:10443/api/v1/owntracks/points?api_key=&lat=%LAT&lon=%LON×tamp=%TIMESTAMP&_type=location&acc=%ACC&alt=%ALT&batt=%BATT&bs=0&cog=%DIR
-
Happens in both development and production environment
-
I can provide you the API url and KEY in private, redacted here for security purposes.