PostGIS layer unavailable - missing_dataprovider

I have PostGIS layers, and opened my server for access from qField cloud server IP and adjusted pg_hba.conf.
Also I have pg_service_conf file.

My layer (hidden - replaced original values for security reasons): dbname=‘hidden’ host=hidden port=5432 user=‘hidden’ sslmode=allow authcfg=38lc8f6 key=‘id’ type=MultiPolygon checkPrimaryKeyUnicity=‘1’ table=“geotbls”.“hidden” (geom)

But I still getting errors on cloud:
14:04:55.984 QGSMSGLOG WARNING 1 unavailable layer(s) found:

…8f03d3 False missing_dataprovider No data provider available

What does it mean this message?

There is some info in Jobs - QField Ecosystem Documentation, but there is no description about “missing_dataprovider”, just invalid_dataprovider and invalid_layer.


Imported from GitHub discussion by @janekska on 2023-03-24T14:34:35Z

Hi, janekska
I answered you via mail. After we figured out your issue we can update this post.


Imported from GitHub comment by @ZsanettMed on 2023-03-28T20:01:51Z

Hi janekska ZsanettMed , did you resolve this issue? I have the same error and I don`t know how resolved it :frowning:
thanks!!


Imported from GitHub comment by @GonLes on 2023-07-04T19:55:53Z

Thanks for reminding this.
So here my user experience:
1st of course I have to check does I can reach my PgDb from qField.Cloud. There is at least two layers to check: PgDb itself check pg_hba.conf file and firewall that very depends on your server and network configurations. Here I could wish either some more descriptive error message in jobs or some kind of tool in qField.cloud that works like tcp port ping. It could save some unnecessary communication time. But I finally managed.
2nd pitfall is providing database access parameters in project file.
I was really stuck at that - I did not catch that in qGIS database connections parameters (i.e. user name & password etc.) that is shown in connection browser (subwindow in qGIS) is disconnected from currently open project.
I guess that is mostly because I often working with database viewers like PgAdmin and DBviewer and there data connection browser is directly connected with that window what I am using.
Also in qGIS there are no connection parameters editing option in project layers. There are repair, but it is not telling you about connection parameters.
So it took me some time to find out, that if I change data connection parameters in Data Source, than I should to take a layer from that data source again and save those connection parameters in qGis project or change/repair data source.
Or in short - it is not enough to change db connections parameters (to save user name and password) opened from data source browser subwindow in qGIS! You should also add layer again or do change/repair and then save qGIS project.

I hope above info helps somebody else and probably make qGis, qFIeld & cloud better :wink:

brgds


Imported from GitHub comment by @janekska on 2023-07-05T07:44:22Z

Hello, I can’t understand how you fixed the issue. I tried to replied to the steps that you indicate, but still cant fix the issue. Would you guide me please?

I appreciate your help.


Imported from GitHub comment by @GonLes on 2023-07-06T21:47:38Z

Then, please, provide more info about how far did you manage to understand and where stopped!

BTW: To use PostGIS layers in this mode you should have Organization or Pro subscription plan on qField Cloud!


Imported from GitHub comment by @janekska on 2023-07-07T12:15:31Z