-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Requests for data in GeoJSON format (i.e. attribute table) do not work if PostGIS layer comes from a connection set up with .pg_service.conf #4674
Comments
All demos on https://demo.lizmap.com which have PostGIS data are using a PG Service for connection. For instance Cats in NY. The attribute table and exporting to GeoJSON works. You can download the cat project by using the button at the top or they are all on GitHub So you have an URL and it gives a 500 ? You should see somewhere in your logs who raised this 500 error ? Is the error in QGIS Server, is QGIS server hit by the request ? |
@Gustry weird isn't it? But believe me, I spent the better part of an afternoon troubleshooting this, and the moment I replaced the layer with one from a connection using normal authentication all worked as expected. It took time to realize that because anything else worked fine, even exporting in other formats. Only requests made trough lizmap fail as making a similar request directly to qgis server works, i.e.
vs
while
Moreover, as said in the original description, there is no trace of this error in logs (all of them).
Is there any point doing this? GeoJson is not added by WfsOutputExtension and anyway no temp layers are generated as it fails before that, or did I got it wrong? |
Sorry, indeed GeoJSON is native !
There must be, for sure. You should see the incoming HTTP request at least (not the error, but incoming request) With the working request,
do you see the HTTP log on the server side about this request ? |
and for some reason there is no trace of the 500 error in both apache and php error logs (yes, they are logging other errors). |
This issue is missing some feedbacks. 👻 |
This should not have being closed automatically. |
@Gustry can this be reopened please? |
Yes it can, but IMHO, you will have to debug more unfortunately. https://demo.lizmap.com/lizmap/index.php/view/map?repository=features&project=observations Did you try on the demo ? Can you install the demo on your server ? You have the INSTALL.md. Maybe some content is causing issue in the GeoJSON ? a apostrophe or double apostrophe ?
We do not have these two versions on our infrastructure. If customers want a QGIS 3.34, it needs minimum LWC 3.7. |
@Gustry I'll check again, this time on 3.7. |
and 3.8. |
If I were you, I would go straight to 3.8.X (3.8.1-pre in the meantime, or 3.8.1 soon). |
What is the bug? (in English)
This was not fun to troubleshoot (no entries whatsoever in Apache log, Lizmap log, PHP log or QGIS Server log):
If in a project you have a postgis layer that has been added from a connection set up with .pg_service rather than using clear text username and password then there are functionalities that do not work in Lizmap, specifically what is not working is exporting such layer in GeoJSON format (other formats work), this means that also opening the attribute table shows nothing.
On the dev console of FF the error is a generic 500 which does not leaves any trace in system logs.
Steps to reproduce the issue
publish a project with a postgis layer added from a connection using .pg_service
you must ensure that your QGIS Server instance also is using such file, i.e.
SetEnv PGSERVICEFILE /mnt/qgis_authdb/.pg_service.conf
add that layer to WFS capabilities and in lizmap plugin add it to the "attribute table" list
test the project > exporting as geojson and exploring the table are a no go
Versions, safeguards, check summary etc
Versions :
List of safeguards :
Check Lizmap plugin
Operating system
Ubuntu 22.04
Browsers
Firefox, Chrome
Browsers version
Latest updates
Relevant log output
No response
The text was updated successfully, but these errors were encountered: