dawarich icon indicating copy to clipboard operation
dawarich copied to clipboard

Trips page error after creating a trip

Open TehMaat opened this issue 3 months ago • 10 comments

Ubuntu 24 Dawarich is limited to 4 core and 3Gb of ram on a mini pc i7 on proxmox

Version 0.31.0

Describe the bug I created a trip lasting 4 days that I did last week, it started loading and I closed the browser.

After a while I went to check it and now every time I open the trip pages this error appears:

image

Logs I don't know which container should generate this log but I'm happy to provide them if needed.

Additional context I know it's in beta, I just want to see how that worked with immich.

TehMaat avatar Sep 14 '25 09:09 TehMaat

In the console, run Trip.find_each(&:enqueue_calculation_jobs). It will fix issue for you, and I'll come up with a permanent fix a bit later

Freika avatar Sep 14 '25 11:09 Freika

I did it but he trips page keep being like that, here's what i did:

root@e1f32447b10f:/var/app# bin/rails console
[dotenv] Set DATABASE_PORT
[dotenv] Loaded .env.development
Loading development environment (Rails 8.0.2.1)
[1] pry(main)> Trip.find_each(&:enqueue_calculation_jobs)
  Trip Load (2.1ms)  SELECT "trips".* FROM "trips" ORDER BY "trips"."id" ASC LIMIT $1  [["LIMIT", 1000]]
  User Load (2.3ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
INFO  2025-09-14T11:47:00.780Z pid=120755 tid=2ms3: Sidekiq 8.0.4 connecting to Redis with options {size: 10, pool_name: "internal", url: "redis://dawarich_redis:6379/1"}
Enqueued Trips::CalculateAllJob (Job ID: 2cab5bfa-5c7e-4e3e-9806-63652aa3d2ba) to Sidekiq(trips) with arguments: 2, "km"
↳ app/models/trip.rb:17:in 'Trip#enqueue_calculation_jobs'
=> nil
[2] pry(main)> Trip.find_each(&:enqueue_calculation_jobs)
  Trip Load (1.0ms)  SELECT "trips".* FROM "trips" ORDER BY "trips"."id" ASC LIMIT $1  [["LIMIT", 1000]]
  User Load (0.6ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
Enqueued Trips::CalculateAllJob (Job ID: 33a0e242-40e0-4ba7-a526-cf31f0857d5d) to Sidekiq(trips) with arguments: 2, "km"
↳ app/models/trip.rb:17:in 'Trip#enqueue_calculation_jobs'
=> nil
[3] pry(main)> 

[3] pry(main)> exit
root@e1f32447b10f:/var/app# 

TehMaat avatar Sep 14 '25 11:09 TehMaat

I've got the same result as TehMaat.

kanzungjak avatar Sep 17 '25 10:09 kanzungjak

Same issue, can be merged or closed: https://github.com/Freika/dawarich/issues/1733

randyjc avatar Sep 22 '25 10:09 randyjc

In the console, run Trip.find_each(&:enqueue_calculation_jobs), it should fix your issue

@randyjc FYI

Freika avatar Oct 07 '25 19:10 Freika

Still the same problem

TehMaat avatar Oct 08 '25 09:10 TehMaat

So what I have done, I created a new 'trip', and when creating the trip I could see the map being shown where I was that day. When submitting it was calculating the trip, and when I go back to the 'trips' page, I see the NoMethodError in Trips#index.

Loading development environment (Rails 8.0.2.1)
[1] pry(main)> Trip.find_each(&:enqueue_calculation_jobs)
  Trip Load (0.9ms)  SELECT "trips".* FROM "trips" ORDER BY "trips"."id" ASC LIMIT $1  [["LIMIT", 1000]]
=> nil
[2] pry(main)> Trip.find_each(&:enqueue_calculation_jobs)
  Trip Load (0.4ms)  SELECT "trips".* FROM "trips" ORDER BY "trips"."id" ASC LIMIT $1  [["LIMIT", 1000]]
  User Load (1.1ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
INFO  2025-10-09T09:53:25.260Z pid=388 tid=1z0: Sidekiq 8.0.4 connecting to Redis with options {size: 10, pool_name: "internal", url: "redis://redis:6379/1"}
Enqueued Trips::CalculateAllJob (Job ID: f7630ddb-7779-4b6d-a170-c2036254e320) to Sidekiq(trips) with arguments: 3, "km"
↳ app/models/trip.rb:17:in 'Trip#enqueue_calculation_jobs'
=> nil
Image

randyjc avatar Oct 09 '25 09:10 randyjc

Got the issue fixed on my end, I had some other weird quirks so I exported all of my data and then reinstalled everything fresh. Issue is solved.

randyjc avatar Oct 20 '25 10:10 randyjc

Do I have to do that? I might prefer not to

TehMaat avatar Oct 20 '25 12:10 TehMaat

For me the issue got resolved after I saw that that I haven't updated the dawarich_sidekiq version number.

kanzungjak avatar Oct 20 '25 17:10 kanzungjak