Skip to content
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

QField project layers appearing empty (zero features) when downloaded from QFieldCloud #5727

Open
robertvecino opened this issue Oct 11, 2024 · 13 comments

Comments

@robertvecino
Copy link

robertvecino commented Oct 11, 2024

Hello,
I am having an issue where some of my layers are appearing on my QField map, but they contain 0 features, causing them not to render anything.

When viewing the uploaded project on QFieldCloud, I can see that the project contains ~78 megabytes worth of files. However, when I download the project to QField on iOS, it only downloads ~50 megabytes worth of files.

In QGIS, I then see the notification "Finished uploading the project to QFieldCloud, you are now viewing the locally stored copy." This new local stored copy correctly contains everything that I expect to see (including all features) when the project is loaded in QField.

I work for a state utility and I'm working on providing read-only mobile maps on iOS using QField. I have a free QField Cloud account which I plan to upgrade to an Organisation account when I can get my proof-of-concept project working.

Reproduction steps:

  1. I use the QField Plugin (click on Blue Cloud -> "Convert currently open project to cloud project (recommended)",
  2. I name the project, enter a description and allow it to create a new Local Directory for its local project settings.
  3. I click on OK, and I don't receive any errors during the Conversion or Uploading of the project.
  4. When I view the project files uploaded on QFieldCloud, I see the created Geopackages (gpkg) files and their respective sizes (total project size is 78.1 MB)

I would expect that all layers and their features within them appear on the QField Map.

However, while the layers are present in QField, some contain "0" features, so they don't render. Also only ~50MB of files are downloaded, not the ~78 stored on QFieldCloud. It seems that these affected layers have dropped all of their features, and their attributes tables are empty.

I have already tried uninstalling/reinstalling QField app, deleting previous export folders, using different QFieldCloud accounts.

QGIS

  • OS: Windows 11
  • QGIS Version 3.32.0-Lima
  • QFieldSync Version 4.9.1

QField

  • Device: iPhone 11
  • OS: iOS
  • QField version: 3.4.3 - Ebo(412c8d v3.4.3) Qt 6.6.3
  • Problem can be reliably reproduced, doesn't happen randomly: Yes

QFieldCloud
username: wpwit
projectname: WPW20241014

@nirvn
Copy link
Member

nirvn commented Oct 30, 2024

@robertvecino , did you accidentally enable this option in the project properties dialog's QField panel:

image

That's often the cause when people are reporting missing features.

@nirvn nirvn added the feedback label Oct 30, 2024
@jmacalupur
Copy link

Hello, I had the same issue today. I checked the settings you mentioned about "Only Copy Features in area of interest," and I have it disabled. It seems to be a cloud-related problem, as I’ve reviewed the versions of the geopackage in QFieldCloud, and my layer's objects are indeed there; however, QField is not reading it correctly. There's also no message in the logs.

Has anyone been able to solve this?

Show this message:
image

But when open de geopackage (lastest version), show all features:
image
image

@nirvn
Copy link
Member

nirvn commented Oct 31, 2024

@jmacalupur , can you share your cloud user name (not password! :) ) and project name here please?

@robertvecino
Copy link
Author

@robertvecino , did you accidentally enable this option in the project properties dialog's QField panel:

image

That's often the cause when people are reporting missing features.

Thank you for your reply, but I don't have the option selected. I also don't have an AOI defined. This has not impacted the other layers.
Screenshot 2024-10-31 114534

@nirvn nirvn removed the feedback label Oct 31, 2024
@jmacalupur
Copy link

Hello!
I found the error! It turns out I had to export the layer in Shapefile format because the client wanted it, and I discovered that out of the 272 polygons I had, only 250 were being exported (I was doing this with a Python script, which didn’t alert me). When I did it manually, I realized this error.
image

So, I analyzed the layer and found inconsistencies since I had saved trackpoint or point-type data (even as entities) within the polygon layer. This happened when I synced the downloaded data collected with QField (this seems to be an error in the system itself).
Captura de pantalla 2024-10-30 194654

To fix it, I downloaded the geopackage that didn’t have errors (luckily, I had it) and replaced it in the path on my computer where the project is located. Then, I synchronized it (uploaded it to the cloud) to have stable data again.
image

Another option I considered was to export the layer that isn't displaying (as a Shapefile, for example) and re-incorporate it into the project, where all those errors would be omitted. Editing didn’t work because I tried to delete those features manually, but it showed another error with OGR—quite a headache—which I solved with the first method.

Finally, I’d like to mention that I thought it was an error with my data, but when I did a "Re-apply this and newer changes" in the changes section of QField Cloud, the initial error reappeared. That’s why I manually reverted to a version that didn’t have this error.

@jmacalupur
Copy link

But the problem persist in other layers... in my case in the points layers... Can QFieldCloud Solve this?

@robertvecino
Copy link
Author

Yes, features seem to be "dropping off" during the download from QFieldCloud to the QField app. The project appears as ~78.1 megabytes in size on QFieldCloud, but only ~50MB is downloaded when syncing to the QField app.

@SeqLaz
Copy link
Member

SeqLaz commented Oct 31, 2024

Hi @jmacalupur ,

After reviewing your first picture, it seems the issue is due to a character limit in the field. This limitation is why changes couldn't be applied to the cloud when trying to update those fields.

I recommend using the QGIS core processing tool called "Refactor Fields." This tool can help you remove the string limitation or allow more characters (ShapeFiles are limited to 255 characters for strings). For QFieldCloud projects, I suggest using GeoPackage to improve synchronization. 😉

image

@jmacalupur
Copy link

Thank you,

I would understand that it would be like that; however, it also depends on the data type. In this case, I even had date data where text data was saved (e.g., photos, provinces, etc.), and these errors occur when recording the data and uploading it to the cloud, as a strange entry appears in the photos field.

image

@SeqLaz
Copy link
Member

SeqLaz commented Oct 31, 2024

Hi @jmacalupur,

Are you using a PostGIS database?

Also could you provide a sample project to make some test?

@jmacalupur
Copy link

I'm only use Gepackage and QField Cloud.

@SeqLaz
Copy link
Member

SeqLaz commented Nov 1, 2024

I'm only use Gepackage and QField Cloud.

Could you test using the "Refactor fields" to remove any limiting characters and replace the created GeoPackages in the project, and then synchronize and push some changes?

@robertvecino
Copy link
Author

Yes, features seem to be "dropping off" during the download from QFieldCloud to the QField app. The project appears as ~78.1 megabytes in size on QFieldCloud, but only ~50MB is downloaded when syncing to the QField app.

Hi all,
The issue that I posted about is not related to @jmacalupur's posting above (which seems to have taken over the thread :). Features are mysteriously going missing between QFieldCloud and the QFieldApp. Has anybody had an experience of this? Please see the original post for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants