Closed claudiobgit closed 1 year ago
Hello @claudiobgit, thank you for reporting this issue. I will try to replicate it and get back to you.
Thanks, I tried many times but couldn't get through. I didn't try the Docker image as I already have a Postgis enabled server running directly on host. Any detail that could help, please ask.
Il giorno mer 9 ago 2023 alle ore 08:52 Ondrej Mikulcik < @.***> ha scritto:
Hello @claudiobgit https://github.com/claudiobgit, thank you for reporting this issue. I will try to replicate it and get back to you.
ā Reply to this email directly, view it on GitHub https://github.com/notum-cz/strapi-plugin-location/issues/20#issuecomment-1670770783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3RLOVQPIOAFHBL3AICVLTXUMXSXANCNFSM6AAAAAA3I2GKUI . You are receiving this because you were mentioned.Message ID: @.***>
-- Claudio Bernardini
I am using this image https://registry.hub.docker.com/r/postgis/postgis/tags?page=1 and I can't find version 3.2.0 there. Are you sure that is the correct version? I assume the image has a different versioning.
I am using this image https://registry.hub.docker.com/r/postgis/postgis/tags?page=1 and I can't find version 3.2.0 there. Are you sure that is the correct version? I assume the image has a different versioning.
I am not running a Docker image for PostgreSQL but I am sure of the running version that I get with:
SELECT * FROM pg_available_extensions WHERE name = 'postgis';
name | default_version | installed_version | comment
---------+-----------------+-------------------+------------------------------------------------------------
postgis | 3.2.0 | 3.2.0 | PostGIS geometry and geography spatial types and functions
I will try to dig deeper in the plugin and post any advance here.
Thank you, I am unfortunately not able to replicate your setup easily.
The problem should be considered solved after having manually granted UC privileges to PUBLIC on 'postgis' schema in the database @omikulcik
Ok, so I am closing this issue. Thank you @claudiobgit
I've just run into a very similar issue on my end after attempting to deploy to Heroku. Everything worked fine on my local.
PG 15.4.
Strapi 4.12.7.
@claudiobgit What are UC privileges?
2023-08-31T19:37:37.223489+00:00 app[web.1]: [2023-08-31 19:37:37.221] info: Error Enabling PostGIS, no pg_hba.conf entry for host "44.201.222.159", user "qhxyadnfszkhvb", database "d2km56udn7ts5g", no encryption
2023-08-31T19:37:37.238511+00:00 app[web.1]: [2023-08-31 19:37:37.238] error: Error accessing POSTGIS
2023-08-31T19:37:37.243644+00:00 app[web.1]: [2023-08-31 19:37:37.243] debug: āļø Server wasn't able to start properly.
2023-08-31T19:37:37.243848+00:00 app[web.1]: [2023-08-31 19:37:37.243] error: Could not find Custom Field: plugin::location-plugin.location
2023-08-31T19:37:37.243852+00:00 app[web.1]: Error: Could not find Custom Field: plugin::location-plugin.location
2023-08-31T19:37:37.243852+00:00 app[web.1]: at Object.get (/app/node_modules/@strapi/strapi/lib/core/registries/custom-fields.js:34:15)
2023-08-31T19:37:37.243861+00:00 app[web.1]: at convertCustomFieldType (/app/node_modules/@strapi/strapi/lib/utils/convert-custom-field-type.js:15:67)
2023-08-31T19:37:37.243861+00:00 app[web.1]: at Strapi.register (/app/node_modules/@strapi/strapi/lib/Strapi.js:409:5)
2023-08-31T19:37:37.243861+00:00 app[web.1]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-08-31T19:37:37.243862+00:00 app[web.1]: at async Strapi.load (/app/node_modules/@strapi/strapi/lib/Strapi.js:492:5)
2023-08-31T19:37:37.243862+00:00 app[web.1]: at async Strapi.start (/app/node_modules/@strapi/strapi/lib/Strapi.js:218:9)
2023-08-31T19:37:37.526141+00:00 heroku[web.1]: Process exited with status 1
2023-08-31T19:37:37.557614+00:00 heroku[web.1]: State changed from starting to crashed
I figured it out. I was missing a strapi config for the environment.
Bug report
Describe the bug
When PostGIS is already enabled on server, Strapi crashes on startup in developing environment (not tested in production). This happens after enabling the plugin and adding the custom field to a collection, Strapi could not start and logs show the following:
On the server side, the Postgres logs show:
Steps to reproduce the behavior
npm install && npm run build && npm run develop
Expected behavior
Strapi should restart properly.
System
Additional context
PostGIS has its own 'postgis' scheme enabled on the db, Strapi uses the 'public' scheme. The 'search_path' on the database is configured with 'public, postgis' values.
Running the command 'SELECT postgis_full_version();' on the database properly returns PostGIS version:
POSTGIS="3.2.0 c3e3cc0" [EXTENSION] PGSQL="140" GEOS="3.10.2-CAPI-1.16.0" PROJ="8.2.1" LIBXML="2.9.12" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"