Downloading a qfield project takes forever (Postgis + QfieldCloud)

Hello all!

I have been trying to understand how to set a project in QfieldCloud connected to Postgis layers.

In my qgis desktop I connect to Postgres through service (I configured by putting the IP directly, no localhost) and it works fine. I have just followed the steps depicted in the documentation as follows:

  1. Create a .qgs project to the folder to further sync with the qfieldcloud project.

  2. Add Postgis layers to the project. Set offline connection in the qfield configuration and set relative paths to the project. Save the project.

  3. Open QfieldCloud and create an empty project. Edit the project in QfieldCloud and create a secret (pg_service.conf by copy paste in advance settings the configuration I have in my pg_service.conf in my desktops as described above).

  4. Sync the .qgs project in the first point to QfieldCloud.

  5. Copy pase the pg_service.conf to the device that will be used to capture data (Android\data\ch.opengis.qfield\files\QField) - THIS I AM NOT 100% CERTAIN IF NEEDED

  6. Open qfield app and QfieldCloud projects.

However, when trying to download it takes forever and at the end the process fails all the time.

I have tried the same process but without setting the secret within the project. It is downloaded, but as expected no layers loaded. Nonetheless, it says that no service “name of the service” was not found so QfieldCloud recognize the project connectivity setting. My guess is that I am doing something wrong with the secret.

Any idea/advice/process or tutorial to follow how to set it correctly? I have been checking the documentation as described above and different topics similar to mine but I could not figure it out how to solve this.

Thanks in advance!


Imported from GitHub discussion by @Mobstrat on 2022-12-12T23:04:32Z

Hey, Mobstrat . Can you please share your username and project name, so we can provide you a more detailed answer?


Imported from GitHub comment by @suricactus on 2022-12-13T00:23:32Z

Username: roberto, project name: fieldwork
At the end the process fails as you can see attached


Imported from GitHub comment by @Mobstrat on 2022-12-13T07:42:02Z

Hey, Roberto. Please check the web interface of QFieldCloud, click on your project and check the “jobs” tab. Just checked the logs and what I see is the pg service is not configured correctly:

| 07:45:36.640 QGSMSGLOG WARNING  7 unavailable layer(s) found:                                                                                                                                                     >
| 07:45:36.641 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=PointZ checkPrimaryKeyUnicity='1' table="mozambique"."bicibombas" (geom)                                          >
| 07:45:36.641 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=PolygonZ checkPrimaryKeyUnicity='1' table="mozambique"."comunidades" (geom)                                       >
| 07:45:36.641 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=MultiPolygon checkPrimaryKeyUnicity='1' table="mozambique"."distritos" (geom) sql="shapename" in ( 'Chibabava','Bu>
| 07:45:36.642 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=MultiPolygon checkPrimaryKeyUnicity='1' table="mozambique"."postos" (geom)                                        >
| 07:45:36.642 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=MultiPolygon checkPrimaryKeyUnicity='1' table="mozambique"."provincias" (geom)                                    >
| 07:45:36.642 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=LineString checkPrimaryKeyUnicity='1' table="mozambique"."redes_transporte" (geom)                                >
| 07:45:36.643 QGSMSGLOG WARNING   * service='azadaverde' sslmode=disable key='id' srid=2736 type=Point checkPrimaryKeyUnicity='1' table="mozambique"."servicios" (geom)                                            >
| 07:45:37.091 ENTRYPNT  INFO     Failed to obtain the project extent from project layers.                                                                                                                          >
| 07:45:37.280 QGSSTDERR WARNING  Logged warning: Loading a file that was saved with a newer version of qgis (saved in 3.28.0-Firenze, loaded in 3.26.1-Buenos Aires). Problems may occur.                          >
| 07:46:08.699 QGSMSGLOG WARNING  Connection to database failed                                                                                                                                                     >
| timeout expired     

Imported from GitHub comment by @suricactus on 2022-12-13T10:43:16Z

How should be configured? I have just pasted the PG service into secrets (advance settings) from the PG service I used in desktop. Could be that I am using the newest version of qgis?


Imported from GitHub comment by @Mobstrat on 2022-12-13T10:58:05Z

Make sure you don’t have a typo or anything, which is a common mistake. If you need dedicated support, please drop us an email info at opengis.ch .


Imported from GitHub comment by @suricactus on 2022-12-13T13:03:15Z

Is there any charge on it?


Imported from GitHub comment by @Mobstrat on 2022-12-13T18:07:08Z

??


Imported from GitHub comment by @Mobstrat on 2022-12-29T00:10:19Z