Locations Plugin

Encountered the same problem.

I tried the method listed here

But not working.
Ubuntu system, reboot not working,
./launcher restart app, ./launcher start app not working.

Error Message when running ./launcher rebuild app

......
111:M 12 Dec 2023 12:11:02.199 * DB saved on disk
111:M 12 Dec 2023 12:11:02.200 # Redis is now ready to exit, bye bye...



FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 3553 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

Thank you for @itsbhanusharma

It says caused by earlier error, I list them here

I, [2023-12-13T00:50:13.222274 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundl                e exec rake db:migrate'
2023-12-13 00:50:18.347 UTC [3597] discourse@discourse ERROR:  invalid input syntax for type double precision: ""

2023-12-13 00:50:18.347 UTC [3597] discourse@discourse STATEMENT:  INSERT INTO locations_topic                 (topic_id, latitude, longitude, name, street, district, city, state, postalcode, country, count                rycode, international_code, locationtype, boundingbox, updated_at, created_at) (
          SELECT
          tc.topic_id,
          (tc.value::json->'geo_location'->>'lat')::FLOAT,
          (tc.value::json->'geo_location'->>'lon')::FLOAT,
          tc.value::json->'geo_location'->>'name',
          tc.value::json->'geo_location'->>'street',
          tc.value::json->'geo_location'->>'district',
          tc.value::json->'geo_location'->>'city',
          tc.value::json->'geo_location'->>'state',
          tc.value::json->'geo_location'->>'postalcode',
          tc.value::json->'geo_location'->>'country',
          tc.value::json->'geo_location'->>'countrycode',
          tc.value::json->'geo_location'->>'international_code',
          tc.value::json->'geo_location'->>'type',
          ARRAY[
            (tc.value::json->'geo_location'->'boundingbox'->>0)::FLOAT,
            (tc.value::json->'geo_location'->'boundingbox'->>1)::FLOAT,
            (tc.value::json->'geo_location'->'boundingbox'->>2)::FLOAT,
            (tc.value::json->'geo_location'->'boundingbox'->>3)::FLOAT
          ],
          tc.updated_at,
          tc.created_at
        FROM topic_custom_fields tc
        WHERE tc.name = 'location'
        AND tc.value NOT IN ('"{}"', '{}', '')
        AND tc.value::json->'geo_location'->>'lat' IS NOT NULL
        AND tc.value::json->'geo_location'->>'lon' IS NOT NULL
        )
        ON CONFLICT DO NOTHING

rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

ERROR:  invalid input syntax for type double precision: ""
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.0/lib/patches/db/pg.rb: 110:in `exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.0/lib/patches/db/pg.rb: 110:in `async_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/mini_sql-1.5.0/lib/mini_sql/postgres/connection.rb:202:in `run'

#--------------
Caused by:
PG::InvalidTextRepresentation: ERROR:  invalid input syntax for type double precision: "" (PG:: InvalidTextRepresentation)
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.0/lib/patches/db/pg.rb: 110:in `exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.0/lib/patches/db/pg.rb:  110:in `async_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/mini_sql-1.5.0/lib/mini_sql/postgres/connection.rb:202:in `run'

and the docker ps message

/var/discourse# docker ps
CONTAINER ID   IMAGE                 COMMAND        CREATED             STATUS         PORTS                                                                      NAMES
d3c8e85149a8   local_discourse/app   "/sbin/boot"   About an hour ago   Up 6 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   app