teslamate-org / teslamate

A self-hosted data logger for your Tesla 🚘
https://docs.teslamate.org
MIT License
6.05k stars 755 forks source link

Earth does not exist? #4290

Closed mauromortier closed 1 month ago

mauromortier commented 1 month ago

Is there an existing issue for this?

What happened?

Trying to up the compose file in portainer (stack) seems to work fine for grafana etc etc but not for teslamate-teslamate-1 and shows me the following in logs: 2024-10-20 23:38:10.732 [info] create index geofencesearth_box_ll_to_earth_latitude_longituderadius_index

** (Postgrex.Error) ERROR 42704 (undefined_object) type "earth" does not exist

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

2024-10-20 23:41:16.507 [info] == Running 20190925152807 TeslaMate.Repo.Migrations.CreateGeoExtensions.change/0 forward

2024-10-20 23:41:16.509 [info] execute "CREATE EXTENSION IF NOT EXISTS cube"

2024-10-20 23:41:16.514 [info] execute "CREATE EXTENSION IF NOT EXISTS earthdistance"

2024-10-20 23:41:16.516 [info] create index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index

** (Postgrex.Error) ERROR 42704 (undefined_object) type "earth" does not exist

    (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1047: Ecto.Adapters.SQL.raise_sql_call_error/1

    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2

    (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1154: Ecto.Adapters.SQL.execute_ddl/4

    (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:327: Ecto.Migration.Runner.log_and_execute_ddl/3

    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2

    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2

    (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:290: Ecto.Migration.Runner.perform_operation/3

Screenshots

No response

Additional data

No response

Type of installation

Docker

Version

latest

ab300819 commented 1 month ago

I have the same issue

2024-10-21 06:25:14.544 [info] create index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
** (Postgrex.Error) ERROR 42704 (undefined_object) type "earth" does not exist
    (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1047: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1154: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:327: Ecto.Migration.Runner.log_and_execute_ddl/3
    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:290: Ecto.Migration.Runner.perform_operation/3
mikkelbh commented 1 month ago

Same issue here

JakobLichterfeld commented 1 month ago

Thanks for reporting, please use postgres:16 until the next release. The docs are a bit fast on this one.

mauromortier commented 1 month ago

When changing the compose to use Postgres 16, i get the notification that library is set up for 17 or something.

JakobLichterfeld commented 1 month ago

On a new install, please do a docker volume rm "$(basename "$PWD")_teslamate-db"

Or post your complete output.

mauromortier commented 1 month ago

that fixed it, thanks

JakobLichterfeld commented 1 month ago

that fixed it, thanks

Apologies for the shaky start. Normally it is best to have the latest docs already published even before a new version release. This time it was very unfortunate and we will improve on this end.

ab300819 commented 1 month ago

when i use postgres:16, it worked, but some query error appeared as shown in the screenshot.

image
JakobLichterfeld commented 1 month ago

when i use postgres:16, it worked,

Perfect.

but some query error appeared as shown in the screenshot.

You do not have enough data collected for the Battery Health Dashboard. The error message in this case is not the best.

ab300819 commented 1 month ago

Thanks, I'll keep an eye on it.

JakobLichterfeld commented 1 month ago

resolved with v1.31.0